SpiderFoot automates OSINT for threat intelligence and mapping your attack surface.
Python attacksurfacecticybersecurityfootprintinghackinginformation-gatheringinformation-securityinfosecintelligence-gatheringosintosint-frameworkosint-reconnaissanceosint-toolpentestingpythonreconsecurity-toolsthreat-intelligencethreatintel
flake8: resolve flake8 violations
Brendan Colese5d296e71a98
diff --git a/modules/sfp_abusech.py b/modules/sfp_abusech.pyindex ced7d6e1..2869ccf8 100644--- a/modules/sfp_abusech.py+++ b/modules/sfp_abusech.py@@ -166,7 +166,7 @@ class sfp_abusech(SpiderFootPlugin):for line in data['content'].split('\n'):grp = re.findall(pat, line)if len(grp) > 0:- #self.sf.debug("Adding " + grp[0] + " to list.")+ # self.sf.debug("Adding " + grp[0] + " to list.")iplist.append(grp[0])else:iplist = data['content'].split('\n')diff --git a/modules/sfp_abuseipdb.py b/modules/sfp_abuseipdb.pyindex 543086ad..abc8697a 100644--- a/modules/sfp_abuseipdb.py+++ b/modules/sfp_abuseipdb.py@@ -152,7 +152,7 @@ class sfp_abuseipdb(SpiderFootPlugin):for line in data['content'].split('\n'):grp = re.findall(pat, line)if len(grp) > 0:- #self.sf.debug("Adding " + grp[0] + " to list.")+ # self.sf.debug("Adding " + grp[0] + " to list.")iplist.append(grp[0])else:iplist = data['content'].split('\n')diff --git a/modules/sfp_alienvaultiprep.py b/modules/sfp_alienvaultiprep.pyindex ed399277..d8dd666f 100644--- a/modules/sfp_alienvaultiprep.py+++ b/modules/sfp_alienvaultiprep.py@@ -132,7 +132,7 @@ class sfp_alienvaultiprep(SpiderFootPlugin):for line in data['content'].split('\n'):grp = re.findall(pat, line)if len(grp) > 0:- #self.sf.debug("Adding " + grp[0] + " to list.")+ # self.sf.debug("Adding " + grp[0] + " to list.")iplist.append(grp[0])else:iplist = data['content'].split('\n')diff --git a/modules/sfp_api_recon_dev.py b/modules/sfp_api_recon_dev.pyindex 39e9cd0d..7a224b10 100644--- a/modules/sfp_api_recon_dev.py+++ b/modules/sfp_api_recon_dev.py@@ -22,17 +22,28 @@ class sfp_api_recon_dev(SpiderFootPlugin):meta = {'name': "api.recon.dev",'summary': "Search api.recon.dev for subdomains.",- 'flags': [""],+ 'flags': ["apikey"],'useCases': ["Footprint", "Investigate", "Passive"],- 'categories': ["Passive DNS"]+ 'categories': ["Passive DNS"],+ "dataSource": {+ "website": "https://api.recon.dev",+ "references": ["https://recon.dev/api/docs"],+ "apiKeyInstructions": [+ "Visit https://recon.dev/",+ "Register an account",+ "Visit https://recon.dev/account and use the authentication token provided",+ ],+ }}opts = {+ "api_key": "","verify": True,"delay": 1}optdescs = {+ "api_key": "api.recon.dev API key.","verify": "Verify identified domains still resolve to the associated specified IP address.","delay": "Delay between requests, in seconds."}@@ -55,14 +66,17 @@ class sfp_api_recon_dev(SpiderFootPlugin):return ["RAW_RIR_DATA", "INTERNET_NAME"]def queryDomain(self, qry):+ """https://recon.dev/api/docs"""+headers = {"Accept": "application/json"}- params = {+ params = urllib.parse.urlencode({+ 'key': self.opts['api_key'],'domain': qry.encode('raw_unicode_escape').decode("ascii", errors='replace')- }+ })res = self.sf.fetchUrl(- 'https://api.recon.dev/search?' + urllib.parse.urlencode(params),+ f"https://api.recon.dev/api/search?{params}",headers=headers,timeout=30,useragent=self.opts['_useragent']@@ -79,6 +93,11 @@ class sfp_api_recon_dev(SpiderFootPlugin):self.errorState = Truereturn None+ if res['code'] == '500':+ self.sf.error("Error during request from either an inproper domain/API key or you have used up all your API credits for the month", False)+ self.errorState = True+ return None+# Catch all non-200 status codes, and presume something went wrongif res['code'] != '200':self.sf.error("Failed to retrieve content from api.recon.dev", False)@@ -120,13 +139,21 @@ class sfp_api_recon_dev(SpiderFootPlugin):self.sf.debug(f"Received event, {eventName}, from {srcModuleName}")+ if self.opts["api_key"] == "":+ self.sf.error(+ f"You enabled {self.__class__.__name__} but did not set an API key!",+ False,+ )+ self.errorState = True+ return None+if eventName not in ["DOMAIN_NAME"]:return Nonedata = self.queryDomain(eventData)if data is None:- self.sf.debug("No information found for domain " + eventData)+ self.sf.debug(f"No information found for domain {eventData}")return Noneevt = SpiderFootEvent('RAW_RIR_DATA', str(data), self.__name__, event)@@ -151,7 +178,7 @@ class sfp_api_recon_dev(SpiderFootPlugin):continueif self.opts['verify'] and not self.sf.resolveHost(domain):- self.sf.debug("Host %s could not be resolved" % domain)+ self.sf.debug(f"Host {domain} could not be resolved")evt = SpiderFootEvent("INTERNET_NAME_UNRESOLVED", domain, self.__name__, event)self.notifyListeners(evt)else:diff --git a/modules/sfp_bambenek.py b/modules/sfp_bambenek.pyindex ff4f31d2..3c88344a 100644--- a/modules/sfp_bambenek.py+++ b/modules/sfp_bambenek.py@@ -146,7 +146,7 @@ class sfp_bambenek(SpiderFootPlugin):for line in data['content'].split('\n'):grp = re.findall(pat, line)if len(grp) > 0:- #self.sf.debug("Adding " + grp[0] + " to list.")+ # self.sf.debug("Adding " + grp[0] + " to list.")iplist.append(grp[0])else:iplist = data['content'].split('\n')diff --git a/modules/sfp_base64.py b/modules/sfp_base64.pyindex b72f6b0f..7872d9be 100644--- a/modules/sfp_base64.py+++ b/modules/sfp_base64.py@@ -72,7 +72,7 @@ class sfp_base64(SpiderFootPlugin):# Base64-encoded strings don't look like normal stringscaps = sum(1 for c in match if c.isupper())- if caps < (minlen/4):+ if caps < (minlen / 4):continueif type(match) != str:diff --git a/modules/sfp_binaryedge.py b/modules/sfp_binaryedge.pyindex e72ba575..7b0abced 100644--- a/modules/sfp_binaryedge.py+++ b/modules/sfp_binaryedge.py@@ -231,16 +231,16 @@ class sfp_binaryedge(SpiderFootPlugin):evtType = "CO_HOSTED_SITE"ret = self.query(eventData, "passive")if ret is None:- self.sf.info("No Passive DNS info for " + eventData)+ self.sf.info(f"No Passive DNS info for {eventData}")return Nonefor rec in ret:- if "events" not in rec:+ events = rec.get('events')+ if not events:continueself.sf.debug("Found passive DNS results in BinaryEdge.io")- res = rec["events"]- for rec in res:+ for rec in events:host = rec['domain']if host == eventData:continue@@ -263,45 +263,46 @@ class sfp_binaryedge(SpiderFootPlugin):self.cohostcount += 1if eventName == "EMAILADDR":- evtType = "EMAILADDR_COMPROMISED"ret = self.query(eventData, "email")if ret is None:- self.sf.info("No leak info for " + eventData)+ self.sf.info(f"No leak info for {eventData}")return Nonefor rec in ret:- if "events" not in rec:+ events = rec.get('events')+ if not events:continueself.sf.debug("Found compromised account results in BinaryEdge.io")- res = rec["events"]- for rec in res:- e = SpiderFootEvent(evtType, eventData + " [" + rec + "]", self.__name__, event)++ for leak in events:+ e = SpiderFootEvent('EMAILADDR_COMPROMISED', f"{eventData} [{leak}]", self.__name__, event)self.notifyListeners(e)if eventName == "DOMAIN_NAME":- evtType = "INTERNET_NAME"ret = self.query(eventData, "subs")if ret is None:self.sf.info("No hosts found for " + eventData)return Nonefor rec in ret:- if "events" not in rec:+ events = rec.get('events')+ if not events:continueself.sf.debug("Found host results in BinaryEdge.io")- res = rec["events"]- for rec in res:+ for rec in events:if rec in self.reportedhosts:continue- else:- self.reportedhosts[rec] = True++ self.reportedhosts[rec] = True+if self.opts['verify']:if not self.sf.resolveHost(rec):- self.sf.debug("Couldn't resolve " + rec + ", so skipping.")+ self.sf.debug(f"Couldn't resolve {rec}, so skipping.")continue- e = SpiderFootEvent(evtType, rec, self.__name__, event)++ e = SpiderFootEvent('INTERNET_NAME', rec, self.__name__, event)self.notifyListeners(e)for addr in qrylist:@@ -311,26 +312,27 @@ class sfp_binaryedge(SpiderFootPlugin):if addr in self.checkedips:continue- evtType = "MALICIOUS_IPADDR"ret = self.query(eventData, "torrent")if ret is None:- self.sf.info("No torrent info for " + eventData)+ self.sf.info(f"No torrent info for {eventData}")return Nonefor rec in ret:- if "events" not in rec:+ events = rec.get('events')+ if not events:continueself.sf.debug("Found torrent results in BinaryEdge.io")- res = rec["events"]- for rec in res:+ for rec in events:created_ts = rec['origin'].get('ts') / 1000age_limit_ts = int(time.time()) - (86400 * self.opts['torrent_age_limit_days'])+if self.opts['torrent_age_limit_days'] > 0 and created_ts < age_limit_ts:self.sf.debug("Record found but too old, skipping.")continue+dat = "Torrent: " + rec.get("torrent", "???").get("name") + " @ " + rec.get('torrent').get("source", "???")- e = SpiderFootEvent(evtType, dat, self.__name__, event)+ e = SpiderFootEvent('MALICIOUS_IPADDR', dat, self.__name__, event)self.notifyListeners(e)for addr in qrylist:@@ -340,29 +342,32 @@ class sfp_binaryedge(SpiderFootPlugin):if addr in self.checkedips:continue- evtType = "VULNERABILITY"ret = self.query(eventData, "vuln")if ret is None:- self.sf.info("No vulnerability info for " + eventData)+ self.sf.info(f"No vulnerability info for {eventData}")return Nonefor rec in ret:- if "events" not in rec:+ events = rec.get('events')+ if not events:continue- if "results" not in rec['events']:++ results = events.get('results')+ if not results:continueself.sf.debug("Found vulnerability results in BinaryEdge.io")- res = rec["events"]["results"]- for rec in res:+ for rec in results:created_ts = rec.get('ts') / 1000age_limit_ts = int(time.time()) - (86400 * self.opts['cve_age_limit_days'])+if self.opts['cve_age_limit_days'] > 0 and created_ts < age_limit_ts:self.sf.debug("Record found but too old, skipping.")continue+for c in rec['cves']:cve = c['cve']- e = SpiderFootEvent(evtType, cve, self.__name__, event)+ e = SpiderFootEvent('VULNERABILITY', cve, self.__name__, event)self.notifyListeners(e)for addr in qrylist:@@ -374,35 +379,39 @@ class sfp_binaryedge(SpiderFootPlugin):ret = self.query(eventData, "ports")if ret is None:- self.sf.info("No port/banner info for " + eventData)+ self.sf.info(f"No port/banner info for {eventData}")return Nonefor rec in ret:- if "events" not in rec:+ events = rec.get('events')+ if not events:continueself.sf.debug("Found port/banner results in BinaryEdge.io")- allres = rec["events"]+ports = list()- for res in allres:+ for res in events:for prec in res['results']:created_ts = prec['origin'].get('ts') / 1000age_limit_ts = int(time.time()) - (86400 * self.opts['port_age_limit_days'])+if self.opts['port_age_limit_days'] > 0 and created_ts < age_limit_ts:self.sf.debug("Record found but too old, skipping.")continue- entity = prec['target']['ip'] + ":" + str(prec['target']['port'])+ port = str(prec['target']['port'])+ entity = prec['target']['ip'] + ":" + portevttype = "TCP_PORT_OPEN"evtbtype = "TCP_PORT_OPEN_BANNER"+if prec['target']['protocol'] == "udp":evttype = "UDP_PORT_OPEN"evtbtype = "UDP_PORT_OPEN_INFO"- if not evttype+":"+str(prec['target']['port']) in ports:+ if f"{evttype}:{port}" not in ports:ev = SpiderFootEvent(evttype, entity, self.__name__, event)self.notifyListeners(ev)- ports.append(evttype+":"+str(prec['target']['port']))+ ports.append(f"{evttype}:{port}")try:banner = prec['result']['data']['service']['banner']diff --git a/modules/sfp_bitcoin.py b/modules/sfp_bitcoin.pyindex a54206aa..f5d332a5 100644--- a/modules/sfp_bitcoin.py+++ b/modules/sfp_bitcoin.py@@ -53,7 +53,7 @@ class sfp_bitcoin(SpiderFootPlugin):def to_bytes(self, n, length):h = '%x' % n- s = codecs.decode(('0'*(len(h) % 2) + h).zfill(length*2), "hex")+ s = codecs.decode(('0' * (len(h) % 2) + h).zfill(length * 2), "hex")return sdef decode_base58(self, bc, length):diff --git a/modules/sfp_blocklistde.py b/modules/sfp_blocklistde.pyindex 2dc521d3..d44474fd 100644--- a/modules/sfp_blocklistde.py+++ b/modules/sfp_blocklistde.py@@ -132,7 +132,7 @@ class sfp_blocklistde(SpiderFootPlugin):for line in data['content'].split('\n'):grp = re.findall(pat, line)if len(grp) > 0:- #self.sf.debug("Adding " + grp[0] + " to list.")+ # self.sf.debug("Adding " + grp[0] + " to list.")iplist.append(grp[0])else:iplist = data['content'].split('\n')diff --git a/modules/sfp_botvrij.py b/modules/sfp_botvrij.pyindex 2bb9d48b..cb1ab800 100644--- a/modules/sfp_botvrij.py+++ b/modules/sfp_botvrij.py@@ -116,7 +116,7 @@ class sfp_botvrij(SpiderFootPlugin):for line in data['content'].split('\n'):grp = re.findall(pat, line)if len(grp) > 0:- #self.sf.debug("Adding " + grp[0] + " to list.")+ # self.sf.debug("Adding " + grp[0] + " to list.")iplist.append(grp[0])else:iplist = data['content'].split('\n')diff --git a/modules/sfp_builtwith.py b/modules/sfp_builtwith.pyindex af0561ec..4ec973cb 100644--- a/modules/sfp_builtwith.py+++ b/modules/sfp_builtwith.py@@ -1,4 +1,4 @@-#-------------------------------------------------------------------------------+# -------------------------------------------------------------------------------# Name: sfp_builtwith# Purpose: Query builtwith.com using their API.#@@ -7,7 +7,7 @@# Created: 10/08/2017# Copyright: (c) Steve Micallef# Licence: GPL-#-------------------------------------------------------------------------------+# -------------------------------------------------------------------------------import jsonimport timediff --git a/modules/sfp_callername.py b/modules/sfp_callername.pyindex 79f03e1f..5e2f1688 100644--- a/modules/sfp_callername.py+++ b/modules/sfp_callername.py@@ -1,4 +1,4 @@-#-------------------------------------------------------------------------------+# -------------------------------------------------------------------------------# Name: sfp_callername# Purpose: SpiderFoot plug-in to search CallerName.com for a phone number# (US only) and retrieve location and reputation information.@@ -8,7 +8,7 @@# Created: 2019-05-28# Copyright: (c) bcoles 2019# Licence: GPL-#-------------------------------------------------------------------------------+# -------------------------------------------------------------------------------import reimport timediff --git a/modules/sfp_censys.py b/modules/sfp_censys.pyindex c8d09e41..c7f05b17 100644--- a/modules/sfp_censys.py+++ b/modules/sfp_censys.py@@ -130,7 +130,7 @@ class sfp_censys(SpiderFootPlugin):self.sf.error(f"Error processing JSON response from Censys.io: {e}", False)return None- #print(str(info))+ # print(str(info))return info# Handle events sent to this modulediff --git a/modules/sfp_clearbit.py b/modules/sfp_clearbit.pyindex 6eb3566f..e4a242e0 100644--- a/modules/sfp_clearbit.py+++ b/modules/sfp_clearbit.py@@ -1,4 +1,4 @@-#-------------------------------------------------------------------------------+# -------------------------------------------------------------------------------# Name: sfp_clearbit# Purpose: Query clearbit.com using their API.#@@ -7,7 +7,7 @@# Created: 20/03/2017# Copyright: (c) Steve Micallef# Licence: GPL-#-------------------------------------------------------------------------------+# -------------------------------------------------------------------------------import base64import jsondiff --git a/modules/sfp_coinblocker.py b/modules/sfp_coinblocker.pyindex 26ef250f..e3f8101b 100644--- a/modules/sfp_coinblocker.py+++ b/modules/sfp_coinblocker.py@@ -144,7 +144,7 @@ class sfp_coinblocker(SpiderFootPlugin):for line in data['content'].split('\n'):grp = re.findall(pat, line)if len(grp) > 0:- #self.sf.debug("Adding " + grp[0] + " to list.")+ # self.sf.debug("Adding " + grp[0] + " to list.")iplist.append(grp[0])else:iplist = data['content'].split('\n')diff --git a/modules/sfp_customfeed.py b/modules/sfp_customfeed.pyindex 1558a875..d6d38bfd 100644--- a/modules/sfp_customfeed.py+++ b/modules/sfp_customfeed.py@@ -118,7 +118,7 @@ class sfp_customfeed(SpiderFootPlugin):for line in data['content'].split('\n'):grp = re.findall(pat, line)if len(grp) > 0:- #self.sf.debug("Adding " + grp[0] + " to list.")+ # self.sf.debug("Adding " + grp[0] + " to list.")iplist.append(grp[0])else:iplist = data['content'].split('\n')diff --git a/modules/sfp_cybercrimetracker.py b/modules/sfp_cybercrimetracker.pyindex 6f1b3dc3..b212d701 100644--- a/modules/sfp_cybercrimetracker.py+++ b/modules/sfp_cybercrimetracker.py@@ -128,7 +128,7 @@ class sfp_cybercrimetracker(SpiderFootPlugin):for line in data['content'].split('\n'):grp = re.findall(pat, line)if len(grp) > 0:- #self.sf.debug("Adding " + grp[0] + " to list.")+ # self.sf.debug("Adding " + grp[0] + " to list.")iplist.append(grp[0])else:iplist = data['content'].split('\n')diff --git a/modules/sfp_dnsresolve.py b/modules/sfp_dnsresolve.pyindex 19b38b23..262401f7 100644--- a/modules/sfp_dnsresolve.py+++ b/modules/sfp_dnsresolve.py@@ -189,7 +189,7 @@ class sfp_dnsresolve(SpiderFootPlugin):start = offset - 100# Get up to 100 bytes before the name to try and get hostnames- chunkhost = data[start:(offset+start+len(name)+1)]+ chunkhost = data[start:(offset + start + len(name) + 1)]try:matches = re.findall(pat, chunkhost)if matches:@@ -201,7 +201,7 @@ class sfp_dnsresolve(SpiderFootPlugin):m = matchself.processHost(m, parentEvent, False)except Exception as e:- self.sf.error("Error applying regex to data (" + str(e) + ")", False)+ self.sf.error(f"Error applying regex to data ({e})", False)offset = data.find(name, start + len(chunkhost))@@ -222,7 +222,7 @@ class sfp_dnsresolve(SpiderFootPlugin):if "::" in eventData:return None- self.sf.debug("Looking up IPs in owned netblock: " + eventData)+ self.sf.debug(f"Looking up IPs in owned netblock: {eventData}")for ip in IPNetwork(eventData):ipaddr = str(ip)if "::" in ipaddr:@@ -237,8 +237,7 @@ class sfp_dnsresolve(SpiderFootPlugin):addrs = self.sf.resolveIP(ipaddr)if addrs:- self.sf.debug("Found a reversed hostname from " + ipaddr +- " (" + str(addrs) + ")")+ self.sf.debug(f"Found a reversed hostname from {ipaddr} ({addrs})")for addr in addrs:# Generate an event for the IP, then# let the handling by this module take@@ -376,12 +375,12 @@ class sfp_dnsresolve(SpiderFootPlugin):return evtdef processDomain(self, domainName, parentEvent, affil=False, host=None):- if domainName not in self.domresults:- self.domresults[domainName] = True- else:- self.sf.debug("Skipping domain, " + domainName + ", already processed.")+ if domainName in self.domresults:+ self.sf.debug(f"Skipping domain, {domainName}, already processed.")return None+ self.domresults[domainName] = True+if affil:domevt = SpiderFootEvent("AFFILIATE_DOMAIN_NAME", domainName,self.__name__, parentEvent)diff --git a/modules/sfp_filemeta.py b/modules/sfp_filemeta.pyindex 11c552ba..7f3b3ca2 100644--- a/modules/sfp_filemeta.py+++ b/modules/sfp_filemeta.py@@ -104,7 +104,7 @@ class sfp_filemeta(SpiderFootPlugin):if fileExt.lower() == "pdf":try:raw = io.BytesIO(ret['content'])- #data = metapdf.MetaPdfReader().read_metadata(raw)+ # data = metapdf.MetaPdfReader().read_metadata(raw)pdf = PyPDF2.PdfFileReader(raw, strict=False)data = pdf.getDocumentInfo()meta = str(data)diff --git a/modules/sfp_fullcontact.py b/modules/sfp_fullcontact.pyindex bbdb2613..982559bb 100644--- a/modules/sfp_fullcontact.py+++ b/modules/sfp_fullcontact.py@@ -1,4 +1,4 @@-#-------------------------------------------------------------------------------+# -------------------------------------------------------------------------------# Name: sfp_fullcontact# Purpose: Query fullcontact.com using their API.#@@ -7,7 +7,7 @@# Created: 06/02/2018# Copyright: (c) Steve Micallef# Licence: GPL-#-------------------------------------------------------------------------------+# -------------------------------------------------------------------------------import jsonimport timediff --git a/modules/sfp_github.py b/modules/sfp_github.pyindex 0f5b1244..671e7add 100644--- a/modules/sfp_github.py+++ b/modules/sfp_github.py@@ -111,7 +111,7 @@ class sfp_github(SpiderFootPlugin):try:urlParts = url.split("/")- username = urlParts[len(urlParts)-1]+ username = urlParts[len(urlParts) - 1]except BaseException:self.sf.debug(f"Couldn't get a username out of {url}")return Nonediff --git a/modules/sfp_gravatar.py b/modules/sfp_gravatar.pyindex f7dc38a7..ad2905a9 100644--- a/modules/sfp_gravatar.py+++ b/modules/sfp_gravatar.py@@ -1,4 +1,4 @@-#-------------------------------------------------------------------------------+# -------------------------------------------------------------------------------# Name: sfp_gravatar# Purpose: SpiderFoot plug-in to search Gravatar API for an email address# and retrieve user information, including username, name, phone@@ -9,7 +9,7 @@# Created: 2019-05-26# Copyright: (c) bcoles 2019# Licence: GPL-#-------------------------------------------------------------------------------+# -------------------------------------------------------------------------------import hashlibimport json@@ -141,14 +141,15 @@ class sfp_gravatar(SpiderFootPlugin):evt = SpiderFootEvent("HUMAN_NAME", name.get('formatted'), self.__name__, event)self.notifyListeners(evt)+ # TODO: re-enable once location validation is implemented# location can not be trusted- #if data.get('currentLocation') is not None:- # location = data.get('currentLocation')- # if len(location) < 3 or len(location) > 100:- # self.sf.debug("Skipping likely invalid location.")- # else:- # evt = SpiderFootEvent("GEOINFO", location, self.__name__, event)- # self.notifyListeners(evt)+ # if data.get('currentLocation') is not None:+ # location = data.get('currentLocation')+ # if len(location) < 3 or len(location) > 100:+ # self.sf.debug("Skipping likely invalid location.")+ # else:+ # evt = SpiderFootEvent("GEOINFO", location, self.__name__, event)+ # self.notifyListeners(evt)if data.get('phoneNumbers') is not None:for number in data.get('phoneNumbers'):diff --git a/modules/sfp_greynoise.py b/modules/sfp_greynoise.pyindex 394c2432..2f656027 100644--- a/modules/sfp_greynoise.py+++ b/modules/sfp_greynoise.py@@ -59,7 +59,7 @@ class sfp_greynoise(SpiderFootPlugin):'maxnetblock': 24,'subnetlookup': True,'maxsubnet': 24- #'asnlookup': True+ # 'asnlookup': True}# Option descriptions@@ -70,7 +70,7 @@ class sfp_greynoise(SpiderFootPlugin):'maxnetblock': "If looking up owned netblocks, the maximum netblock size to look up all IPs within (CIDR value, 24 = /24, 16 = /16, etc.)",'subnetlookup': "Look up subnets which your target is a part of for blacklisting?",'maxsubnet': "If looking up subnets, the maximum subnet size to look up all the IPs within (CIDR value, 24 = /24, 16 = /16, etc.)"- #'asnlookup': "Look up ASNs that your target is a member of?"+ # 'asnlookup': "Look up ASNs that your target is a member of?"}# Be sure to completely clear any class variables in setup()diff --git a/modules/sfp_h1nobbdde.py b/modules/sfp_h1nobbdde.pyindex 1b65b1a9..6e359736 100644--- a/modules/sfp_h1nobbdde.py+++ b/modules/sfp_h1nobbdde.py@@ -1,4 +1,4 @@-#-------------------------------------------------------------------------------+# -------------------------------------------------------------------------------# Name: sfp_h1.nobbd.de# Purpose: Query the the unofficial HackerOne disclosure timeline database# to see if our target appears.@@ -7,7 +7,7 @@# Created: 28/10/2018# Copyright: (c) Dhiraj Mishra# Licence: GPL-#-------------------------------------------------------------------------------+# -------------------------------------------------------------------------------import rediff --git a/modules/sfp_haveibeenpwned.py b/modules/sfp_haveibeenpwned.pyindex c54afbf7..7839f5a3 100644--- a/modules/sfp_haveibeenpwned.py+++ b/modules/sfp_haveibeenpwned.py@@ -1,4 +1,4 @@-#-------------------------------------------------------------------------------+# -------------------------------------------------------------------------------# Name: sfp_haveibeenpwned# Purpose: Query haveibeenpwned.com to see if an e-mail account has been hacked.#@@ -7,7 +7,7 @@# Created: 19/02/2015# Copyright: (c) Steve Micallef# Licence: GPL-#-------------------------------------------------------------------------------+# -------------------------------------------------------------------------------import jsonimport timediff --git a/modules/sfp_hunter.py b/modules/sfp_hunter.pyindex 23a9b778..a86a9a84 100644--- a/modules/sfp_hunter.py+++ b/modules/sfp_hunter.py@@ -1,4 +1,4 @@-#-------------------------------------------------------------------------------+# -------------------------------------------------------------------------------# Name: sfp_hunter# Purpose: Query hunter.io using their API.#@@ -7,7 +7,7 @@# Created: 22/02/2017# Copyright: (c) Steve Micallef# Licence: GPL-#-------------------------------------------------------------------------------+# -------------------------------------------------------------------------------import jsonimport urllib.errordiff --git a/modules/sfp_iknowwhatyoudownload.py b/modules/sfp_iknowwhatyoudownload.pyindex 5acc925a..b456e306 100644--- a/modules/sfp_iknowwhatyoudownload.py+++ b/modules/sfp_iknowwhatyoudownload.py@@ -1,4 +1,4 @@-#-------------------------------------------------------------------------------+# -------------------------------------------------------------------------------# Name: sfp_iknowwhatyoudownload# Purpose: Query iknowwhatyoudownload.com for IP addresses using BitTorrent.#@@ -7,7 +7,7 @@# Created: 03/09/2018# Copyright: (c) Steve Micallef# Licence: GPL-#-------------------------------------------------------------------------------+# -------------------------------------------------------------------------------import jsondiff --git a/modules/sfp_instagram.py b/modules/sfp_instagram.pyindex 778b7ddc..4dbb269e 100644--- a/modules/sfp_instagram.py+++ b/modules/sfp_instagram.py@@ -1,4 +1,4 @@-#-------------------------------------------------------------------------------+# -------------------------------------------------------------------------------# Name: sfp_instagram# Purpose: Gather information from Instagram profiles.#@@ -7,7 +7,7 @@# Created: 2019-07-11# Copyright: (c) bcoles 2019# Licence: GPL-#-------------------------------------------------------------------------------+# -------------------------------------------------------------------------------import jsonimport rediff --git a/modules/sfp_intelx.py b/modules/sfp_intelx.pyindex 0d00723e..cbca7061 100644--- a/modules/sfp_intelx.py+++ b/modules/sfp_intelx.py@@ -143,8 +143,8 @@ class sfp_intelx(SpiderFootPlugin):return Noneif ret.get('status', -1) == 0:- #Craft API URL with the id to return results- resulturl = url + "/result?id=%s" % str(ret['id'])+ # Craft API URL with the id to return results+ resulturl = f"{url}/result?id={ret['id']}"limit = 30count = 0status = 3 # status 3 = No results yet, keep trying. 0 = Success with results@@ -169,7 +169,7 @@ class sfp_intelx(SpiderFootPlugin):retdata.append(ret)# No more results leftif status == 1:- #print data in json format to manipulate as desired+ # print data in json format to manipulate as desiredbreaktime.sleep(1)@@ -192,12 +192,11 @@ class sfp_intelx(SpiderFootPlugin):self.sf.debug(f"Received event, {eventName}, from {srcModuleName}")- # Don't look up stuff twiceif eventData in self.results:self.sf.debug(f"Skipping {eventData}, already checked.")return None- else:- self.results[eventData] = True++ self.results[eventData] = Trueif eventName.startswith("AFFILIATE") and not self.opts['checkaffiliates']:return None@@ -229,10 +228,10 @@ class sfp_intelx(SpiderFootPlugin):val = rec['name']if not val or not evt:- self.sf.debug("Unexpected record, skipping (" + str(rec['bucket'] + ")"))+ self.sf.debug(f"Unexpected record, skipping ({rec['bucket']})")continueexcept BaseException as e:- self.sf.error("Error processing content from IntelX: " + str(e), False)+ self.sf.error(f"Error processing content from IntelX: {e}", False)continue# Notify other modules of what you've found@@ -246,7 +245,7 @@ class sfp_intelx(SpiderFootPlugin):if data is None:return None- self.sf.info("Found IntelligenceX host and email data for " + eventData)+ self.sf.info(f"Found IntelligenceX host and email data for {eventData}")for info in data:for rec in info.get("selectors", dict()):try:@@ -267,7 +266,7 @@ class sfp_intelx(SpiderFootPlugin):self.sf.debug("Unexpected record, skipping.")continueexcept BaseException as e:- self.sf.error("Error processing content from IntelX: " + str(e), False)+ self.sf.error(f"Error processing content from IntelX: {e}", False)continue# Notify other modules of what you've founddiff --git a/modules/sfp_malwaredomainlist.py b/modules/sfp_malwaredomainlist.pyindex 434588ab..9af3fdc0 100644--- a/modules/sfp_malwaredomainlist.py+++ b/modules/sfp_malwaredomainlist.py@@ -141,7 +141,7 @@ class sfp_malwaredomainlist(SpiderFootPlugin):for line in data['content'].split('\n'):grp = re.findall(pat, line)if len(grp) > 0:- #self.sf.debug("Adding " + grp[0] + " to list.")+ # self.sf.debug("Adding " + grp[0] + " to list.")iplist.append(grp[0])else:iplist = data['content'].split('\n')diff --git a/modules/sfp_malwaredomains.py b/modules/sfp_malwaredomains.pyindex b24175cc..2225d878 100644--- a/modules/sfp_malwaredomains.py+++ b/modules/sfp_malwaredomains.py@@ -128,7 +128,7 @@ class sfp_malwaredomains(SpiderFootPlugin):for line in data['content'].split('\n'):grp = re.findall(pat, line)if len(grp) > 0:- #self.sf.debug("Adding " + grp[0] + " to list.")+ # self.sf.debug("Adding " + grp[0] + " to list.")iplist.append(grp[0])else:iplist = data['content'].split('\n')diff --git a/modules/sfp_multiproxy.py b/modules/sfp_multiproxy.pyindex a372c16c..3d475bbf 100644--- a/modules/sfp_multiproxy.py+++ b/modules/sfp_multiproxy.py@@ -128,7 +128,7 @@ class sfp_multiproxy(SpiderFootPlugin):for line in data['content'].split('\n'):grp = re.findall(pat, line)if len(grp) > 0:- #self.sf.debug("Adding " + grp[0] + " to list.")+ # self.sf.debug("Adding " + grp[0] + " to list.")iplist.append(grp[0])else:iplist = data['content'].split('\n')diff --git a/modules/sfp_myspace.py b/modules/sfp_myspace.pyindex 82010d15..19d60fdb 100644--- a/modules/sfp_myspace.py+++ b/modules/sfp_myspace.py@@ -1,4 +1,4 @@-#-------------------------------------------------------------------------------+# -------------------------------------------------------------------------------# Name: sfp_myspace# Purpose: Query MySpace for username and location information.#@@ -7,7 +7,7 @@# Created: 2018-10-07# Copyright: (c) bcoles 2018# Licence: GPL-#-------------------------------------------------------------------------------+# -------------------------------------------------------------------------------import rediff --git a/modules/sfp_numverify.py b/modules/sfp_numverify.pyindex 77b7d27e..91a631ca 100644--- a/modules/sfp_numverify.py+++ b/modules/sfp_numverify.py@@ -1,4 +1,4 @@-#-------------------------------------------------------------------------------+# -------------------------------------------------------------------------------# Name: sfp_numverify# Purpose: SpiderFoot plug-in to search numverify.com API for a phone number# and retrieve location and carrier information.@@ -8,7 +8,7 @@# Created: 2019-05-25# Copyright: (c) bcoles 2019# Licence: GPL-#-------------------------------------------------------------------------------+# -------------------------------------------------------------------------------import jsonimport timediff --git a/modules/sfp_open_passive_dns_database.py b/modules/sfp_open_passive_dns_database.pyindex 05de3703..35448d8c 100644--- a/modules/sfp_open_passive_dns_database.py+++ b/modules/sfp_open_passive_dns_database.py@@ -154,13 +154,13 @@ class sfp_open_passive_dns_database(SpiderFootPlugin):if self.errorState:return None- #first_seen = record[0]- #last_seen = record[1]+ # first_seen = record[0]+ # last_seen = record[1]query_html = record[2]answer_type = record[3]answer_html = record[4]- #ttl = record[5]- #count = record[6]+ # ttl = record[5]+ # count = record[6]# Extract queries and answers from HTML, and append all in-scope records to the domains list for parsingr = re.findall(r'>(.+?)<', query_html, re.DOTALL)diff --git a/modules/sfp_openbugbounty.py b/modules/sfp_openbugbounty.pyindex 0949ddea..e5df6a72 100644--- a/modules/sfp_openbugbounty.py+++ b/modules/sfp_openbugbounty.py@@ -1,4 +1,4 @@-#-------------------------------------------------------------------------------+# -------------------------------------------------------------------------------# Name: sfp_openbugbounty# Purpose: Query the Open Bug Bounty database to see if our target appears.#@@ -7,7 +7,7 @@# Created: 04/10/2015# Copyright: (c) Steve Micallef# Licence: GPL-#-------------------------------------------------------------------------------+# -------------------------------------------------------------------------------import re@@ -88,7 +88,7 @@ class sfp_openbugbounty(SpiderFootPlugin):rx = re.compile(".*<div class=.cell1.><a href=.(.*).>(.*" + qry + ").*?</a></div>.*", re.IGNORECASE)for m in rx.findall(res['content']):# Report it- if m[1] == qry or m[1].endswith("."+qry):+ if m[1] == qry or m[1].endswith("." + qry):ret.append("From openbugbounty.org: <SFURL>" + base + m[0] + "</SFURL>")except Exception as e:self.sf.error("Error processing response from openbugbounty.org: " + str(e), False)diff --git a/modules/sfp_openphish.py b/modules/sfp_openphish.pyindex 1ca32b93..0d242ec6 100644--- a/modules/sfp_openphish.py+++ b/modules/sfp_openphish.py@@ -127,7 +127,7 @@ class sfp_openphish(SpiderFootPlugin):for line in data['content'].split('\n'):grp = re.findall(pat, line)if len(grp) > 0:- #self.sf.debug("Adding " + grp[0] + " to list.")+ # self.sf.debug("Adding " + grp[0] + " to list.")iplist.append(grp[0])else:iplist = data['content'].split('\n')diff --git a/modules/sfp_phishtank.py b/modules/sfp_phishtank.pyindex 5bfed1ae..b4b34a71 100644--- a/modules/sfp_phishtank.py+++ b/modules/sfp_phishtank.py@@ -123,7 +123,7 @@ class sfp_phishtank(SpiderFootPlugin):for line in data['content'].split('\n'):grp = re.findall(pat, line)if len(grp) > 0:- #self.sf.debug("Adding " + grp[0] + " to list.")+ # self.sf.debug("Adding " + grp[0] + " to list.")iplist.append(grp[0])else:iplist = data['content'].split('\n')diff --git a/modules/sfp_phone.py b/modules/sfp_phone.pyindex 6b753121..6106ecc9 100644--- a/modules/sfp_phone.py+++ b/modules/sfp_phone.py@@ -15,7 +15,7 @@import phonenumbersfrom phonenumbers import carrier-#from phonenumbers import geocoder+# from phonenumbers import geocoderfrom spiderfoot import SpiderFootEvent, SpiderFootPlugin@@ -102,17 +102,17 @@ class sfp_phone(SpiderFootPlugin):else:self.sf.debug("No carrier information found for " + eventData)- #try:- # location = geocoder.description_for_number(number, 'en')- #except BaseException as e:- # self.sf.debug('Error retrieving phone number location: ' + str(e))- # return None-- #if location:- # evt = SpiderFootEvent("GEOINFO", location, self.__name__, event)- # self.notifyListeners(evt)- #else:- # self.sf.debug("No location information found for " + eventData)+ # try:+ # location = geocoder.description_for_number(number, 'en')+ # except BaseException as e:+ # self.sf.debug('Error retrieving phone number location: ' + str(e))+ # return None++ # if location:+ # evt = SpiderFootEvent("GEOINFO", location, self.__name__, event)+ # self.notifyListeners(evt)+ # else:+ # self.sf.debug("No location information found for " + eventData)return Nonediff --git a/modules/sfp_psbdmp.py b/modules/sfp_psbdmp.pyindex 24766f8f..50538d8e 100644--- a/modules/sfp_psbdmp.py+++ b/modules/sfp_psbdmp.py@@ -1,4 +1,4 @@-#-------------------------------------------------------------------------------+# -------------------------------------------------------------------------------# Name: sfp_psbdmp# Purpose: Query psbdmp.cc for potentially hacked e-mail addresses.#@@ -7,7 +7,7 @@# Created: 21/11/2016# Copyright: (c) Steve Micallef# Licence: GPL-#-------------------------------------------------------------------------------+# -------------------------------------------------------------------------------import jsonimport rediff --git a/modules/sfp_scylla.py b/modules/sfp_scylla.pyindex 05452610..f41adae4 100644--- a/modules/sfp_scylla.py+++ b/modules/sfp_scylla.py@@ -1,4 +1,4 @@-#-------------------------------------------------------------------------------+# -------------------------------------------------------------------------------# Name: sfp_scylla# Purpose: Gather breach data from Scylla API.#@@ -7,7 +7,7 @@# Created: 2019-09-06# Copyright: (c) bcoles 2019# Licence: GPL-#-------------------------------------------------------------------------------+# -------------------------------------------------------------------------------import base64import json@@ -153,8 +153,8 @@ class sfp_scylla(SpiderFootPlugin):position += per_page- #evt = SpiderFootEvent('RAW_RIR_DATA', str(data), self.__name__, event)- #self.notifyListeners(evt)+ # evt = SpiderFootEvent('RAW_RIR_DATA', str(data), self.__name__, event)+ # self.notifyListeners(evt)for result in data:source = result.get('_source')diff --git a/modules/sfp_securitytrails.py b/modules/sfp_securitytrails.pyindex 86590d75..b9b0a1b3 100644--- a/modules/sfp_securitytrails.py+++ b/modules/sfp_securitytrails.py@@ -133,7 +133,7 @@ class sfp_securitytrails(SpiderFootPlugin):accum.extend(info.get('records'))else:accum = info.get('records')- return self.query(qry, querytype, page+1, accum)+ return self.query(qry, querytype, page + 1, accum)else:# We are at the last pageaccum.extend(info.get('records', []))diff --git a/modules/sfp_similar.py b/modules/sfp_similar.pyindex 4c62e8df..7a51dc17 100644--- a/modules/sfp_similar.py+++ b/modules/sfp_similar.py@@ -142,7 +142,7 @@ class sfp_similar(SpiderFootPlugin):# Search for double character domainspos = 0for c in dom:- domlist.append(dom[0:pos] + c + c + dom[(pos+1):len(dom)])+ domlist.append(dom[0:pos] + c + c + dom[(pos + 1):len(dom)])pos += 1for d in domlist:diff --git a/modules/sfp_slideshare.py b/modules/sfp_slideshare.pyindex cd05ea3a..e0eeac69 100644--- a/modules/sfp_slideshare.py+++ b/modules/sfp_slideshare.py@@ -1,4 +1,4 @@-#-------------------------------------------------------------------------------+# -------------------------------------------------------------------------------# Name: sfp_slideshare# Purpose: Query SlideShare for name and location information.#@@ -7,7 +7,7 @@# Created: 2018-10-15# Copyright: (c) bcoles 2018# Licence: GPL-#-------------------------------------------------------------------------------+# -------------------------------------------------------------------------------import rediff --git a/modules/sfp_talosintel.py b/modules/sfp_talosintel.pyindex 9ba6db2f..7c5be4ef 100644--- a/modules/sfp_talosintel.py+++ b/modules/sfp_talosintel.py@@ -132,7 +132,7 @@ class sfp_talosintel(SpiderFootPlugin):for line in data['content'].split('\n'):grp = re.findall(pat, line)if len(grp) > 0:- #self.sf.debug("Adding " + grp[0] + " to list.")+ # self.sf.debug("Adding " + grp[0] + " to list.")iplist.append(grp[0])else:iplist = data['content'].split('\n')diff --git a/modules/sfp_torexits.py b/modules/sfp_torexits.pyindex 70dcb584..914edde7 100644--- a/modules/sfp_torexits.py+++ b/modules/sfp_torexits.py@@ -117,7 +117,7 @@ class sfp_torexits(SpiderFootPlugin):for line in data['content'].split('\n'):grp = re.findall(pat, line)if len(grp) > 0:- #self.sf.debug("Adding " + grp[0] + " to list.")+ # self.sf.debug("Adding " + grp[0] + " to list.")iplist.append(grp[0])else:iplist = data['content'].split('\n')diff --git a/modules/sfp_twitter.py b/modules/sfp_twitter.pyindex f2d7324b..ddeb779e 100644--- a/modules/sfp_twitter.py+++ b/modules/sfp_twitter.py@@ -1,4 +1,4 @@-#-------------------------------------------------------------------------------+# -------------------------------------------------------------------------------# Name: sfp_twitter# Purpose: Query Twitter for name and location information.#@@ -7,7 +7,7 @@# Created: 2018-10-17# Copyright: (c) bcoles 2018# Licence: GPL-#-------------------------------------------------------------------------------+# -------------------------------------------------------------------------------import rediff --git a/modules/sfp_venmo.py b/modules/sfp_venmo.pyindex b97e1e80..d1e0be73 100644--- a/modules/sfp_venmo.py+++ b/modules/sfp_venmo.py@@ -1,4 +1,4 @@-#-------------------------------------------------------------------------------+# -------------------------------------------------------------------------------# Name: sfp_venmo# Purpose: Gather user information from Venmo API.#@@ -7,7 +7,7 @@# Created: 2019-07-16# Copyright: (c) bcoles 2019# Licence: GPL-#-------------------------------------------------------------------------------+# -------------------------------------------------------------------------------import jsonimport timediff --git a/modules/sfp_viewdns.py b/modules/sfp_viewdns.pyindex 862da454..06b2454c 100644--- a/modules/sfp_viewdns.py+++ b/modules/sfp_viewdns.py@@ -133,7 +133,7 @@ class sfp_viewdns(SpiderFootPlugin):if len(r.get(responsekey, list())) == pagesize:self.sf.debug("Looping at ViewDNS page " + str(page))self.accum.extend(r.get(responsekey))- self.query(qry, querytype, page+1)+ self.query(qry, querytype, page + 1)# We are at the last or only pageself.accum.extend(r.get(responsekey, []))except Exception as e:diff --git a/modules/sfp_voipbl.py b/modules/sfp_voipbl.pyindex 04a68e32..cd907e6a 100644--- a/modules/sfp_voipbl.py+++ b/modules/sfp_voipbl.py@@ -129,7 +129,7 @@ class sfp_voipbl(SpiderFootPlugin):for line in data['content'].split('\n'):grp = re.findall(pat, line)if len(grp) > 0:- #self.sf.debug("Adding " + grp[0] + " to list.")+ # self.sf.debug("Adding " + grp[0] + " to list.")iplist.append(grp[0])else:iplist = data['content'].split('\n')diff --git a/modules/sfp_vxvault.py b/modules/sfp_vxvault.pyindex 5cae8224..22a9a2c6 100644--- a/modules/sfp_vxvault.py+++ b/modules/sfp_vxvault.py@@ -130,7 +130,7 @@ class sfp_vxvault(SpiderFootPlugin):for line in data['content'].split('\n'):grp = re.findall(pat, line)if len(grp) > 0:- #self.sf.debug("Adding " + grp[0] + " to list.")+ # self.sf.debug("Adding " + grp[0] + " to list.")iplist.append(grp[0])else:iplist = data['content'].split('\n')diff --git a/modules/sfp_whatcms.py b/modules/sfp_whatcms.pyindex 11ea980f..e549e175 100644--- a/modules/sfp_whatcms.py+++ b/modules/sfp_whatcms.py@@ -1,4 +1,4 @@-#-------------------------------------------------------------------------------+# -------------------------------------------------------------------------------# Name: sfp_whatcms# Purpose: SpiderFoot plug-in to check which web technology is used# on a target website using WhatCMS API.@@ -8,7 +8,7 @@# Created: 2019-06-01# Copyright: (c) bcoles 2019# Licence: GPL-#-------------------------------------------------------------------------------+# -------------------------------------------------------------------------------import jsonimport timediff --git a/modules/sfp_whoxy.py b/modules/sfp_whoxy.pyindex 476110a6..a514f246 100644--- a/modules/sfp_whoxy.py+++ b/modules/sfp_whoxy.py@@ -111,7 +111,7 @@ class sfp_whoxy(SpiderFootPlugin):accum.extend(info.get('search_result'))else:accum = info.get('search_result')- return self.query(qry, querytype, page+1, accum)+ return self.query(qry, querytype, page + 1, accum)else:# We are at the last pageaccum.extend(info.get('search_result', []))diff --git a/modules/sfp_wigle.py b/modules/sfp_wigle.pyindex bfb0a231..05229787 100644--- a/modules/sfp_wigle.py+++ b/modules/sfp_wigle.py@@ -1,4 +1,4 @@-#-------------------------------------------------------------------------------+# -------------------------------------------------------------------------------# Name: sfp_wigle# Purpose: Query wigle.net to identify nearby WiFi access points.#@@ -7,7 +7,7 @@# Created: 10/09/2017# Copyright: (c) Steve Micallef# Licence: GPL-#-------------------------------------------------------------------------------+# -------------------------------------------------------------------------------import datetimeimport jsondiff --git a/modules/sfp_wikipediaedits.py b/modules/sfp_wikipediaedits.pyindex d2d93a4c..218c06ff 100644--- a/modules/sfp_wikipediaedits.py+++ b/modules/sfp_wikipediaedits.py@@ -1,4 +1,5 @@-#-------------------------------------------------------------------------------+# -*- coding: utf-8 -*-+# -------------------------------------------------------------------------------# Name: sfp_wikipediaedits# Purpose: Identify edits to Wikipedia articles made from a given IP address# or username.@@ -8,7 +9,7 @@# Created: 10/09/2017# Copyright: (c) Steve Micallef# Licence: GPL-#-------------------------------------------------------------------------------+# -------------------------------------------------------------------------------import datetimeimport rediff --git a/setup.cfg b/setup.cfgindex bcd68cec..75de2370 100644--- a/setup.cfg+++ b/setup.cfg@@ -1,5 +1,5 @@[flake8]flake8-max-line-length = 120-ignore = F841 E501 W503 E131 E401 E201 E302 E265 W605 W504 E226 E722 E741 E502+ignore = F841 E501 W503 E131 E401 E302 W605 W504 E722 E741 E502per-file-ignores =spiderfoot/__init__.py:F401diff --git a/sf.py b/sf.pyindex 87dabccb..a0c1ba2c 100755--- a/sf.py+++ b/sf.py@@ -44,12 +44,12 @@ console_handler = logging.StreamHandler(sys.stderr)console_handler.setFormatter(log_format)log.addHandler(console_handler)-debug_handler = handlers.RotatingFileHandler("spiderfoot.debug.log", maxBytes=(1048576*5), backupCount=7)+debug_handler = handlers.RotatingFileHandler("spiderfoot.debug.log", maxBytes=(1048576 * 5), backupCount=7)debug_handler.setLevel(logging.DEBUG)debug_handler.setFormatter(log_format)log.addHandler(debug_handler)-error_handler = handlers.RotatingFileHandler("spiderfoot.error.log", maxBytes=(1048576*5), backupCount=7)+error_handler = handlers.RotatingFileHandler("spiderfoot.error.log", maxBytes=(1048576 * 5), backupCount=7)error_handler.setLevel(logging.WARN)error_handler.setFormatter(log_format)log.addHandler(error_handler)