def __init__(self, args): self.__args = args InitDirFile.__init__(self, [Core._commands_path["nmap"]], self.__args, "nmap") self.__ip_file_to_scan = tempfile.NamedTemporaryFile(mode='w+t')
def __init__(self, args, scan_type): if args.pcap: InitDirFile.__init__(self, [args.pcap], args, scan_type) self.__pcap_file = args.pcap if args.pcap[0].startswith("/") else "{0}/{1}".format(os.getcwd(), args.pcap) self._filter_commands = { "iplist" : "{0} -2 -R 'ip' -T fields -e ip.src -r {1}".format(Core._commands_path["tshark"], self.__pcap_file), "hostports" : "{0} -2 -R 'tcp' -T fields -e ip.src -e tcp.srcport -e ip.dst -e tcp.dstport -r {1}".format(Core._commands_path["tshark"], self.__pcap_file), "winhosts" : "{0} -2 -R 'browser.command == 0x01' -T fields -e ip.src -e browser.server -r {1}".format(Core._commands_path["tshark"], self.__pcap_file), "windomains" : "{0} -2 -R 'browser.command == 0x0c' -T fields -e ip.src -e browser.server -r {1}".format(Core._commands_path["tshark"], self.__pcap_file), "top10hosts" : "{0} -2 -R 'ip' -T fields -e ip.dst -r {1}".format(Core._commands_path["tshark"], self.__pcap_file), "top10conversations" : "{0} -2 -R tcp -T fields -e ip.src -e tcp.srcport -e ip.dst -e tcp.dstport -E separator=';' -r {1}".format(Core._commands_path["tshark"], self.__pcap_file), "top10dns" : "{0} -2 -T fields -e dns.qry.name -E separator=';' -R ' dns and udp.port == 53' -r {1}".format(Core._commands_path["tshark"], self.__pcap_file), "top10http" : "{0} -2 -R http.request -T fields -e http.host -r {1}".format(Core._commands_path["tshark"], self.__pcap_file) }
def __init__(self, args): InitDirFile.__init__(self, [Core._commands_path["tcpdump"], Core._commands_path["arpspoof"]], args, "pcap") self.__proc_route = "/proc/net/route" self._output_file = "{0}{1}.pcap".format(self._output_dir, datetime.datetime.now().strftime("%Y%m%d%H%M%S")) self._default_gw = args.gateway if args.gateway else self.__get_default_gw()
def __init__(self, args): self._scan_options = ConfigParser.get_screen_ports(args.config_file) core_options = "-n -Pn -T5 --open -p T:{0}".format(self._scan_options) if self._scan_options else "-n -Pn -T5 --open -p T:80,443" self._result_file = tempfile.NamedTemporaryFile(mode='w+t') InitDirFile.__init__(self, [Core._commands_path["phantomjs"], Core._commands_path["nmap"], args.rasterize], args, "screen") if args.destination: __destination = " ".join([ip.strip() for ip in args.destination.split(",")]) self._nmap_options = "{0} {1} -oG {2} {3}".format(core_options, Core._nmap_optimize, self._result_file.name, __destination) if args.nmap_optimize else "{0} -oG {1} {2}".format(core_options, self._result_file.name, __destination)
def __init__(self, args): self._scan_options = ConfigParser.get_screen_ports(args.config_file) core_options = "-n -Pn -T5 --open -p T:{0}".format( self._scan_options ) if self._scan_options else "-n -Pn -T5 --open -p T:80,443" self._result_file = tempfile.NamedTemporaryFile(mode='w+t') InitDirFile.__init__(self, [ Core._commands_path["phantomjs"], Core._commands_path["nmap"], args.rasterize ], args, "screen") if args.destination: __destination = " ".join( [ip.strip() for ip in args.destination.split(",")]) self._nmap_options = "{0} {1} -oG {2} {3}".format( core_options, Core._nmap_optimize, self._result_file.name, __destination ) if args.nmap_optimize else "{0} -oG {1} {2}".format( core_options, self._result_file.name, __destination)
def __init__(self, args): self.__args = args InitDirFile.__init__(self, [Core._commands_path["nmap"]], self.__args, "nmap") self.__ip_file_to_scan = tempfile.NamedTemporaryFile(mode='w+t')