refactor: remove Python shebangs since they are not needed

main
Marshall Hallenbeck 2023-10-21 23:45:16 -04:00
parent b31b3b70ba
commit e9eccba193
123 changed files with 0 additions and 206 deletions

View File

@ -1,5 +1,3 @@
#!/usr/bin/env python3
import os import os
import shutil import shutil
import subprocess import subprocess

View File

@ -1,5 +1,3 @@
#!/usr/bin/env python3
from PyInstaller.utils.hooks import collect_all from PyInstaller.utils.hooks import collect_all
datas, binaries, hiddenimports = collect_all("lsassy") datas, binaries, hiddenimports = collect_all("lsassy")

View File

@ -1,5 +1,3 @@
#!/usr/bin/env python3
from PyInstaller.utils.hooks import collect_all from PyInstaller.utils.hooks import collect_all
datas, binaries, hiddenimports = collect_all("pypykatz") datas, binaries, hiddenimports = collect_all("pypykatz")

View File

@ -1,5 +1,3 @@
#!/usr/bin/env python3
import argparse import argparse
import sys import sys
from argparse import RawTextHelpFormatter from argparse import RawTextHelpFormatter

View File

@ -1,5 +1,3 @@
#!/usr/bin/env python3
import random import random
import socket import socket
from socket import AF_INET, AF_INET6, SOCK_DGRAM, IPPROTO_IP, AI_CANONNAME from socket import AF_INET, AF_INET6, SOCK_DGRAM, IPPROTO_IP, AI_CANONNAME

View File

@ -1,5 +1,3 @@
#!/usr/bin/env python3
import configparser import configparser
import os import os

View File

@ -1,5 +1,3 @@
#!/usr/bin/env python3
from os import mkdir from os import mkdir
from os.path import exists from os.path import exists
from os.path import join as path_join from os.path import join as path_join

View File

@ -1,4 +1,3 @@
#!/usr/bin/env python3
import os import os
from nxc.paths import DATA_PATH from nxc.paths import DATA_PATH

View File

@ -1,5 +1,3 @@
#!/usr/bin/env python3
def add_user_bh(user, domain, logger, config): def add_user_bh(user, domain, logger, config):
"""Adds a user to the BloodHound graph database. """Adds a user to the BloodHound graph database.

View File

@ -1,5 +1,3 @@
#!/usr/bin/env python3
import random import random

View File

@ -1,5 +1,3 @@
#!/usr/bin/env python3
import os import os
from termcolor import colored from termcolor import colored

View File

@ -1,5 +1,3 @@
#!/usr/bin/env python3
import random import random
import string import string
import re import re

View File

@ -1,4 +1,3 @@
#!/usr/bin/env python3
import os import os
import re import re
from sys import exit from sys import exit

View File

@ -1,5 +1,3 @@
#!/usr/bin/env python3
import nxc import nxc
import importlib import importlib
import traceback import traceback

View File

@ -1,4 +1,3 @@
#!/usr/bin/env python3
from types import ModuleType from types import ModuleType
from importlib.machinery import SourceFileLoader from importlib.machinery import SourceFileLoader
from os import listdir from os import listdir

View File

@ -1,4 +1,3 @@
#!/usr/bin/env python3
import logging import logging
from logging import LogRecord from logging import LogRecord
from logging.handlers import RotatingFileHandler from logging.handlers import RotatingFileHandler

View File

@ -1,5 +1,3 @@
#!/usr/bin/env python3
# Credit to https://airbus-cyber-security.com/fr/the-oxid-resolver-part-1-remote-enumeration-of-network-interfaces-without-any-authentication/ # Credit to https://airbus-cyber-security.com/fr/the-oxid-resolver-part-1-remote-enumeration-of-network-interfaces-without-any-authentication/
# Airbus CERT # Airbus CERT
# module by @mpgn_x64 # module by @mpgn_x64

View File

@ -1,5 +1,3 @@
#!/usr/bin/env python3
class NXCModule: class NXCModule:
""" """

View File

@ -1,4 +1,3 @@
#!/usr/bin/env python3
import re import re
from impacket.ldap import ldap, ldapasn1 from impacket.ldap import ldap, ldapasn1
from impacket.ldap.ldap import LDAPSearchError from impacket.ldap.ldap import LDAPSearchError

View File

@ -1,5 +1,3 @@
#!/usr/bin/env python3
import ssl import ssl
import ldap3 import ldap3
from impacket.dcerpc.v5 import samr, epm, transport from impacket.dcerpc.v5 import samr, epm, transport

View File

@ -1,4 +1,3 @@
#!/usr/bin/env python3
class NXCModule: class NXCModule:
""" """
Checks for credentials in IIS Application Pool configuration files using appcmd.exe. Checks for credentials in IIS Application Pool configuration files using appcmd.exe.

View File

@ -1,4 +1,3 @@
#!/usr/bin/env python3
# Author: # Author:
# Romain Bentz (pixis - @hackanddo) # Romain Bentz (pixis - @hackanddo)
# Website: # Website:

View File

@ -1,5 +1,3 @@
#!/usr/bin/env python3
from impacket import system_errors from impacket import system_errors
from impacket.dcerpc.v5 import transport from impacket.dcerpc.v5 import transport
from impacket.dcerpc.v5.ndr import NDRCALL from impacket.dcerpc.v5.ndr import NDRCALL

View File

@ -1,5 +1,3 @@
#!/usr/bin/env python3
import ntpath import ntpath
import tempfile import tempfile

View File

@ -1,5 +1,3 @@
#!/usr/bin/env python3
import sys import sys
import requests import requests
from requests import ConnectionError from requests import ConnectionError

View File

@ -1,5 +1,3 @@
#!/usr/bin/env python3
# All credit to @an0n_r0 # All credit to @an0n_r0
# https://github.com/tothi/serviceDetector # https://github.com/tothi/serviceDetector
# Module by @mpgn_x64 # Module by @mpgn_x64

View File

@ -1,5 +1,3 @@
#!/usr/bin/env python3
from datetime import datetime from datetime import datetime
from nxc.helpers.logger import write_log from nxc.helpers.logger import write_log

View File

@ -1,5 +1,3 @@
#!/usr/bin/env python3
class NXCModule: class NXCModule:
""" """

View File

@ -1,4 +1,3 @@
#!/usr/bin/env python3
import socket import socket
from nxc.logger import nxc_logger from nxc.logger import nxc_logger
from impacket.ldap.ldap import LDAPSearchError from impacket.ldap.ldap import LDAPSearchError

View File

@ -1,4 +1,3 @@
#!/usr/bin/env python3
from dploot.lib.target import Target from dploot.lib.target import Target
from nxc.protocols.smb.firefox import FirefoxTriage from nxc.protocols.smb.firefox import FirefoxTriage

View File

@ -1,5 +1,3 @@
#!/usr/bin/env python3
from impacket.ldap import ldapasn1 as ldapasn1_impacket from impacket.ldap import ldapasn1 as ldapasn1_impacket
from impacket.ldap import ldap as ldap_impacket from impacket.ldap import ldap as ldap_impacket
import re import re

View File

@ -1,5 +1,3 @@
#!/usr/bin/env python3
from datetime import datetime from datetime import datetime
from nxc.helpers.logger import write_log from nxc.helpers.logger import write_log
import json import json

View File

@ -1,5 +1,3 @@
#!/usr/bin/env python3
import xml.etree.ElementTree as ET import xml.etree.ElementTree as ET
from io import BytesIO from io import BytesIO

View File

@ -1,5 +1,3 @@
#!/usr/bin/env python3
import xml.etree.ElementTree as ET import xml.etree.ElementTree as ET
from Cryptodome.Cipher import AES from Cryptodome.Cipher import AES
from base64 import b64decode from base64 import b64decode

View File

@ -1,4 +1,3 @@
#!/usr/bin/env python3
from impacket.ldap import ldapasn1 as ldapasn1_impacket from impacket.ldap import ldapasn1 as ldapasn1_impacket
import sys import sys

View File

@ -1,5 +1,3 @@
#!/usr/bin/env python3
from impacket.ldap import ldapasn1 as ldapasn1_impacket from impacket.ldap import ldapasn1 as ldapasn1_impacket
from impacket.ldap import ldap as ldap_impacket from impacket.ldap import ldap as ldap_impacket
import sys import sys

View File

@ -1,5 +1,3 @@
#!/usr/bin/env python3
# handlekatz module for nxc python3 # handlekatz module for nxc python3
# author of the module : github.com/mpgn # author of the module : github.com/mpgn
# HandleKatz: https://github.com/codewhitesec/HandleKatz # HandleKatz: https://github.com/codewhitesec/HandleKatz

View File

@ -1,4 +1,3 @@
#!/usr/bin/env python3
# Author: Peter Gormington (@hackerm00n on Twitter) # Author: Peter Gormington (@hackerm00n on Twitter)
import logging import logging
from sqlite3 import connect from sqlite3 import connect

View File

@ -1,5 +1,3 @@
#!/usr/bin/env python3
from impacket.dcerpc.v5 import rrp from impacket.dcerpc.v5 import rrp
from impacket.dcerpc.v5 import scmr from impacket.dcerpc.v5 import scmr
from impacket.examples.secretsdump import RemoteOperations from impacket.examples.secretsdump import RemoteOperations

View File

@ -1,4 +1,3 @@
#!/usr/bin/env python3
import json import json
from impacket.ldap import ldapasn1 as ldapasn1_impacket from impacket.ldap import ldapasn1 as ldapasn1_impacket

View File

@ -1,4 +1,3 @@
#!/usr/bin/env python3
import socket import socket
import ssl import ssl
import asyncio import asyncio

View File

@ -1,4 +1,3 @@
#!/usr/bin/env python3
# Author: # Author:
# Romain Bentz (pixis - @hackanddo) # Romain Bentz (pixis - @hackanddo)
# Website: # Website:

View File

@ -1,5 +1,3 @@
#!/usr/bin/env python3
from masky import Masky from masky import Masky
from nxc.helpers.bloodhound import add_user_bh from nxc.helpers.bloodhound import add_user_bh

View File

@ -1,5 +1,3 @@
#!/usr/bin/env python3
from sys import exit from sys import exit

View File

@ -1,4 +1,3 @@
#!/usr/bin/env python3
# All credits to https://github.com/d4t4s3c/Win7Blue # All credits to https://github.com/d4t4s3c/Win7Blue
# @d4t4s3c # @d4t4s3c
# Module by @mpgn_x64 # Module by @mpgn_x64

View File

@ -1,4 +1,3 @@
#!/usr/bin/env python3
# Author: # Author:
# Romain de Reydellet (@pentest_soka) # Romain de Reydellet (@pentest_soka)
from nxc.helpers.logger import highlight from nxc.helpers.logger import highlight

View File

@ -1,4 +1,3 @@
#!/usr/bin/env python3
# nanodump module for nxc python3 # nanodump module for nxc python3
# author of the module : github.com/mpgn # author of the module : github.com/mpgn
# nanodump: https://github.com/helpsystems/nanodump # nanodump: https://github.com/helpsystems/nanodump

View File

@ -1,4 +1,3 @@
#!/usr/bin/env python3
# Credit to https://exploit.ph/cve-2021-42287-cve-2021-42278-weaponisation.html # Credit to https://exploit.ph/cve-2021-42287-cve-2021-42278-weaponisation.html
# @exploitph @Evi1cg # @exploitph @Evi1cg
# module by @mpgn_x64 # module by @mpgn_x64

View File

@ -1,5 +1,3 @@
#!/usr/bin/env python3
from impacket.dcerpc.v5 import rrp from impacket.dcerpc.v5 import rrp
from impacket.examples.secretsdump import RemoteOperations from impacket.examples.secretsdump import RemoteOperations
from impacket.dcerpc.v5.rrp import DCERPCSessionError from impacket.dcerpc.v5.rrp import DCERPCSessionError

View File

@ -1,4 +1,3 @@
#!/usr/bin/env python3
# From https://github.com/topotam/PetitPotam # From https://github.com/topotam/PetitPotam
# All credit to @topotam # All credit to @topotam
# Module by @mpgn_x64 # Module by @mpgn_x64

View File

@ -1,5 +1,3 @@
#!/usr/bin/env python3
import sys import sys
from impacket import system_errors from impacket import system_errors
from impacket.dcerpc.v5.rpcrt import DCERPCException from impacket.dcerpc.v5.rpcrt import DCERPCException

View File

@ -1,4 +1,3 @@
#!/usr/bin/env python3
# prdocdump module for nxc python3 # prdocdump module for nxc python3
# thanks to pixis (@HackAndDo) for making it pretty l33t :) # thanks to pixis (@HackAndDo) for making it pretty l33t :)
# v0.4 # v0.4

View File

@ -1,5 +1,3 @@
#!/usr/bin/env python3
from impacket.ldap import ldapasn1 as ldapasn1_impacket from impacket.ldap import ldapasn1 as ldapasn1_impacket
from impacket.ldap import ldap as ldap_impacket from impacket.ldap import ldap as ldap_impacket
from math import fabs from math import fabs

View File

@ -1,5 +1,3 @@
#!/usr/bin/env python3
from dploot.triage.rdg import RDGTriage from dploot.triage.rdg import RDGTriage
from dploot.triage.masterkeys import MasterkeysTriage, parse_masterkey_file from dploot.triage.masterkeys import MasterkeysTriage, parse_masterkey_file
from dploot.triage.backupkey import BackupkeyTriage from dploot.triage.backupkey import BackupkeyTriage

View File

@ -1,5 +1,3 @@
#!/usr/bin/env python3
from sys import exit from sys import exit
from nxc.connection import dcom_FirewallChecker from nxc.connection import dcom_FirewallChecker

View File

@ -1,5 +1,3 @@
#!/usr/bin/env python3
from impacket.dcerpc.v5.rpcrt import DCERPCException from impacket.dcerpc.v5.rpcrt import DCERPCException
from impacket.dcerpc.v5 import rrp from impacket.dcerpc.v5 import rrp
from impacket.examples.secretsdump import RemoteOperations from impacket.examples.secretsdump import RemoteOperations

View File

@ -1,5 +1,3 @@
#!/usr/bin/env python3
class NXCModule: class NXCModule:
name = "runasppl" name = "runasppl"

View File

@ -1,5 +1,3 @@
#!/usr/bin/env python3
import os import os
from time import sleep from time import sleep
from datetime import datetime from datetime import datetime

View File

@ -1,5 +1,3 @@
#!/usr/bin/env python3
import ntpath import ntpath
from sys import exit from sys import exit

View File

@ -1,5 +1,3 @@
#!/usr/bin/env python3
import time import time
from impacket import system_errors from impacket import system_errors
from impacket.dcerpc.v5 import transport from impacket.dcerpc.v5 import transport

View File

@ -1,5 +1,3 @@
#!/usr/bin/env python3
import pylnk3 import pylnk3
import ntpath import ntpath
from sys import exit from sys import exit

View File

@ -1,5 +1,3 @@
#!/usr/bin/env python3
# https://raw.githubusercontent.com/SecureAuthCorp/impacket/master/examples/rpcdump.py # https://raw.githubusercontent.com/SecureAuthCorp/impacket/master/examples/rpcdump.py
from impacket import uuid from impacket import uuid
from impacket.dcerpc.v5 import transport, epm from impacket.dcerpc.v5 import transport, epm

View File

@ -1,5 +1,3 @@
#!/usr/bin/env python3
from impacket.ldap import ldapasn1 as ldapasn1_impacket from impacket.ldap import ldapasn1 as ldapasn1_impacket
from impacket.ldap.ldap import LDAPSearchError from impacket.ldap.ldap import LDAPSearchError
import sys import sys

View File

@ -1,5 +1,3 @@
#!/usr/bin/env python3
import sqlite3 import sqlite3

View File

@ -1,5 +1,3 @@
#!/usr/bin/env python3
from sys import exit from sys import exit

View File

@ -1,4 +1,3 @@
#!/usr/bin/env python3
from impacket.ldap import ldapasn1 as ldapasn1_impacket from impacket.ldap import ldapasn1 as ldapasn1_impacket

View File

@ -1,4 +1,3 @@
#!/usr/bin/env python3
import logging import logging
from impacket.dcerpc.v5 import rrp from impacket.dcerpc.v5 import rrp

View File

@ -1,5 +1,3 @@
#!/usr/bin/env python3
from pathlib import Path from pathlib import Path
from datetime import datetime from datetime import datetime
from impacket.ldap import ldap, ldapasn1 from impacket.ldap import ldap, ldapasn1

View File

@ -1,4 +1,3 @@
#!/usr/bin/env python3
# Initially created by @sadshade, all output to him: # Initially created by @sadshade, all output to him:
# https://github.com/sadshade/veeam-output # https://github.com/sadshade/veeam-output

View File

@ -1,5 +1,3 @@
#!/usr/bin/env python3
import json import json
import logging import logging
import operator import operator

View File

@ -1,5 +1,3 @@
#!/usr/bin/env python3
from impacket.dcerpc.v5.rpcrt import DCERPCException from impacket.dcerpc.v5.rpcrt import DCERPCException
from impacket.dcerpc.v5 import rrp from impacket.dcerpc.v5 import rrp
from impacket.examples.secretsdump import RemoteOperations from impacket.examples.secretsdump import RemoteOperations

View File

@ -1,5 +1,3 @@
#!/usr/bin/env python3
from sys import exit from sys import exit

View File

@ -1,5 +1,3 @@
#!/usr/bin/env python3
from nxc.protocols.smb.remotefile import RemoteFile from nxc.protocols.smb.remotefile import RemoteFile
from impacket import nt_errors from impacket import nt_errors
from impacket.smb3structs import FILE_READ_DATA from impacket.smb3structs import FILE_READ_DATA

View File

@ -1,4 +1,3 @@
#!/usr/bin/env python3
# If you are looking for a local Version, the baseline code is from https://github.com/NeffIsBack/WinSCPPasswdExtractor # If you are looking for a local Version, the baseline code is from https://github.com/NeffIsBack/WinSCPPasswdExtractor
# References and inspiration: # References and inspiration:
# - https://github.com/anoopengineer/winscppasswd # - https://github.com/anoopengineer/winscppasswd

View File

@ -1,5 +1,3 @@
#!/usr/bin/env python3
from dploot.triage.masterkeys import MasterkeysTriage from dploot.triage.masterkeys import MasterkeysTriage
from dploot.lib.target import Target from dploot.lib.target import Target
from dploot.lib.smb import DPLootSMBConnection from dploot.lib.smb import DPLootSMBConnection

View File

@ -1,4 +1,3 @@
#!/usr/bin/env python3
# everything is comming from https://github.com/dirkjanm/CVE-2020-1472 # everything is comming from https://github.com/dirkjanm/CVE-2020-1472
# credit to @dirkjanm # credit to @dirkjanm
# module by : @mpgn_x64 # module by : @mpgn_x64

View File

@ -1,5 +1,3 @@
#!/usr/bin/env python3
import cmd import cmd
import configparser import configparser
import csv import csv

View File

@ -1,5 +1,3 @@
#!/usr/bin/env python3
from ipaddress import ip_address, ip_network, summarize_address_range, ip_interface from ipaddress import ip_address, ip_network, summarize_address_range, ip_interface

View File

@ -1,5 +1,3 @@
#!/usr/bin/env python3
import xmltodict import xmltodict
# Ideally i'd like to be able to pull this info out dynamically from each protocol object but i'm a lazy bastard # Ideally i'd like to be able to pull this info out dynamically from each protocol object but i'm a lazy bastard

View File

@ -1,5 +1,3 @@
#!/usr/bin/env python3
from libnmap.parser import NmapParser from libnmap.parser import NmapParser
from nxc.logger import nxc_logger from nxc.logger import nxc_logger

View File

@ -1,5 +1,3 @@
#!/usr/bin/env python3
from nxc.config import process_secret from nxc.config import process_secret
from nxc.connection import connection from nxc.connection import connection
from nxc.helpers.logger import highlight from nxc.helpers.logger import highlight

View File

@ -1,5 +1,3 @@
#!/usr/bin/env python3
from pathlib import Path from pathlib import Path
from sqlalchemy.dialects.sqlite import Insert from sqlalchemy.dialects.sqlite import Insert
from sqlalchemy.orm import sessionmaker, scoped_session from sqlalchemy.orm import sessionmaker, scoped_session

View File

@ -1,5 +1,3 @@
#!/usr/bin/env python3
from nxc.nxcdb import DatabaseNavigator, print_table, print_help from nxc.nxcdb import DatabaseNavigator, print_table, print_help

View File

@ -1,4 +1,3 @@
#!/usr/bin/env python3
# from https://github.com/SecureAuthCorp/impacket/blob/master/examples/GetNPUsers.py # from https://github.com/SecureAuthCorp/impacket/blob/master/examples/GetNPUsers.py
# https://troopers.de/downloads/troopers19/TROOPERS19_AD_Fun_With_LDAP.pdf # https://troopers.de/downloads/troopers19/TROOPERS19_AD_Fun_With_LDAP.pdf
import hashlib import hashlib

View File

@ -1,5 +1,3 @@
#!/usr/bin/env python3
from pathlib import Path from pathlib import Path
from sqlalchemy.orm import sessionmaker, scoped_session from sqlalchemy.orm import sessionmaker, scoped_session
from sqlalchemy import MetaData, Table from sqlalchemy import MetaData, Table

View File

@ -1,5 +1,3 @@
#!/usr/bin/env python3
from nxc.nxcdb import DatabaseNavigator, print_help from nxc.nxcdb import DatabaseNavigator, print_help

View File

@ -1,5 +1,3 @@
#!/usr/bin/env python3
import random import random
from binascii import hexlify, unhexlify from binascii import hexlify, unhexlify
from datetime import datetime, timedelta from datetime import datetime, timedelta

View File

@ -1,5 +1,3 @@
#!/usr/bin/env python3
from pyasn1.codec.der import decoder from pyasn1.codec.der import decoder
from pyasn1_modules import rfc5652 from pyasn1_modules import rfc5652

View File

@ -1,4 +1,3 @@
#!/usr/bin/env python3
import os import os
from nxc.config import process_secret from nxc.config import process_secret

View File

@ -1,5 +1,3 @@
#!/usr/bin/env python3
from pathlib import Path from pathlib import Path
from sqlalchemy import MetaData, func, Table, select, insert, update, delete from sqlalchemy import MetaData, func, Table, select, insert, update, delete
from sqlalchemy.dialects.sqlite import Insert # used for upsert from sqlalchemy.dialects.sqlite import Insert # used for upsert

View File

@ -1,5 +1,3 @@
#!/usr/bin/env python3
from nxc.helpers.misc import validate_ntlm from nxc.helpers.misc import validate_ntlm
from nxc.nxcdb import DatabaseNavigator, print_table, print_help from nxc.nxcdb import DatabaseNavigator, print_table, print_help

View File

@ -1,5 +1,3 @@
#!/usr/bin/env python3
import binascii import binascii
from nxc.logger import nxc_logger from nxc.logger import nxc_logger

View File

@ -1,5 +1,3 @@
#!/usr/bin/env python3
import asyncio import asyncio
import os import os
from datetime import datetime from datetime import datetime

View File

@ -1,4 +1,3 @@
#!/usr/bin/env python3
from pathlib import Path from pathlib import Path
from sqlalchemy.orm import sessionmaker, scoped_session from sqlalchemy.orm import sessionmaker, scoped_session

View File

@ -1,5 +1,3 @@
#!/usr/bin/env python3
from nxc.nxcdb import DatabaseNavigator, print_help from nxc.nxcdb import DatabaseNavigator, print_help

View File

@ -1,5 +1,3 @@
#!/usr/bin/env python3
import ntpath import ntpath
import hashlib import hashlib
import binascii import binascii

View File

@ -1,5 +1,3 @@
#!/usr/bin/env python3
import os import os
from impacket.dcerpc.v5 import tsch, transport from impacket.dcerpc.v5 import tsch, transport
from impacket.dcerpc.v5.dtypes import NULL from impacket.dcerpc.v5.dtypes import NULL

View File

@ -1,4 +1,3 @@
#!/usr/bin/env python3
import base64 import base64
import warnings import warnings
from datetime import datetime from datetime import datetime

View File

@ -1,5 +1,3 @@
#!/usr/bin/env python3
from nxc.helpers.misc import validate_ntlm from nxc.helpers.misc import validate_ntlm
from nxc.nxcdb import DatabaseNavigator, print_table, print_help from nxc.nxcdb import DatabaseNavigator, print_table, print_help
from termcolor import colored from termcolor import colored

View File

@ -1,4 +1,3 @@
#!/usr/bin/env python3
from base64 import b64decode from base64 import b64decode
from binascii import unhexlify from binascii import unhexlify
from hashlib import pbkdf2_hmac, sha1 from hashlib import pbkdf2_hmac, sha1

Some files were not shown because too many files have changed in this diff Show More