SpiderFoot automates OSINT for threat intelligence and mapping your attack surface.
Python attacksurfacecticybersecurityfootprintinghackinginformation-gatheringinformation-securityinfosecintelligence-gatheringosintosint-frameworkosint-reconnaissanceosint-toolpentestingpythonreconsecurity-toolsthreat-intelligencethreatintel
Allow custom headers to fetchUrl()
smicallef1c3d84b0b28a
diff --git a/sflib.py b/sflib.pyindex 768e0fde..0c478b58 100644--- a/sflib.py+++ b/sflib.py@@ -605,7 +605,7 @@ class SpiderFoot:# Fetch a URL, return the response objectdef fetchUrl(self, url, fatal=False, cookies=None, timeout=30,- useragent="SpiderFoot"):+ useragent="SpiderFoot", headers=None):result = {'code': None,'status': None,@@ -625,6 +625,11 @@ class SpiderFoot:else:header['User-Agent'] = useragent+ # Add custom headers+ if headers != None:+ for k in headers.keys():+ header[k] = headers[k]+req = urllib2.Request(url, None, header)if cookies != None:req.add_header('cookie', cookies)