Example #1
0
 def Enum(self):
     npp = nmapParser.NmapParserFunk(self.target)
     npp.openProxyPorts()
     open_proxy_ports = npp.proxy_ports2
     if len(open_proxy_ports) == 0:
         pass
     else:
         pweb = enumWeb.EnumWeb(self.target)
         pweb.proxyScan()
         http_proxy_commands = pweb.proxy_processes
         psslweb = enumWebSSL.EnumWebSSL(self.target)
         psslweb.sslProxyScan()
         ssl_proxy_commands = psslweb.proxy_processes
         all_commands = []
         proxy_tcp_ports = npp.proxy_tcp_ports
         tcp_proxy_ports = ",".join(map(str, proxy_tcp_ports))
         default_command = f"proxychains nmap -vv -sT -Pn -sC -sV -p {tcp_proxy_ports} --script-timeout 2m -oA {self.target}-Report/nmap/proxychain-ServiceScan 127.0.0.1"
         all_commands.append(default_command)
         for cmd in http_proxy_commands:
             all_commands.append(cmd)
         for cmd in ssl_proxy_commands:
             all_commands.append(cmd)
         sorted_commands = sorted(set(all_commands), reverse=True)
         commands_to_run = []
         for i in sorted_commands:
             commands_to_run.append(i)
         allCmds = tuple(commands_to_run)
         self.all_processes = allCmds
Example #2
0
 def Enum(self):
     """This is a helper function that will run all the Enumeration Commands Based off of nmaps proxychain original output scan if new ports are discovered."""
     npp = nmapParser.NmapParserFunk(self.target)
     npp.openProxyPorts()
     np = nmapParser.NmapParserFunk(self.target)
     np.openPorts()
     open_proxy_ports = np.proxy_ports
     if len(open_proxy_ports) == 0:
         pass
     else:
         c = config_parser.CommandParser(f"{os.getcwd()}/config/config.yaml", self.target)
         pweb = enumWeb.EnumWeb(self.target)
         pweb.proxyScan()
         http_proxy_commands = pweb.proxy_processes
         psslweb = enumWebSSL.EnumWebSSL(self.target)
         psslweb.sslProxyScan()
         ssl_proxy_commands = psslweb.proxy_processes
         all_commands = []
         proxy_tcp_ports = npp.proxy_tcp_ports
         tcp_proxy_ports = ",".join(map(str, proxy_tcp_ports))
         default_command = c.getCmd("proxy", "proxychainsDiscoveredPorts", openTcpProxyPorts=tcp_proxy_ports)
         all_commands.append(default_command)
         for cmd in http_proxy_commands:
             all_commands.append(cmd)
         for cmd in ssl_proxy_commands:
             all_commands.append(cmd)
         sorted_commands = sorted(set(all_commands), reverse=True)
         commands_to_run = []
         for i in sorted_commands:
             commands_to_run.append(i)
         allCmds = tuple(commands_to_run)
         self.all_processes = allCmds
Example #3
0
 def cmsEnumSSL():
     cms = enumWebSSL.EnumWebSSL(args.target)
     cms.sslEnumCMS()
     cms_ssl_commands = cms.cms_processes
     for command in cms_ssl_commands:
         print(cmd_info, command)
     with Pool(processes=2) as p:
         max_ = len(cms_ssl_commands)
         with tqdm(total=max_) as pbar:
             for i, returncode in enumerate(
                 p.imap_unordered(partial(call, shell=True), cms_ssl_commands)
             ):
                 pbar.update()
                 if returncode != 0:
                     print(f"{i} command failed: {returncode}")
Example #4
0
 def enumHTTPS2():
     webssl = enumWebSSL.EnumWebSSL(args.target)
     webssl.ScanWebOption()
     web_ssl_enum_commands = webssl.processes
     for command in web_ssl_enum_commands:
         print(cmd_info, command)
     with Pool(processes=2) as p:
         max_ = len(web_ssl_enum_commands)
         with tqdm(total=max_) as pbar:
             for i, returncode in enumerate(
                 p.imap_unordered(partial(call, shell=True), web_ssl_enum_commands)
             ):
                 pbar.update()
                 if returncode != 0:
                     print(f"{i} command failed: {returncode}")
Example #5
0
 def cmsEnumSSL(self):
     """Helper funciton to call the CMS enumeration HTTPS logic."""
     cms = enumWebSSL.EnumWebSSL(self.target)
     cms.sslEnumCMS()
     cms_ssl_commands = cms.cms_processes
     self.mpRun(cms_ssl_commands)
Example #6
0
 def enumHTTPS2(self):
     """Helper function to call the lib/enumWebSSL Large Wordlists Class."""
     webssl = enumWebSSL.EnumWebSSL(self.target)
     webssl.ScanWebOption()
     web_ssl_enum_commands = webssl.processes
     self.mpRun(web_ssl_enum_commands)
Example #7
0
 def cmsEnumSSL():
     cms = enumWebSSL.EnumWebSSL(args.target)
     cms.sslEnumCMS()
     cms_ssl_commands = cms.cms_processes
     mpRun(cms_ssl_commands)
Example #8
0
 def enumHTTPS2():
     webssl = enumWebSSL.EnumWebSSL(args.target)
     webssl.ScanWebOption()
     web_ssl_enum_commands = webssl.processes
     mpRun(web_ssl_enum_commands)