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
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
def cmsEnum(): cm = enumWeb.EnumWeb(args.target) cm.CMS() cms_commands = cm.cms_processes for command in cms_commands: print(cmd_info, command) with Pool(processes=2) as p: max_ = len(cms_commands) with tqdm(total=max_) as pbar: for i, returncode in enumerate( p.imap_unordered(partial(call, shell=True), cms_commands) ): pbar.update() if returncode != 0: print(f"{i} command failed: {returncode}")
def enumHTTP2(): eweb = enumWeb.EnumWeb(args.target) eweb.ScanWebOption() web_enum_commands = eweb.processes for command in web_enum_commands: print(cmd_info, command) with Pool(processes=2) as p: max_ = len(web_enum_commands) with tqdm(total=max_) as pbar: for i, returncode in enumerate( p.imap_unordered(partial(call, shell=True), web_enum_commands) ): pbar.update() if returncode != 0: print(f"{i} command failed: {returncode}")
def cmsEnum(self): """Helper funciton to call the CMS enumeration HTTP logic.""" cm = enumWeb.EnumWeb(self.target) cm.CMS() cms_commands = cm.cms_processes self.mpRun(cms_commands)
def enumHTTP2(self): """Helper function to call the lib/enumWeb Large Wordlists Class.""" eweb = enumWeb.EnumWeb(self.target) eweb.ScanWebOption() web_enum_commands = eweb.processes self.mpRun(web_enum_commands)
def cmsEnum(): cm = enumWeb.EnumWeb(args.target) cm.CMS() cms_commands = cm.cms_processes mpRun(cms_commands)
def enumHTTP2(): eweb = enumWeb.EnumWeb(args.target) eweb.ScanWebOption() web_enum_commands = eweb.processes mpRun(web_enum_commands)