Merge c7596ccbc8
into 729d649ec5
This commit is contained in:
commit
608999679b
18
sublist3r.py
18
sublist3r.py
|
@ -102,6 +102,7 @@ def parse_args():
|
|||
parser.add_argument('-t', '--threads', help='Number of threads to use for subbrute bruteforce', type=int, default=30)
|
||||
parser.add_argument('-e', '--engines', help='Specify a comma-separated list of search engines')
|
||||
parser.add_argument('-o', '--output', help='Save the results to text file')
|
||||
parser.add_argument('-vt', '--virustotal_apikey', help='Virustotal API Key', default='<your-apikey>')
|
||||
parser.add_argument('-n', '--no-color', help='Output without color', default=False, action='store_true')
|
||||
return parser.parse_args()
|
||||
|
||||
|
@ -152,10 +153,10 @@ class enumratorBase(object):
|
|||
self.silent = silent
|
||||
self.verbose = verbose
|
||||
self.headers = {
|
||||
'User-Agent': 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36',
|
||||
'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8',
|
||||
'Accept-Language': 'en-US,en;q=0.8',
|
||||
'Accept-Encoding': 'gzip',
|
||||
'User-Agent': 'Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:105.0) Gecko/20100101 Firefox/105.0',
|
||||
'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8',
|
||||
'Accept-Language': 'en-US,en;q=0.5',
|
||||
'Accept-Encoding': 'gzip, deflate',
|
||||
}
|
||||
self.print_banner()
|
||||
|
||||
|
@ -676,7 +677,7 @@ class DNSdumpster(enumratorBaseThreaded):
|
|||
class Virustotal(enumratorBaseThreaded):
|
||||
def __init__(self, domain, subdomains=None, q=None, silent=False, verbose=True):
|
||||
subdomains = subdomains or []
|
||||
base_url = 'https://www.virustotal.com/ui/domains/{domain}/subdomains'
|
||||
base_url = 'https://www.virustotal.com/api/v3/domains/{domain}/subdomains'
|
||||
self.engine_name = "Virustotal"
|
||||
self.q = q
|
||||
super(Virustotal, self).__init__(base_url, self.engine_name, domain, subdomains, q=q, silent=silent, verbose=verbose)
|
||||
|
@ -686,7 +687,10 @@ class Virustotal(enumratorBaseThreaded):
|
|||
# the main send_req need to be rewritten
|
||||
def send_req(self, url):
|
||||
try:
|
||||
resp = self.session.get(url, headers=self.headers, timeout=self.timeout)
|
||||
global vt_apikey
|
||||
headers = dict(self.headers)
|
||||
headers['x-apikey'] = vt_apikey
|
||||
resp = self.session.get(url, headers=headers, timeout=self.timeout)
|
||||
except Exception as e:
|
||||
self.print_(e)
|
||||
resp = None
|
||||
|
@ -987,6 +991,7 @@ def main(domain, threads, savefile, ports, silent, verbose, enable_bruteforce, e
|
|||
|
||||
|
||||
def interactive():
|
||||
global vt_apikey
|
||||
args = parse_args()
|
||||
domain = args.domain
|
||||
threads = args.threads
|
||||
|
@ -995,6 +1000,7 @@ def interactive():
|
|||
enable_bruteforce = args.bruteforce
|
||||
verbose = args.verbose
|
||||
engines = args.engines
|
||||
vt_apikey = args.virustotal_apikey
|
||||
if verbose or verbose is None:
|
||||
verbose = True
|
||||
if args.no_color:
|
||||
|
|
Loading…
Reference in New Issue