Incredibly fast crawler designed for OSINT.
fixed a bug in dnsdumpster file saving
Somdev Sangwand76d6e25a19c
diff --git a/dnsdumpster.py b/dnsdumpster.pynew file mode 100644index 0000000..f826f79--- /dev/null+++ b/dnsdumpster.py@@ -0,0 +1,20 @@+import re+import requests++def dnsdumpster(domain, output_dir, colors):+ if colors:+ run = '\033[1;97m[~]\033[1;m'+ else:+ run = ''+ print ('%s Retrieving DNS related data' % run)+ response = requests.Session().get('https://dnsdumpster.com/').text+ csrf_token = re.search(r"name='csrfmiddlewaretoken' value='(.*?)'", response).group(1)++ cookies = {'csrftoken': csrf_token}+ headers = {'Referer': 'https://dnsdumpster.com/'}+ data = {'csrfmiddlewaretoken': csrf_token, 'targetip': domain}+ response = requests.Session().post('https://dnsdumpster.com/', cookies=cookies, data=data, headers=headers)++ image = requests.get('https://dnsdumpster.com/static/map/%s.png' % domain)+ with open('%s/%s.png' % (output_dir, domain), 'wb') as f:+ f.write(image.content)\ No newline at end of filediff --git a/photon.py b/photon.pyindex 07dc112..779c901 100644--- a/photon.py+++ b/photon.py@@ -456,7 +456,7 @@ if os.path.exists(output_dir): # if the directory already existsos.mkdir(output_dir) # create a new directoryif args.dns:- dnsdumpster(domain_name, colors)+ dnsdumpster(domain_name, output_dir, colors)if len(storage) > 0:with open('%s/links.txt' % output_dir, 'w+') as f:@@ -533,4 +533,4 @@ if args.export:if not colors: # if colors are disabledprint ('%s Results saved in %s directory' % (good, output_dir))else:- print ('%s Results saved in \033[;1m%s\033[0m directory' % (good, output_dir))+ print ('%s Results saved in \033[;1m%s\033[0m directory' % (good, output_dir))\ No newline at end of file