Skip to content

Incredibly fast crawler designed for OSINT.

handling fld extract with tld

Joey Liechtyfa5d66578935
diff --git a/plugins/dnsdumpster.py b/plugins/dnsdumpster.py
index b289de3..e778c53 100644
--- a/plugins/dnsdumpster.py
+++ b/plugins/dnsdumpster.py
@@ -1,5 +1,6 @@
import re
import requests
+from tld import get_fld
def dnsdumpster(domain, output_dir, colors):
if colors:
@@ -15,6 +16,9 @@ def dnsdumpster(domain, output_dir, colors):
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)
+ image = requests.get('https://dnsdumpster.com/static/map/%s.png' % get_fld(domain))
+ if image.status_code == 200:
+ with open('%s/%s.png' % (output_dir, domain), 'wb') as f:
+ f.write(image.content)
+ else:
+ print ('%s Failed to retrieve DNS image' % run)
diff --git a/requirements.txt b/requirements.txt
index 804abb1..84aed2c 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -1,2 +1,3 @@
requests
urllib3
+tld
\ No newline at end of file