Exemple #1
0
 async def run(self, service):
     dot_extensions = ','.join(
         ['.' + x for x in self.get_option('ext').split(',')])
     for wordlist in self.get_option('wordlist'):
         name = os.path.splitext(os.path.basename(wordlist))[0]
         if self.get_option('tool') == 'feroxbuster':
             await service.execute(
                 'feroxbuster -u {http_scheme}://{addressv6}:{port}/ -t ' +
                 str(self.get_option('threads')) + ' -w ' + wordlist +
                 ' -x "' + self.get_option('ext') +
                 '" -v -k -n -q -o "{scandir}/{protocol}_{port}_{http_scheme}_feroxbuster_'
                 + name + '.txt"')
         elif self.get_option('tool') == 'gobuster':
             await service.execute(
                 'gobuster dir -u {http_scheme}://{addressv6}:{port}/ -t ' +
                 str(self.get_option('threads')) + ' -w ' + wordlist +
                 ' -e -k -x "' + self.get_option('ext') +
                 '" -z -o "{scandir}/{protocol}_{port}_{http_scheme}_gobuster_'
                 + name + '.txt"')
         elif self.get_option('tool') == 'dirsearch':
             if service.target.ipversion == 'IPv6':
                 error('dirsearch does not support IPv6.')
             else:
                 await service.execute(
                     'dirsearch -u {http_scheme}://{address}:{port}/ -t ' +
                     str(self.get_option('threads')) + ' -e "' +
                     self.get_option('ext') + '" -f -q -w ' + wordlist +
                     ' --format=plain -o "{scandir}/{protocol}_{port}_{http_scheme}_dirsearch_'
                     + name + '.txt"')
         elif self.get_option('tool') == 'ffuf':
             await service.execute(
                 'ffuf -u {http_scheme}://{addressv6}:{port}/FUZZ -t ' +
                 str(self.get_option('threads')) + ' -w ' + wordlist +
                 ' -e "' + dot_extensions +
                 '" -v -noninteractive | tee {scandir}/{protocol}_{port}_{http_scheme}_ffuf_'
                 + name + '.txt')
         elif self.get_option('tool') == 'dirb':
             await service.execute(
                 'dirb {http_scheme}://{addressv6}:{port}/ ' + wordlist +
                 ' -l -r -S -X ",' + dot_extensions +
                 '" -o "{scandir}/{protocol}_{port}_{http_scheme}_dirb_' +
                 name + '.txt"')
Exemple #2
0
 async def run(self, target):
     # Only run UDP scan if user is root.
     if os.getuid() == 0:
         if target.ports:
             if target.ports['udp']:
                 process, stdout, stderr = await target.execute(
                     'nmap {nmap_extra} -sU -A --osscan-guess -p ' +
                     target.ports['udp'] +
                     ' -oN "{scandir}/_custom_ports_udp_nmap.txt" -oX "{scandir}/xml/_custom_ports_udp_nmap.xml" {address}',
                     blocking=False)
             else:
                 return []
         else:
             process, stdout, stderr = await target.execute(
                 'nmap {nmap_extra} -sU -A --top-ports 100 -oN "{scandir}/_top_100_udp_nmap.txt" -oX "{scandir}/xml/_top_100_udp_nmap.xml" {address}',
                 blocking=False)
         services = []
         while True:
             line = await stdout.readline()
             if line is not None:
                 match = re.search('^Discovered open port ([0-9]+)/udp',
                                   line)
                 if match:
                     info('Discovered open port {bmagenta}udp/' +
                          match.group(1) + '{rst} on {byellow}' +
                          target.address + '{rst}',
                          verbosity=1)
                 service = target.extract_service(line)
                 if service:
                     services.append(service)
             else:
                 break
         await process.wait()
         return services
     else:
         error('UDP scan requires AutoRecon be run with root privileges.')
Exemple #3
0
 def check(self):
     tool = self.get_option('tool')
     if tool == 'feroxbuster':
         if which('feroxbuster') is None:
             error(
                 'The feroxbuster program could not be found. Make sure it is installed. (On Kali, run: sudo apt install feroxbuster)'
             )
     elif tool == 'gobuster':
         if which('gobuster') is None:
             error(
                 'The gobuster program could not be found. Make sure it is installed. (On Kali, run: sudo apt install gobuster)'
             )
     elif tool == 'dirsearch':
         if which('dirsearch') is None:
             error(
                 'The dirsearch program could not be found. Make sure it is installed. (On Kali, run: sudo apt install dirsearch)'
             )
Exemple #4
0
 def check(self):
     if which('redis-cli') is None:
         error(
             'The redis-cli program could not be found. Make sure it is installed. (On Kali, run: sudo apt install redis-tools)'
         )
Exemple #5
0
 def error(self, msg, verbosity=0):
     plugin = inspect.currentframe().f_back.f_locals['self']
     error('{bright}[{yellow}' + self.address + '{crst}/{bgreen}' +
           plugin.slug + '{crst}]{rst} ' + msg)
Exemple #6
0
 def error(self, msg, verbosity=0):
     error('{bright}[{bgreen}' + self.slug + '{crst}]{rst} ' + msg)
Exemple #7
0
 def check(self):
     if which('wkhtmltoimage') is None:
         error(
             'The wkhtmltoimage program could not be found. Make sure it is installed. (On Kali, run: sudo apt install wkhtmltopdf)'
         )
Exemple #8
0
	def check(self):
		if which('oscanner') is None:
			error('The oscanner program could not be found. Make sure it is installed. (On Kali, run: sudo apt install oscanner)')
Exemple #9
0
	def check(self):
		if which('tnscmd10g') is None:
			error('The tnscmd10g program could not be found. Make sure it is installed. (On Kali, run: sudo apt install tnscmd10g)')