SpiderFoot automates OSINT for threat intelligence and mapping your attack surface.
Python attacksurfacecticybersecurityfootprintinghackinginformation-gatheringinformation-securityinfosecintelligence-gatheringosintosint-frameworkosint-reconnaissanceosint-toolpentestingpythonreconsecurity-toolsthreat-intelligencethreatintel
flake8: resolve flake8-return violations (#1059)
bcolesed64ceb2267c
diff --git a/modules/sfp__stor_db.py b/modules/sfp__stor_db.pyindex 2b5e7be8..928ae609 100644--- a/modules/sfp__stor_db.py+++ b/modules/sfp__stor_db.py@@ -49,16 +49,15 @@ class sfp__stor_db(SpiderFootPlugin):# Handle events sent to this moduledef handleEvent(self, sfEvent):if not self.opts['_store']:- return None+ returnif self.opts['maxstorage'] != 0:if len(sfEvent.data) > self.opts['maxstorage']:self.sf.debug("Storing an event: " + sfEvent.eventType)self.__sfdb__.scanEventStore(self.getScanId(), sfEvent, self.opts['maxstorage'])- return None+ returnself.sf.debug("Storing an event: " + sfEvent.eventType)self.__sfdb__.scanEventStore(self.getScanId(), sfEvent)-# End of sfp__stor_db classdiff --git a/modules/sfp__stor_stdout.py b/modules/sfp__stor_stdout.pyindex 0b367b95..fce40560 100644--- a/modules/sfp__stor_stdout.py+++ b/modules/sfp__stor_stdout.py@@ -105,7 +105,7 @@ class sfp__stor_stdout(SpiderFootPlugin):# Handle events sent to this moduledef handleEvent(self, sfEvent):if sfEvent.eventType == "ROOT":- return None+ returnif self.opts['_showonlyrequested']:if sfEvent.eventType in self.opts['_requested']:diff --git a/modules/sfp_abusech.py b/modules/sfp_abusech.pyindex 739daa25..b924ab1e 100644--- a/modules/sfp_abusech.py+++ b/modules/sfp_abusech.py@@ -228,19 +228,19 @@ class sfp_abusech(SpiderFootPlugin):if eventData in self.results:self.sf.debug(f"Skipping {eventData}, already checked.")- return None+ returnself.results[eventData] = Trueif eventName == 'CO_HOSTED_SITE' and not self.opts.get('checkcohosts', False):- return None+ returnif eventName == 'AFFILIATE_IPADDR' \and not self.opts.get('checkaffiliates', False):- return None+ returnif eventName == 'NETBLOCK_OWNER' and not self.opts.get('checknetblocks', False):- return None+ returnif eventName == 'NETBLOCK_MEMBER' and not self.opts.get('checksubnets', False):- return None+ returnfor check in list(malchecks.keys()):cid = malchecks[check]['id']@@ -276,7 +276,7 @@ class sfp_abusech(SpiderFootPlugin):url = self.lookupItem(cid, typeId, eventData)if self.checkForStop():- return None+ return# Notify other modules of what you've foundif url is not None:@@ -284,6 +284,4 @@ class sfp_abusech(SpiderFootPlugin):evt = SpiderFootEvent(evtType, text, self.__name__, event)self.notifyListeners(evt)- return None-# End of sfp_abusech classdiff --git a/modules/sfp_abuseipdb.py b/modules/sfp_abuseipdb.pyindex 1d81360a..2a8377ca 100644--- a/modules/sfp_abuseipdb.py+++ b/modules/sfp_abuseipdb.py@@ -208,12 +208,12 @@ class sfp_abuseipdb(SpiderFootPlugin):return Nonetry:- data = json.loads(res['content'])+ return json.loads(res['content'])except Exception as e:self.sf.debug(f"Error processing JSON response: {e}")return None- return data+ return Nonedef queryNetblock(self, ip):"""Query API for a netblock.@@ -262,12 +262,11 @@ class sfp_abuseipdb(SpiderFootPlugin):return Nonetry:- data = json.loads(res['content'])+ return json.loads(res['content'])except Exception as e:self.sf.debug(f"Error processing JSON response: {e}")- return None- return data+ return Nonedef handleEvent(self, event):eventName = event.eventType@@ -281,33 +280,33 @@ class sfp_abuseipdb(SpiderFootPlugin):f"You enabled {self.__class__.__name__} but did not set an API key!")self.errorState = True- return None+ returnif eventData in self.results:self.sf.debug(f"Skipping {eventData}, already checked.")- return None+ returnself.results[eventData] = Trueif eventName == 'AFFILIATE_IPADDR' and not self.opts.get('checkaffiliates'):- return None+ returnif eventName == 'IP_ADDRESS':evtType = 'MALICIOUS_IPADDR'elif eventName == 'AFFILIATE_IPADDR':evtType = 'MALICIOUS_AFFILIATE_IPADDR'else:- return None+ returnself.sf.debug(f"Checking maliciousness of IP address {eventData} with AbuseIPDB")blacklist = self.queryBlacklist()if not blacklist:- return None+ returnif eventData not in blacklist:- return None+ returnself.sf.info(f"Malicious IP address {eventData} found in AbuseIPDB blacklist")@@ -321,6 +320,4 @@ class sfp_abuseipdb(SpiderFootPlugin):)self.notifyListeners(evt)- return None-# End of sfp_abuseipdb classdiff --git a/modules/sfp_accounts.py b/modules/sfp_accounts.pyindex 24825e33..6992a6b4 100644--- a/modules/sfp_accounts.py+++ b/modules/sfp_accounts.py@@ -80,7 +80,7 @@ class sfp_accounts(SpiderFootPlugin):if data['content'] is None:self.sf.error(f"Unable to fetch {url}")self.errorState = True- return None+ returncontent = data['content']self.sf.cachePut("sfaccounts", content)@@ -90,7 +90,7 @@ class sfp_accounts(SpiderFootPlugin):except Exception as e:self.sf.error(f"Unable to parse social media accounts list: {e}")self.errorState = True- return None+ returndef watchedEvents(self):return ["EMAILADDR", "DOMAIN_NAME", "HUMAN_NAME", "USERNAME"]@@ -100,7 +100,7 @@ class sfp_accounts(SpiderFootPlugin):def checkSite(self, name, site):if 'check_uri' not in site:- return None+ returnurl = site['check_uri'].format(account=name)retname = f"{site['name']} (Category: {site['category']})\n<SFURL>{url}</SFURL>"@@ -198,17 +198,17 @@ class sfp_accounts(SpiderFootPlugin):users = list()if self.errorState:- return None+ returnself.sf.debug(f"Received event, {eventName}, from {srcModuleName}")# Skip events coming from me unless they are USERNAME eventsif eventName != "USERNAME" and srcModuleName == "sfp_accounts":self.sf.debug(f"Ignoring {eventName}, from self.")- return None+ returnif eventData in list(self.results.keys()):- return None+ returnself.results[eventData] = True@@ -251,7 +251,7 @@ class sfp_accounts(SpiderFootPlugin):if eventName == "DOMAIN_NAME":kw = self.sf.domainKeyword(eventData, self.opts['_internettlds'])if not kw:- return None+ returnusers.append(kw)diff --git a/modules/sfp_adblock.py b/modules/sfp_adblock.pyindex 0d86c771..1c31a428 100644--- a/modules/sfp_adblock.py+++ b/modules/sfp_adblock.py@@ -86,7 +86,7 @@ class sfp_adblock(SpiderFootPlugin):self.sf.debug(f"Received event, {eventName}, from {srcModuleName}")if self.errorState:- return None+ returnif self.rules is None:raw = self.sf.fetchUrl(self.opts['blocklist'], timeout=30)@@ -111,7 +111,7 @@ class sfp_adblock(SpiderFootPlugin):self.results[eventData] = Trueelse:self.sf.debug("Already checked this page for AdBlock matching, skipping.")- return None+ returntry:if self.rules and self.rules.should_block(eventData):@@ -122,6 +122,4 @@ class sfp_adblock(SpiderFootPlugin):self.sf.error("Parsing error handling AdBlock list: " + str(e))self.errorState = True- return None-# End of sfp_adblock classdiff --git a/modules/sfp_ahmia.py b/modules/sfp_ahmia.pyindex dcf52fcd..f4379418 100644--- a/modules/sfp_ahmia.py+++ b/modules/sfp_ahmia.py@@ -83,13 +83,13 @@ class sfp_ahmia(SpiderFootPlugin):eventData = event.dataif not self.opts['fullnames'] and eventName == 'HUMAN_NAME':- return None+ returnif eventData in self.results:self.sf.debug("Already did a search for " + eventData + ", skipping.")- return None- else:- self.results[eventData] = True+ return++ self.results[eventData] = True# Sites hosted on the domaindata = self.sf.fetchUrl("https://ahmia.fi/search/?q=" + eventData.replace(" ", "%20"),@@ -97,12 +97,11 @@ class sfp_ahmia(SpiderFootPlugin):timeout=self.opts['_fetchtimeout'])if data is None or not data.get('content'):self.sf.info("No results returned from ahmia.fi.")- return None+ returnif "redirect_url=" in data['content']:- # Check if we've been asked to stopif self.checkForStop():- return None+ returnlinks = re.findall("redirect_url=(.[^\"]+)\"", data['content'], re.IGNORECASE | re.DOTALL)@@ -115,7 +114,7 @@ class sfp_ahmia(SpiderFootPlugin):self.sf.debug("Found a darknet mention: " + link)if self.sf.urlFQDN(link).endswith(".onion"):if self.checkForStop():- return None+ returnif self.opts['fetchlinks']:res = self.sf.fetchUrl(link, timeout=self.opts['_fetchtimeout'],useragent=self.opts['_useragent'],@@ -155,5 +154,4 @@ class sfp_ahmia(SpiderFootPlugin):self.__name__, event)self.notifyListeners(evt)-# End of sfp_ahmia classdiff --git a/modules/sfp_alienvault.py b/modules/sfp_alienvault.pyindex c8e54013..2ff0749a 100644--- a/modules/sfp_alienvault.py+++ b/modules/sfp_alienvault.py@@ -140,12 +140,12 @@ class sfp_alienvault(SpiderFootPlugin):return Nonetry:- info = json.loads(res['content'])+ return json.loads(res['content'])except Exception as e:self.sf.error(f"Error processing JSON response from AlienVault OTX: {e}")return None- return info+ return None# Handle events sent to this moduledef handleEvent(self, event):@@ -154,44 +154,44 @@ class sfp_alienvault(SpiderFootPlugin):eventData = event.dataif self.errorState:- return None+ returnself.sf.debug(f"Received event, {eventName}, from {srcModuleName}")if self.opts['api_key'] == "":self.sf.error("You enabled sfp_alienvault but did not set an API key/password!")self.errorState = True- return None+ return# Don't look up stuff twiceif eventData in self.results:self.sf.debug(f"Skipping {eventData}, already checked.")- return None+ returnelse:self.results[eventData] = Trueif eventName == 'NETBLOCK_OWNER':if not self.opts['netblocklookup']:- return None+ returnelse:if IPNetwork(eventData).prefixlen < self.opts['maxnetblock']:self.sf.debug("Network size bigger than permitted: "+ str(IPNetwork(eventData).prefixlen) + " > "+ str(self.opts['maxnetblock']))- return None+ returnif eventName == 'AFFILIATE_IPADDR' and not self.opts.get('checkaffiliates', False):- return None+ returnif eventName == 'NETBLOCK_MEMBER':if not self.opts['subnetlookup']:- return None+ returnelse:if IPNetwork(eventData).prefixlen < self.opts['maxsubnet']:self.sf.debug("Network size bigger than permitted: "+ str(IPNetwork(eventData).prefixlen) + " > "+ str(self.opts['maxsubnet']))- return None+ returnqrylist = list()if eventName.startswith("NETBLOCK_"):@@ -228,7 +228,7 @@ class sfp_alienvault(SpiderFootPlugin):for addr in qrylist:if self.checkForStop():- return None+ returnif eventName == 'IP_ADDRESS' or eventName.startswith('NETBLOCK_'):evtType = 'MALICIOUS_IPADDR'diff --git a/modules/sfp_alienvaultiprep.py b/modules/sfp_alienvaultiprep.pyindex 4ebc7d4e..2c7e0777 100644--- a/modules/sfp_alienvaultiprep.py+++ b/modules/sfp_alienvaultiprep.py@@ -193,19 +193,19 @@ class sfp_alienvaultiprep(SpiderFootPlugin):if eventData in self.results:self.sf.debug(f"Skipping {eventData}, already checked.")- return None+ returnself.results[eventData] = Trueif eventName == 'CO_HOSTED_SITE' and not self.opts.get('checkcohosts', False):- return None+ returnif eventName == 'AFFILIATE_IPADDR' \and not self.opts.get('checkaffiliates', False):- return None+ returnif eventName == 'NETBLOCK_OWNER' and not self.opts.get('checknetblocks', False):- return None+ returnif eventName == 'NETBLOCK_MEMBER' and not self.opts.get('checksubnets', False):- return None+ returnfor check in list(malchecks.keys()):cid = malchecks[check]['id']@@ -241,7 +241,7 @@ class sfp_alienvaultiprep(SpiderFootPlugin):url = self.lookupItem(cid, typeId, eventData)if self.checkForStop():- return None+ return# Notify other modules of what you've foundif url is not None:@@ -249,6 +249,4 @@ class sfp_alienvaultiprep(SpiderFootPlugin):evt = SpiderFootEvent(evtType, text, self.__name__, event)self.notifyListeners(evt)- return None-# End of sfp_alienvaultiprep classdiff --git a/modules/sfp_apility.py b/modules/sfp_apility.pyindex 3b6b5f37..27c88cc1 100644--- a/modules/sfp_apility.py+++ b/modules/sfp_apility.py@@ -181,15 +181,15 @@ class sfp_apility(SpiderFootPlugin):eventData = event.dataif self.errorState:- return None+ returnif eventData in self.results:- return None+ returnif self.opts['api_key'] == "":self.sf.error("You enabled sfp_apility but did not set an API key!")self.errorState = True- return None+ returnself.results[eventData] = True@@ -200,13 +200,13 @@ class sfp_apility(SpiderFootPlugin):if data is None:self.sf.debug("No matches found for " + eventData)- return None+ returnres = data.get('response')if not res:self.sf.debug("No matches found for " + eventData)- return None+ returnfor m in res:if m == 'FREEMAIL' and not self.opts['malicious_freemail']:@@ -219,13 +219,13 @@ class sfp_apility(SpiderFootPlugin):if data is None:self.sf.debug("No matches found for " + eventData)- return None+ returnres = data.get('response')if not res:self.sf.debug("No matches found for " + eventData)- return None+ returnevt = SpiderFootEvent('RAW_RIR_DATA', str(res), self.__name__, event)self.notifyListeners(evt)@@ -240,7 +240,7 @@ class sfp_apility(SpiderFootPlugin):if not domain:self.sf.debug("No matches found for " + eventData)- return None+ returnif domain.get('blacklist'):for m in domain.get('blacklist'):diff --git a/modules/sfp_archiveorg.py b/modules/sfp_archiveorg.pyindex 42b3276f..7d4ed80d 100644--- a/modules/sfp_archiveorg.py+++ b/modules/sfp_archiveorg.py@@ -111,28 +111,28 @@ class sfp_archiveorg(SpiderFootPlugin):self.sf.debug(f"Received event, {eventName}, from {srcModuleName}")if eventName == "INTERESTING_FILE" and not self.opts['intfiles']:- return None+ returnif eventName == "URL_PASSWORD" and not self.opts['passwordpages']:- return None+ returnif eventName == "URL_STATIC" and not self.opts['staticpages']:- return None+ returnif eventName == "URL_FORM" and not self.opts['formpages']:- return None+ returnif eventName == "URL_UPLOAD" and not self.opts['uploadpages']:- return None+ returnif eventName == "URL_JAVA_APPLET" and not self.opts['javapages']:- return None+ returnif eventName == "URL_FLASH" and not self.opts['flashpages']:- return None+ returnif eventName == "URL_JAVASCRIPT" and not self.opts['javascriptpages']:- return None+ returnif eventName == "URL_WEB_FRAMEWORK" and not self.opts['webframeworkpages']:- return None+ returnif eventData in self.results:- return None- else:- self.results[eventData] = True+ return++ self.results[eventData] = Truefor daysback in self.opts['farback'].split(","):newDate = datetime.datetime.now() - datetime.timedelta(days=int(daysback))diff --git a/modules/sfp_arin.py b/modules/sfp_arin.pyindex f1ffd04e..d49462c4 100644--- a/modules/sfp_arin.py+++ b/modules/sfp_arin.py@@ -136,14 +136,14 @@ class sfp_arin(SpiderFootPlugin):# 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+ return++ self.results[eventData] = Trueif eventName == "DOMAIN_NAME":ret = self.query("domain", eventData)if not ret:- return None+ returnif "pocs" in ret:if "pocRef" in ret['pocs']:ref = list()@@ -173,7 +173,7 @@ class sfp_arin(SpiderFootPlugin):if eventName == "HUMAN_NAME":ret = self.query("name", eventData)if not ret:- return None+ returnif "pocs" in ret:if "pocRef" in ret['pocs']:ref = list()diff --git a/modules/sfp_azureblobstorage.py b/modules/sfp_azureblobstorage.pyindex 5bf7a819..764c7349 100644--- a/modules/sfp_azureblobstorage.py+++ b/modules/sfp_azureblobstorage.py@@ -132,9 +132,9 @@ class sfp_azureblobstorage(SpiderFootPlugin):eventData = event.dataif eventData in self.results:- return None- else:- self.results[eventData] = True+ return++ self.results[eventData] = Trueself.sf.debug(f"Received event, {eventName}, from {srcModuleName}")@@ -143,7 +143,7 @@ class sfp_azureblobstorage(SpiderFootPlugin):b = self.sf.urlFQDN(eventData)evt = SpiderFootEvent("CLOUD_STORAGE_BUCKET", b, self.__name__, event)self.notifyListeners(evt)- return None+ returntargets = [eventData.replace('.', '')]kw = self.sf.domainKeyword(eventData, self.opts['_internettlds'])@@ -155,7 +155,7 @@ class sfp_azureblobstorage(SpiderFootPlugin):suffixes = [''] + self.opts['suffixes'].split(',')for s in suffixes:if self.checkForStop():- return None+ returnb = t + s + ".blob.core.windows.net"url = "https://" + bdiff --git a/modules/sfp_badipscom.py b/modules/sfp_badipscom.pyindex f979f041..24e6fec7 100644--- a/modules/sfp_badipscom.py+++ b/modules/sfp_badipscom.py@@ -107,13 +107,13 @@ class sfp_badipscom(SpiderFootPlugin):if eventData in self.results:self.sf.debug(f"Skipping {eventData}, already checked.")- return None+ returnif self.errorState:- return None+ returnif eventName not in ['IP_ADDRESS', 'AFFILIATE_IPADDR']:- return None+ returnself.results[eventData] = True@@ -121,7 +121,7 @@ class sfp_badipscom(SpiderFootPlugin):if eventName == 'AFFILIATE_IPADDR':if not self.opts.get('checkaffiliates', False):- return None+ returnevtType = 'MALICIOUS_AFFILIATE_IPADDR'self.sf.debug("Checking maliciousness of IP address %s with BadIPs.com" % eventData)@@ -129,7 +129,7 @@ class sfp_badipscom(SpiderFootPlugin):url = self.query(eventData)if not url:- return None+ returntext = "BadIPs.com IP Reputation List [%s]\n<SFURL>%s</SFURL>" % (eventData, url)evt = SpiderFootEvent(evtType, text, self.__name__, event)diff --git a/modules/sfp_badpackets.py b/modules/sfp_badpackets.pyindex 523ecdca..e1e286b3 100644--- a/modules/sfp_badpackets.py+++ b/modules/sfp_badpackets.py@@ -142,12 +142,12 @@ class sfp_badpackets(SpiderFootPlugin):# Always always always process external data with try/except since we cannot# trust the data is as intended.try:- data = json.loads(res['content'])+ return json.loads(res['content'])except Exception as e:self.sf.error(f"Error processing JSON response from Bad Packets: {e}")return None- return data+ return None# Handle events sent to this moduledef handleEvent(self, event):@@ -156,7 +156,7 @@ class sfp_badpackets(SpiderFootPlugin):eventData = event.dataif self.errorState:- return None+ returnself.sf.debug(f"Received event, {eventName}, from {srcModuleName}")@@ -165,30 +165,30 @@ class sfp_badpackets(SpiderFootPlugin):if self.opts['api_key'] == "":self.sf.error("You enabled sfp_badpackets but did not set an API key!")self.errorState = True- return None+ return# Don't look up stuff twiceif eventData in self.results:self.sf.debug(f"Skipping {eventData}, already checked.")- return None+ returnself.results[eventData] = Trueif eventName == 'NETBLOCK_OWNER':if not self.opts['netblocklookup']:- return None+ returnif IPNetwork(eventData).prefixlen < self.opts['maxnetblock']:self.sf.debug(f"Network size bigger than permitted: {IPNetwork(eventData).prefixlen} > {self.opts['maxnetblock']}")- return None+ returnif eventName == 'NETBLOCK_MEMBER':if not self.opts['subnetlookup']:- return None+ returnif IPNetwork(eventData).prefixlen < self.opts['maxsubnet']:self.sf.debug(f"Network size bigger than permitted: {IPNetwork(eventData).prefixlen} > {self.opts['maxsubnet']}")- return None+ returnqrylist = list()if eventName.startswith("NETBLOCK_"):@@ -198,14 +198,14 @@ class sfp_badpackets(SpiderFootPlugin):else:# If user has enabled affiliate checkingif eventName == "AFFILIATE_IPADDR" and not self.opts['checkaffiliates']:- return None+ returnqrylist.append(eventData)for addr in qrylist:nextPageHasData = Trueif self.checkForStop():- return None+ returncurrentOffset = 0while nextPageHasData:@@ -281,5 +281,4 @@ class sfp_badpackets(SpiderFootPlugin):nextPageHasData = FalsecurrentOffset += self.limit- return None# End of sfp_badpackets classdiff --git a/modules/sfp_bambenek.py b/modules/sfp_bambenek.pyindex 3019d450..eaaaacb1 100644--- a/modules/sfp_bambenek.py+++ b/modules/sfp_bambenek.py@@ -208,19 +208,19 @@ class sfp_bambenek(SpiderFootPlugin):if eventData in self.results:self.sf.debug(f"Skipping {eventData}, already checked.")- return None+ returnself.results[eventData] = Trueif eventName == 'CO_HOSTED_SITE' and not self.opts.get('checkcohosts', False):- return None+ returnif eventName == 'AFFILIATE_IPADDR' \and not self.opts.get('checkaffiliates', False):- return None+ returnif eventName == 'NETBLOCK_OWNER' and not self.opts.get('checknetblocks', False):- return None+ returnif eventName == 'NETBLOCK_MEMBER' and not self.opts.get('checksubnets', False):- return None+ returnfor check in list(malchecks.keys()):cid = malchecks[check]['id']@@ -252,7 +252,7 @@ class sfp_bambenek(SpiderFootPlugin):url = self.lookupItem(cid, typeId, eventData)if self.checkForStop():- return None+ return# Notify other modules of what you've foundif url is not None:@@ -260,6 +260,4 @@ class sfp_bambenek(SpiderFootPlugin):evt = SpiderFootEvent(evtType, text, self.__name__, event)self.notifyListeners(evt)- return None-# End of sfp_bambenek classdiff --git a/modules/sfp_base64.py b/modules/sfp_base64.pyindex b222c15e..9c5fe616 100644--- a/modules/sfp_base64.py+++ b/modules/sfp_base64.py@@ -64,7 +64,7 @@ class sfp_base64(SpiderFootPlugin):m = re.findall(pat, eventData)for match in m:if self.checkForStop():- return None+ returnminlen = int(self.opts['minlength'])if len(match) < minlen:@@ -91,6 +91,4 @@ class sfp_base64(SpiderFootPlugin):evt = SpiderFootEvent("BASE64_DATA", string, self.__name__, event)self.notifyListeners(evt)- return None-# End of sfp_base64 classdiff --git a/modules/sfp_bitcoin.py b/modules/sfp_bitcoin.pyindex f5d332a5..84038624 100644--- a/modules/sfp_bitcoin.py+++ b/modules/sfp_bitcoin.py@@ -89,6 +89,4 @@ class sfp_bitcoin(SpiderFootPlugin):evt = SpiderFootEvent("BITCOIN_ADDRESS", m, self.__name__, event)self.notifyListeners(evt)- return None-# End of sfp_bitcoin classdiff --git a/modules/sfp_blockchain.py b/modules/sfp_blockchain.pyindex a274d595..f95b422a 100644--- a/modules/sfp_blockchain.py+++ b/modules/sfp_blockchain.py@@ -96,6 +96,4 @@ class sfp_blockchain(SpiderFootPlugin):evt = SpiderFootEvent("BITCOIN_BALANCE", str(balance) + " BTC", self.__name__, event)self.notifyListeners(evt)- return None-# End of sfp_blockchain classdiff --git a/modules/sfp_blocklistde.py b/modules/sfp_blocklistde.pyindex 07588af9..75ee4cda 100644--- a/modules/sfp_blocklistde.py+++ b/modules/sfp_blocklistde.py@@ -248,6 +248,4 @@ class sfp_blocklistde(SpiderFootPlugin):evt = SpiderFootEvent(evtType, text, self.__name__, event)self.notifyListeners(evt)- return None-# End of sfp_blocklistde classdiff --git a/modules/sfp_botscout.py b/modules/sfp_botscout.pyindex 99ba66c0..815428c5 100644--- a/modules/sfp_botscout.py+++ b/modules/sfp_botscout.py@@ -81,21 +81,21 @@ class sfp_botscout(SpiderFootPlugin):eventData = event.dataif self.errorState:- return None+ returnself.sf.debug(f"Received event, {eventName}, from {srcModuleName}")if self.opts['api_key'] == "":self.sf.error("You enabled sfp_botscout but did not set an API key!")self.errorState = True- return None+ return# Don't look up stuff twiceif eventData in self.results:self.sf.debug("Skipping " + eventData + " as already searched.")- return None- else:- self.results[eventData] = True+ return++ self.results[eventData] = Trueif self.opts['api_key']:url = "http://botscout.com/test/?key=" + self.opts['api_key'] + "&all="@@ -107,7 +107,7 @@ class sfp_botscout(SpiderFootPlugin):useragent=self.opts['_useragent'])if res['content'] is None or "|" not in res['content']:self.sf.error("Error encountered processing " + eventData)- return None+ returnif res['content'].startswith("Y|"):self.sf.info("Found Botscout entry for " + eventData + ": " + res['content'])@@ -119,6 +119,4 @@ class sfp_botscout(SpiderFootPlugin):evt = SpiderFootEvent(t, "Botscout [" + eventData + "]", self.__name__, event)self.notifyListeners(evt)- return None-# End of sfp_botscout classdiff --git a/modules/sfp_botvrij.py b/modules/sfp_botvrij.pyindex fbd6bc12..684bc020 100644--- a/modules/sfp_botvrij.py+++ b/modules/sfp_botvrij.py@@ -222,6 +222,4 @@ class sfp_botvrij(SpiderFootPlugin):evt = SpiderFootEvent(evtType, text, self.__name__, event)self.notifyListeners(evt)- return None-# End of sfp_botvrij classdiff --git a/modules/sfp_censys.py b/modules/sfp_censys.pyindex 6689fd5d..af9b407d 100644--- a/modules/sfp_censys.py+++ b/modules/sfp_censys.py@@ -180,18 +180,18 @@ class sfp_censys(SpiderFootPlugin):eventData = event.dataif self.errorState:- return None+ returnself.sf.debug(f"Received event, {eventName}, from {srcModuleName}")if self.opts['censys_api_key_uid'] == "" or self.opts['censys_api_key_secret'] == "":self.sf.error("You enabled sfp_censys but did not set an API uid/secret!")self.errorState = True- return None+ returnif eventData in self.results:self.sf.debug(f"Skipping {eventData}, already checked.")- return None+ returnself.results[eventData] = True@@ -205,7 +205,7 @@ class sfp_censys(SpiderFootPlugin):for addr in qrylist:if self.checkForStop():- return None+ returnif eventName in ["IP_ADDRESS", "NETBLOCK_OWNER"]:rec = self.queryIp(addr)diff --git a/modules/sfp_cleanbrowsing.py b/modules/sfp_cleanbrowsing.pyindex 15851720..969dc166 100644--- a/modules/sfp_cleanbrowsing.py+++ b/modules/sfp_cleanbrowsing.py@@ -99,20 +99,20 @@ class sfp_cleanbrowsing(SpiderFootPlugin):self.sf.debug(f"Received event, {eventName}, from {srcModuleName}")if eventData in self.results:- return None+ returnself.results[eventData] = True# Check that it resolves first, as it becomes a valid# malicious host only if NOT resolved by CleanBrowsing.org.if not self.sf.resolveHost(eventData):- return None+ returnfound = self.queryAddr(eventData)# Host was found, not blockedif found:- return None+ returntyp = "MALICIOUS_" + eventNamediff --git a/modules/sfp_coinblocker.py b/modules/sfp_coinblocker.pyindex 4ce1a080..537e6681 100644--- a/modules/sfp_coinblocker.py+++ b/modules/sfp_coinblocker.py@@ -257,6 +257,4 @@ class sfp_coinblocker(SpiderFootPlugin):evt = SpiderFootEvent(evtType, text, self.__name__, event)self.notifyListeners(evt)- return None-# End of sfp_coinblocker classdiff --git a/modules/sfp_commoncrawl.py b/modules/sfp_commoncrawl.pyindex 4e123f5a..d45a4a8a 100644--- a/modules/sfp_commoncrawl.py+++ b/modules/sfp_commoncrawl.py@@ -187,6 +187,6 @@ class sfp_commoncrawl(SpiderFootPlugin):self.notifyListeners(evt)except Exception as e:self.sf.error("Malformed JSON from CommonCrawl.org: " + str(e))- return None+ return# End of sfp_commoncrawl classdiff --git a/modules/sfp_countryname.py b/modules/sfp_countryname.pyindex c1d6afc7..9165d67c 100644--- a/modules/sfp_countryname.py+++ b/modules/sfp_countryname.py@@ -233,6 +233,4 @@ class sfp_countryname(SpiderFootPlugin):evt.moduleDataSource = moduleDataSourceself.notifyListeners(evt)- return None-# End of sfp_countryname classdiff --git a/modules/sfp_creditcard.py b/modules/sfp_creditcard.pyindex 5ceeaa8a..60f4ed6e 100644--- a/modules/sfp_creditcard.py+++ b/modules/sfp_creditcard.py@@ -94,5 +94,4 @@ class sfp_creditcard(SpiderFootPlugin):evt.moduleDataSource = "Unknown"self.notifyListeners(evt)- return None# End of sfp_creditcard classdiff --git a/modules/sfp_customfeed.py b/modules/sfp_customfeed.pyindex 9c974387..3a93b720 100644--- a/modules/sfp_customfeed.py+++ b/modules/sfp_customfeed.py@@ -245,6 +245,4 @@ class sfp_customfeed(SpiderFootPlugin):evt = SpiderFootEvent(evtType, text, self.__name__, event)self.notifyListeners(evt)- return None-# End of sfp_customfeed classdiff --git a/modules/sfp_cybercrimetracker.py b/modules/sfp_cybercrimetracker.pyindex 6511af0a..067404ec 100644--- a/modules/sfp_cybercrimetracker.py+++ b/modules/sfp_cybercrimetracker.py@@ -233,6 +233,4 @@ class sfp_cybercrimetracker(SpiderFootPlugin):evt = SpiderFootEvent(evtType, text, self.__name__, event)self.notifyListeners(evt)- return None-# End of sfp_cybercrimetracker classdiff --git a/modules/sfp_dnsbrute.py b/modules/sfp_dnsbrute.pyindex 2e67ebf6..9dd02753 100644--- a/modules/sfp_dnsbrute.py+++ b/modules/sfp_dnsbrute.py@@ -150,18 +150,18 @@ class sfp_dnsbrute(SpiderFootPlugin):self.sf.debug(f"Received event, {eventName}, from {srcModuleName}")if srcModuleName == "sfp_dnsbrute":- return None+ returnif eventDataHash in self.events:- return None+ returnself.events[eventDataHash] = Trueif eventName == "INTERNET_NAME" and not self.getTarget().matches(eventData, includeChildren=False):if not self.opts['numbersuffix']:- return None+ returnif self.checkForStop():- return None+ returnh, dom = eventData.split(".", 1)@@ -169,7 +169,7 @@ class sfp_dnsbrute(SpiderFootPlugin):wildcard = self.sf.checkDnsWildcard(dom)if self.opts['skipcommonwildcard'] and wildcard:self.sf.debug("Wildcard DNS detected on " + dom + " so skipping host iteration.")- return None+ returndom = "." + domnextsubs = dict()@@ -184,23 +184,23 @@ class sfp_dnsbrute(SpiderFootPlugin):self.tryHostWrapper(list(nextsubs.keys()), event)# The rest of the module is for handling targets only- return None+ return# Only for the target, from this point forward...if not self.getTarget().matches(eventData, includeChildren=False):- return None+ return# Try resolving common namesself.sf.debug("Iterating through possible sub-domains.")wildcard = self.sf.checkDnsWildcard(eventData)if self.opts['skipcommonwildcard'] and wildcard:self.sf.debug("Wildcard DNS detected.")- return None+ returntargetList = list()for sub in self.sublist:if self.checkForStop():- return None+ returnname = sub + "." + eventData@@ -219,7 +219,7 @@ class sfp_dnsbrute(SpiderFootPlugin):dom = "." + eventDatafor s in self.sublist:if self.checkForStop():- return None+ returnfor i in range(10):nextsubs[s + str(i) + dom] = Truediff --git a/modules/sfp_dnscommonsrv.py b/modules/sfp_dnscommonsrv.pyindex 7f6de9d1..bbb1d577 100644--- a/modules/sfp_dnscommonsrv.py+++ b/modules/sfp_dnscommonsrv.py@@ -96,13 +96,13 @@ class sfp_dnscommonsrv(SpiderFootPlugin):if srcModuleName == "sfp_dnscommonsrv":self.sf.debug(f"Ignoring {eventName}, from self.")- return None+ returneventDataHash = self.sf.hashstring(eventData)parentEvent = eventif eventDataHash in self.events:- return None+ returnself.events[eventDataHash] = True@@ -115,7 +115,7 @@ class sfp_dnscommonsrv(SpiderFootPlugin):# Try resolving common namesfor srv in self.commonsrv:if self.checkForStop():- return None+ returnname = srv + "." + eventDatadiff --git a/modules/sfp_dnsdb.py b/modules/sfp_dnsdb.pyindex 11380c7d..08a3a1af 100644--- a/modules/sfp_dnsdb.py+++ b/modules/sfp_dnsdb.py@@ -122,7 +122,8 @@ class sfp_dnsdb(SpiderFootPlugin):if len(splittedContent) == 2:self.sf.info(f"No DNSDB record found for {query}")return None- elif len(splittedContent) < 2:++ if len(splittedContent) < 2:self.sf.info(f"Unexpected DNSDB response {query}")return None@@ -149,18 +150,18 @@ class sfp_dnsdb(SpiderFootPlugin):eventData = event.dataif self.errorState:- return None+ returnself.sf.debug(f"Received event, {eventName}, from {srcModuleName}")if self.opts["api_key"] == "":self.sf.error("You enabled sfp_dnsdb but did not set an API key!")self.errorState = True- return None+ returnif eventData in self.results:self.sf.debug(f"Skipping {eventData}, already checked.")- return None+ returnself.results[eventData] = TrueresponseData = set()@@ -169,7 +170,7 @@ class sfp_dnsdb(SpiderFootPlugin):if eventName == "DOMAIN_NAME":rrsetRecords = self.query("rrset", "name", eventData)if rrsetRecords is None:- return None+ returnevt = SpiderFootEvent("RAW_RIR_DATA", str(rrsetRecords), self.__name__, event)self.notifyListeners(evt)@@ -177,7 +178,7 @@ class sfp_dnsdb(SpiderFootPlugin):for record in rrsetRecords:record = record.get("obj")if self.checkForStop():- return None+ returnif self.isTooOld(record.get("time_last", 0)):continue@@ -250,7 +251,7 @@ class sfp_dnsdb(SpiderFootPlugin):rdataRecords = self.query("rdata", "name", eventData)if rdataRecords is None:- return None+ returnevt = SpiderFootEvent("RAW_RIR_DATA", str(rdataRecords), self.__name__, event)self.notifyListeners(evt)@@ -276,7 +277,7 @@ class sfp_dnsdb(SpiderFootPlugin):elif eventName in ("IP_ADDRESS", "IPV6_ADDRESS"):rdataRecords = self.query("rdata", "ip", eventData)if rdataRecords is None:- return None+ returnevt = SpiderFootEvent("RAW_RIR_DATA", str(rdataRecords), self.__name__, event)self.notifyListeners(evt)@@ -284,7 +285,7 @@ class sfp_dnsdb(SpiderFootPlugin):for record in rdataRecords:record = record.get("obj")if self.checkForStop():- return None+ returnif self.isTooOld(record.get("time_last", 0)):continuediff --git a/modules/sfp_dnsraw.py b/modules/sfp_dnsraw.pyindex 0c429544..6d8432dc 100644--- a/modules/sfp_dnsraw.py+++ b/modules/sfp_dnsraw.py@@ -76,7 +76,7 @@ class sfp_dnsraw(SpiderFootPlugin):if eventDataHash in self.events:self.sf.debug("Skipping duplicate event for " + eventData)- return None+ returnself.events[eventDataHash] = True@@ -94,7 +94,7 @@ class sfp_dnsraw(SpiderFootPlugin):for rec in list(recs.keys()):if self.checkForStop():- return None+ returntry:req = dns.message.make_query(eventData, dns.rdatatype.from_text(rec))diff --git a/modules/sfp_dnsresolve.py b/modules/sfp_dnsresolve.pyindex 0410e018..e26cd42c 100644--- a/modules/sfp_dnsresolve.py+++ b/modules/sfp_dnsresolve.py@@ -125,13 +125,13 @@ class sfp_dnsresolve(SpiderFootPlugin):# Don't be recursive for namesif srcModuleName in ["sfp_dnsresolve"] and "_NAME" in eventName:- return None+ returnself.sf.debug(f"Received event, {eventName}, from {srcModuleName}")if eventDataHash in self.events:self.sf.debug("Skipping duplicate event.")- return None+ returnself.events[eventDataHash] = True# Simply translates these to their domains@@ -151,10 +151,10 @@ class sfp_dnsresolve(SpiderFootPlugin):# In case the domain of the provided host is different, report that toodom = self.sf.hostDomain(eventData, self.opts['_internettlds'])if dom == eventData or dom is None:- return None+ returnevt = SpiderFootEvent(ev, dom, self.__name__, parentEvent)self.notifyListeners(evt)- return None+ return# Search for IPs/hosts in raw dataif eventName not in ["CO_HOSTED_SITE", "AFFILIATE_INTERNET_NAME",@@ -168,7 +168,7 @@ class sfp_dnsresolve(SpiderFootPlugin):for name in self.getTarget().getNames():if self.checkForStop():- return None+ returnoffset = data.find(name)if offset < 0:@@ -206,21 +206,21 @@ class sfp_dnsresolve(SpiderFootPlugin):offset = data.find(name, start + len(chunkhost))# Nothing left to do with internal links and raw data- return None+ returnif eventName == 'NETBLOCK_OWNER':if not self.opts['netblocklookup']:- return None+ returnelse:if IPNetwork(eventData).prefixlen < self.opts['maxnetblock']:self.sf.debug("Network size bigger than permitted: "+ str(IPNetwork(eventData).prefixlen) + " > "+ str(self.opts['maxnetblock']))- return None+ return# Not handling IPv6 (yet)if "::" in eventData:- return None+ returnself.sf.debug(f"Looking up IPs in owned netblock: {eventData}")for ip in IPNetwork(eventData):@@ -233,7 +233,7 @@ class sfp_dnsresolve(SpiderFootPlugin):continueif self.checkForStop():- return None+ returnaddrs = self.sf.resolveIP(ipaddr)if addrs:@@ -244,10 +244,10 @@ class sfp_dnsresolve(SpiderFootPlugin):# let the handling by this module take# care of follow-up processing.if self.checkForStop():- return None+ returnself.processHost(addr, parentEvent, False)- return None+ returnif eventName in ["IP_ADDRESS", "INTERNET_NAME", "IPV6_ADDRESS","AFFILIATE_IPADDR", "AFFILIATE_INTERNET_NAME"]:@@ -258,14 +258,14 @@ class sfp_dnsresolve(SpiderFootPlugin):addrs = self.sf.resolveIP(eventData)if not addrs:- return None+ returnaddrs.append(eventData)# We now have a set of hosts/IPs to do something with.for addr in addrs:if self.checkForStop():- return None+ return# Does the host/IP match to the original target?if self.getTarget().matches(addr):@@ -287,8 +287,8 @@ class sfp_dnsresolve(SpiderFootPlugin):if parentHash in self.hostresults[host] or parentEvent.data == host:self.sf.debug("Skipping host, " + host + ", already processed.")return None- else:- self.hostresults[host] = self.hostresults[host] + [parentHash]++ self.hostresults[host] = self.hostresults[host] + [parentHash]self.sf.debug("Found host: " + host)# If the returned hostname is aliaseed to ourdiff --git a/modules/sfp_email.py b/modules/sfp_email.pyindex 71fbc6ac..c7292af3 100644--- a/modules/sfp_email.py+++ b/modules/sfp_email.py@@ -99,6 +99,4 @@ class sfp_email(SpiderFootPlugin):evt.moduleDataSource = "Unknown"self.notifyListeners(evt)- return None-# End of sfp_email classdiff --git a/modules/sfp_emailformat.py b/modules/sfp_emailformat.pyindex 6a54e1d9..bf5337de 100644--- a/modules/sfp_emailformat.py+++ b/modules/sfp_emailformat.py@@ -106,6 +106,4 @@ class sfp_emailformat(SpiderFootPlugin):evt = SpiderFootEvent(evttype, email, self.__name__, event)self.notifyListeners(evt)- return None-# End of sfp_emailformat classdiff --git a/modules/sfp_errors.py b/modules/sfp_errors.pyindex bae8679a..52403955 100644--- a/modules/sfp_errors.py+++ b/modules/sfp_errors.py@@ -105,6 +105,4 @@ class sfp_errors(SpiderFootPlugin):self.__name__, event)self.notifyListeners(evt)- return None-# End of sfp_errors classdiff --git a/modules/sfp_ethereum.py b/modules/sfp_ethereum.pyindex 30591111..d1f84e0f 100644--- a/modules/sfp_ethereum.py+++ b/modules/sfp_ethereum.py@@ -57,9 +57,9 @@ class sfp_ethereum(SpiderFootPlugin):sourceData = self.sf.hashstring(eventData)if sourceData in self.results:- return None- else:- self.results[sourceData] = True+ return++ self.results[sourceData] = Trueself.sf.debug(f"Received event, {eventName}, from {srcModuleName}")@@ -70,6 +70,4 @@ class sfp_ethereum(SpiderFootPlugin):evt = SpiderFootEvent("ETHEREUM_ADDRESS", m, self.__name__, event)self.notifyListeners(evt)- return None-# End of sfp_ethereum classdiff --git a/modules/sfp_fortinet.py b/modules/sfp_fortinet.pyindex 4b3a6193..a75b412d 100644--- a/modules/sfp_fortinet.py+++ b/modules/sfp_fortinet.py@@ -189,6 +189,4 @@ class sfp_fortinet(SpiderFootPlugin):evt = SpiderFootEvent(evtType, text, self.__name__, event)self.notifyListeners(evt)- return None-# End of sfp_fortinet classdiff --git a/modules/sfp_googlemaps.py b/modules/sfp_googlemaps.pyindex 7fb1c7db..72eafd00 100644--- a/modules/sfp_googlemaps.py+++ b/modules/sfp_googlemaps.py@@ -162,6 +162,4 @@ class sfp_googlemaps(SpiderFootPlugin):)self.notifyListeners(evt)- return None-# End of sfp_googlemaps classdiff --git a/modules/sfp_hashes.py b/modules/sfp_hashes.pyindex c35b9e54..72a99b4f 100644--- a/modules/sfp_hashes.py+++ b/modules/sfp_hashes.py@@ -70,6 +70,4 @@ class sfp_hashes(SpiderFootPlugin):evt.moduleDataSource = "Unknown"self.notifyListeners(evt)- return None-# End of sfp_hashes classdiff --git a/modules/sfp_hosting.py b/modules/sfp_hosting.pyindex a6f10108..71ba8e02 100644--- a/modules/sfp_hosting.py+++ b/modules/sfp_hosting.py@@ -94,7 +94,8 @@ class sfp_hosting(SpiderFootPlugin):self.sf.debug(f"Received event, {eventName}, from {srcModuleName}")if eventData in self.results:- return None+ return+self.results[eventData] = Trueret = self.queryAddr(eventData)diff --git a/modules/sfp_hybrid_analysis.py b/modules/sfp_hybrid_analysis.pyindex 72b2130b..14bec249 100644--- a/modules/sfp_hybrid_analysis.py+++ b/modules/sfp_hybrid_analysis.py@@ -308,6 +308,4 @@ class sfp_hybrid_analysis(SpiderFootPlugin):evt = SpiderFootEvent("INTERNET_NAME", domain, self.__name__, event)self.notifyListeners(evt)- return None-# End of sfp_hybrid_analysis classdiff --git a/modules/sfp_iban.py b/modules/sfp_iban.pyindex ea1f7a85..451e10f8 100644--- a/modules/sfp_iban.py+++ b/modules/sfp_iban.py@@ -95,5 +95,4 @@ class sfp_iban(SpiderFootPlugin):evt.moduleDataSource = "Unknown"self.notifyListeners(evt)- return None# End of sfp_iban classdiff --git a/modules/sfp_ipinfo.py b/modules/sfp_ipinfo.pyindex e00aaf7c..ef97d9c1 100644--- a/modules/sfp_ipinfo.py+++ b/modules/sfp_ipinfo.py@@ -107,29 +107,29 @@ class sfp_ipinfo(SpiderFootPlugin):eventData = event.dataif self.errorState:- return None+ returnself.sf.debug(f"Received event, {eventName}, from {srcModuleName}")if self.opts['api_key'] == "":self.sf.error("You enabled sfp_ipinfo but did not set an API key!")self.errorState = True- return None+ return# Don't look up stuff twiceif eventData in self.results:self.sf.debug(f"Skipping {eventData}, already checked.")- return None+ returnself.results[eventData] = Truedata = self.queryIP(eventData)if data is None:- return None+ returnif 'country' not in data:- return None+ returnlocation = ', '.join([_f for _f in [data.get('city'), data.get('region'), data.get('country')] if _f])self.sf.info("Found GeoIP for " + eventData + ": " + location)@@ -137,6 +137,4 @@ class sfp_ipinfo(SpiderFootPlugin):evt = SpiderFootEvent("GEOINFO", location, self.__name__, event)self.notifyListeners(evt)- return None-# End of sfp_ipinfo classdiff --git a/modules/sfp_ipstack.py b/modules/sfp_ipstack.pyindex 89eec1ee..87d60d1a 100644--- a/modules/sfp_ipstack.py+++ b/modules/sfp_ipstack.py@@ -117,6 +117,4 @@ class sfp_ipstack(SpiderFootPlugin):evt = SpiderFootEvent("GEOINFO", geoinfo, self.__name__, event)self.notifyListeners(evt)- return None-# End of sfp_ipstack classdiff --git a/modules/sfp_isc.py b/modules/sfp_isc.pyindex 7ee4ef8b..a330a29e 100644--- a/modules/sfp_isc.py+++ b/modules/sfp_isc.py@@ -197,6 +197,4 @@ class sfp_isc(SpiderFootPlugin):evt = SpiderFootEvent(evtType, text, self.__name__, event)self.notifyListeners(evt)- return None-# End of sfp_isc classdiff --git a/modules/sfp_keybase.py b/modules/sfp_keybase.pyindex 01a91ba5..f0972e6d 100644--- a/modules/sfp_keybase.py+++ b/modules/sfp_keybase.py@@ -259,6 +259,4 @@ class sfp_keybase(SpiderFootPlugin):evt = SpiderFootEvent("PGP_KEY", pgpKey, self.__name__, event)self.notifyListeners(evt)- return None-# End of sfp_keybase classdiff --git a/modules/sfp_leakix.py b/modules/sfp_leakix.pyindex 26be1d68..aa3d30a6 100644--- a/modules/sfp_leakix.py+++ b/modules/sfp_leakix.py@@ -188,6 +188,4 @@ class sfp_leakix(SpiderFootPlugin):evt = SpiderFootEvent("LEAKSITE_CONTENT", leak_data, self.__name__, event)self.notifyListeners(evt)- return None-# End of sfp_leakix classdiff --git a/modules/sfp_maltiverse.py b/modules/sfp_maltiverse.pyindex d44afcf5..caff581f 100644--- a/modules/sfp_maltiverse.py+++ b/modules/sfp_maltiverse.py@@ -242,5 +242,4 @@ class sfp_maltiverse(SpiderFootPlugin):self.notifyListeners(evt)- return None# End of sfp_maltiverse classdiff --git a/modules/sfp_malwaredomainlist.py b/modules/sfp_malwaredomainlist.pyindex 8c772229..00986881 100644--- a/modules/sfp_malwaredomainlist.py+++ b/modules/sfp_malwaredomainlist.py@@ -260,6 +260,4 @@ class sfp_malwaredomainlist(SpiderFootPlugin):evt = SpiderFootEvent(evtType, text, self.__name__, event)self.notifyListeners(evt)- return None-# End of sfp_malwaredomainlist classdiff --git a/modules/sfp_malwaredomains.py b/modules/sfp_malwaredomains.pyindex 88b81480..4e343e97 100644--- a/modules/sfp_malwaredomains.py+++ b/modules/sfp_malwaredomains.py@@ -235,6 +235,4 @@ class sfp_malwaredomains(SpiderFootPlugin):evt = SpiderFootEvent(evtType, text, self.__name__, event)self.notifyListeners(evt)- return None-# End of sfp_malwaredomains classdiff --git a/modules/sfp_multiproxy.py b/modules/sfp_multiproxy.pyindex 1619419d..0ea1893a 100644--- a/modules/sfp_multiproxy.py+++ b/modules/sfp_multiproxy.py@@ -234,6 +234,4 @@ class sfp_multiproxy(SpiderFootPlugin):evt = SpiderFootEvent(evtType, text, self.__name__, event)self.notifyListeners(evt)- return None-# End of sfp_multiproxy classdiff --git a/modules/sfp_opencorporates.py b/modules/sfp_opencorporates.pyindex b10f1787..074c7b7d 100644--- a/modules/sfp_opencorporates.py+++ b/modules/sfp_opencorporates.py@@ -194,7 +194,7 @@ class sfp_opencorporates(SpiderFootPlugin):if eventData in self.results:self.sf.debug(f"Skipping {eventData}, already checked.")- return None+ returnself.results[eventData] = True@@ -204,13 +204,13 @@ class sfp_opencorporates(SpiderFootPlugin):if res is None:self.sf.debug("Found no results for " + eventData)- return None+ returncompanies = res.get('companies')if not companies:self.sf.debug("Found no results for " + eventData)- return None+ returnfor c in companies:company = c.get('company')diff --git a/modules/sfp_openphish.py b/modules/sfp_openphish.pyindex 381fa2f7..7c99d540 100644--- a/modules/sfp_openphish.py+++ b/modules/sfp_openphish.py@@ -233,6 +233,4 @@ class sfp_openphish(SpiderFootPlugin):evt = SpiderFootEvent(evtType, text, self.__name__, event)self.notifyListeners(evt)- return None-# End of sfp_openphish classdiff --git a/modules/sfp_pageinfo.py b/modules/sfp_pageinfo.pyindex 053c42ce..da16e994 100644--- a/modules/sfp_pageinfo.py+++ b/modules/sfp_pageinfo.py@@ -70,7 +70,7 @@ class sfp_pageinfo(SpiderFootPlugin):# event.sourceEvent.data set to the URL of the source.if "sfp_spider" not in event.module:self.sf.debug("Ignoring web content from " + event.module)- return None+ returneventName = event.eventTypesrcModuleName = event.module@@ -83,11 +83,11 @@ class sfp_pageinfo(SpiderFootPlugin):# our base domain.if not self.getTarget().matches(self.sf.urlFQDN(eventSource)):self.sf.debug("Not gathering page info for external site " + eventSource)- return None+ returnif eventSource in self.results:self.sf.debug("Already checked this page for a page type, skipping.")- return None+ returnself.results[eventSource] = list()@@ -126,6 +126,4 @@ class sfp_pageinfo(SpiderFootPlugin):evt = SpiderFootEvent("PROVIDER_JAVASCRIPT", match, self.__name__, event)self.notifyListeners(evt)- return None-# End of sfp_pageinfo classdiff --git a/modules/sfp_pgp.py b/modules/sfp_pgp.pyindex cd3a2237..0a7e0310 100644--- a/modules/sfp_pgp.py+++ b/modules/sfp_pgp.py@@ -70,9 +70,9 @@ class sfp_pgp(SpiderFootPlugin):eventData = event.dataif eventData in self.results:- return None- else:- self.results[eventData] = True+ return++ self.results[eventData] = Trueself.sf.debug(f"Received event, {eventName}, from {srcModuleName}")@@ -125,6 +125,4 @@ class sfp_pgp(SpiderFootPlugin):evt = SpiderFootEvent("PGP_KEY", match, self.__name__, event)self.notifyListeners(evt)- return None-# End of sfp_pgp classdiff --git a/modules/sfp_phishstats.py b/modules/sfp_phishstats.pyindex b981a6e2..a2193816 100644--- a/modules/sfp_phishstats.py+++ b/modules/sfp_phishstats.py@@ -130,29 +130,29 @@ class sfp_phishstats(SpiderFootPlugin):# Don't look up stuff twiceif eventData in self.results:self.sf.debug(f"Skipping {eventData}, already checked.")- return None+ returnself.results[eventData] = Trueif eventName == 'NETBLOCK_OWNER':if not self.opts['netblocklookup']:- return None+ returnif IPNetwork(eventData).prefixlen < self.opts['maxnetblock']:self.sf.debug("Network size bigger than permitted: "+ str(IPNetwork(eventData).prefixlen) + " > "+ str(self.opts['maxnetblock']))- return None+ returnif eventName == 'NETBLOCK_MEMBER':if not self.opts['subnetlookup']:- return None+ returnif IPNetwork(eventData).prefixlen < self.opts['maxsubnet']:self.sf.debug("Network size bigger than permitted: "+ str(IPNetwork(eventData).prefixlen) + " > "+ str(self.opts['maxsubnet']))- return None+ returnqrylist = list()if eventName.startswith("NETBLOCK_"):@@ -162,13 +162,13 @@ class sfp_phishstats(SpiderFootPlugin):else:# If user has enabled affiliate checkingif eventName == "AFFILIATE_IPADDR" and not self.opts['checkaffiliates']:- return None+ returnqrylist.append(eventData)for addr in qrylist:if self.checkForStop():- return None+ returndata = self.queryIPAddress(addr)@@ -216,5 +216,4 @@ class sfp_phishstats(SpiderFootPlugin):self.notifyListeners(evt)- return None# End of sfp_phishstats classdiff --git a/modules/sfp_phishtank.py b/modules/sfp_phishtank.pyindex ef88d3e6..57e2677c 100644--- a/modules/sfp_phishtank.py+++ b/modules/sfp_phishtank.py@@ -229,6 +229,4 @@ class sfp_phishtank(SpiderFootPlugin):evt = SpiderFootEvent(evtType, text, self.__name__, event)self.notifyListeners(evt)- return None-# End of sfp_phishtank classdiff --git a/modules/sfp_phone.py b/modules/sfp_phone.pyindex a23ef597..44e31fca 100644--- a/modules/sfp_phone.py+++ b/modules/sfp_phone.py@@ -60,7 +60,7 @@ class sfp_phone(SpiderFootPlugin):sourceData = self.sf.hashstring(eventData)if sourceData in self.results:- return None+ returnelse:self.results[sourceData] = True@@ -84,13 +84,13 @@ class sfp_phone(SpiderFootPlugin):number = phonenumbers.parse(eventData)except Exception as e:self.sf.debug('Error parsing phone number: ' + str(e))- return None+ returntry:number_carrier = carrier.name_for_number(number, 'en')except Exception as e:self.sf.debug('Error retrieving phone number carrier: ' + str(e))- return None+ returnif number_carrier:evt = SpiderFootEvent("PROVIDER_TELCO", number_carrier, self.__name__, event)@@ -106,7 +106,7 @@ class sfp_phone(SpiderFootPlugin):# location = geocoder.description_for_number(number, 'en')# except Exception as e:# self.sf.debug('Error retrieving phone number location: ' + str(e))- # return None+ # return# if location:# evt = SpiderFootEvent("GEOINFO", location, self.__name__, event)@@ -114,6 +114,4 @@ class sfp_phone(SpiderFootPlugin):# else:# self.sf.debug("No location information found for " + eventData)- return None-# End of sfp_phone classdiff --git a/modules/sfp_projectdiscovery.py b/modules/sfp_projectdiscovery.pyindex 7412b0d7..1919b95d 100644--- a/modules/sfp_projectdiscovery.py+++ b/modules/sfp_projectdiscovery.py@@ -155,7 +155,4 @@ class sfp_projectdiscovery(SpiderFootPlugin):resultsSet.add(subdomain)- return None--# End of sfp_projectdiscovery classdiff --git a/modules/sfp_recondev.py b/modules/sfp_recondev.pyindex ed8451d9..160e7671 100644--- a/modules/sfp_recondev.py+++ b/modules/sfp_recondev.py@@ -137,10 +137,10 @@ class sfp_recondev(SpiderFootPlugin):eventData = event.dataif self.errorState:- return None+ returnif eventData in self.results:- return None+ returnself.results[eventData] = True@@ -151,16 +151,16 @@ class sfp_recondev(SpiderFootPlugin):f"You enabled {self.__class__.__name__} but did not set an API key!")self.errorState = True- return None+ returnif eventName not in ["DOMAIN_NAME"]:- return None+ returndata = self.queryDomain(eventData)if data is None:self.sf.debug(f"No information found for domain {eventData}")- return None+ returnevt = SpiderFootEvent('RAW_RIR_DATA', str(data), self.__name__, event)self.notifyListeners(evt)@@ -175,7 +175,7 @@ class sfp_recondev(SpiderFootPlugin):for domain in set(domains):if self.checkForStop():- return None+ returnif domain in self.results:continue@@ -191,6 +191,4 @@ class sfp_recondev(SpiderFootPlugin):evt = SpiderFootEvent("INTERNET_NAME", domain, self.__name__, event)self.notifyListeners(evt)- return None-# End of sfp_recondev classdiff --git a/modules/sfp_ripe.py b/modules/sfp_ripe.pyindex 7e178f11..346a7e8f 100644--- a/modules/sfp_ripe.py+++ b/modules/sfp_ripe.py@@ -278,9 +278,9 @@ class sfp_ripe(SpiderFootPlugin):# 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+ return++ self.results[eventData] = True# BGP AS Owner -> Other Netblocksif eventName == "BGP_AS_OWNER":@@ -307,7 +307,7 @@ class sfp_ripe(SpiderFootPlugin):event)self.notifyListeners(evt)- return None+ return# NETBLOCK -> AS and other owned netblocksif eventName.startswith("NETBLOCK_"):@@ -315,7 +315,7 @@ class sfp_ripe(SpiderFootPlugin):asn = self.netblockAs(eventData)if asn is None:self.sf.debug("Could not identify BGP AS for " + eventData)- return None+ returnif eventName == "NETBLOCK_OWNER" and self.ownsAs(asn):asevt = SpiderFootEvent("BGP_AS_OWNER", asn, self.__name__, event)@@ -327,7 +327,7 @@ class sfp_ripe(SpiderFootPlugin):asevt = SpiderFootEvent("BGP_AS_MEMBER", asn, self.__name__, event)self.notifyListeners(asevt)- return None+ return# IP ADDRESS -> NETBLOCKif eventName == "IP_ADDRESS":@@ -335,19 +335,17 @@ class sfp_ripe(SpiderFootPlugin):prefix = self.ipNetblock(eventData)if prefix is None:self.sf.debug("Could not identify network prefix for " + eventData)- return None+ return# Get the BGP AS the netblock is a part ofasn = self.netblockAs(prefix)if asn is None:self.sf.debug("Could not identify BGP AS for " + prefix)- return None+ returnif self.sf.validIpNetwork(prefix):self.sf.info("Netblock found: " + prefix + "(" + asn + ")")evt = SpiderFootEvent("NETBLOCK_MEMBER", prefix, self.__name__, event)self.notifyListeners(evt)- return None-# End of sfp_ripe classdiff --git a/modules/sfp_robtex.py b/modules/sfp_robtex.pyindex da1d9f19..efb76f64 100644--- a/modules/sfp_robtex.py+++ b/modules/sfp_robtex.py@@ -98,36 +98,36 @@ class sfp_robtex(SpiderFootPlugin):self.sf.debug(f"Received event, {eventName}, from {srcModuleName}")if self.cohostcount > self.opts['maxcohost']:- return None+ returnif srcModuleName == "sfp_robtex" and eventName == "IP_ADDRESS":self.sf.debug("Ignoring " + eventName + ", from self.")- return None+ return# Don't look up stuff twiceif eventData in self.results:self.sf.debug(f"Skipping {eventData}, already checked.")- return None+ returnif eventName == 'NETBLOCK_OWNER':if not self.opts['netblocklookup']:- return None+ returnelse:if IPNetwork(eventData).prefixlen < self.opts['maxnetblock']:self.sf.debug("Network size bigger than permitted: "+ str(IPNetwork(eventData).prefixlen) + " > "+ str(self.opts['maxnetblock']))- return None+ returnif eventName == 'NETBLOCK_MEMBER':if not self.opts['subnetlookup']:- return None+ returnelse:if IPNetwork(eventData).prefixlen < self.opts['maxsubnet']:self.sf.debug("Network size bigger than permitted: "+ str(IPNetwork(eventData).prefixlen) + " > "+ str(self.opts['maxsubnet']))- return None+ returnqrylist = list()if eventName.startswith("NETBLOCK_"):@@ -140,7 +140,7 @@ class sfp_robtex(SpiderFootPlugin):for ip in qrylist:if self.checkForStop():- return None+ returnretry = 0while retry < 2:@@ -148,7 +148,7 @@ class sfp_robtex(SpiderFootPlugin):if res['code'] == "200":breakif res['code'] == "404":- return None+ returnif res['code'] == "429":# Back off a little furthertime.sleep(2)@@ -163,11 +163,11 @@ class sfp_robtex(SpiderFootPlugin):data = json.loads(res['content'])except Exception as e:self.sf.error(f"Error parsing JSON from Robtex API: {e}")- return None+ returnpas = data.get('pas')if not pas:- return None+ returnif len(data.get('pas')) > 0:for r in data.get('pas'):diff --git a/modules/sfp_scylla.py b/modules/sfp_scylla.pyindex e30ec2d7..7a555f04 100644--- a/modules/sfp_scylla.py+++ b/modules/sfp_scylla.py@@ -122,10 +122,10 @@ class sfp_scylla(SpiderFootPlugin):eventData = event.dataif eventData in self.results:- return None+ returnif self.errorState:- return None+ returnself.results[eventData] = True@@ -141,7 +141,7 @@ class sfp_scylla(SpiderFootPlugin):while position < (per_page * max_pages):if self.checkForStop():- return None+ returnif self.errorState:break@@ -149,7 +149,7 @@ class sfp_scylla(SpiderFootPlugin):data = self.query(eventData, per_page, position)if not data:- return None+ returnposition += per_pagediff --git a/modules/sfp_securitytrails.py b/modules/sfp_securitytrails.pyindex dd3f50e3..0d6aac06 100644--- a/modules/sfp_securitytrails.py+++ b/modules/sfp_securitytrails.py@@ -151,21 +151,21 @@ class sfp_securitytrails(SpiderFootPlugin):eventData = event.dataif self.errorState:- return None+ returnself.sf.debug(f"Received event, {eventName}, from {srcModuleName}")if self.opts['api_key'] == "":self.sf.error("You enabled sfp_securitytrails but did not set an API uid/secret!")self.errorState = True- return None+ return# 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+ return++ self.results[eventData] = Trueif eventName in ["IP_ADDRESS", "IPV6_ADDRESS", "NETLBLOCK_OWNER"]:ip = eventDatadiff --git a/modules/sfp_shodan.py b/modules/sfp_shodan.pyindex 35c46ed3..d74f1a03 100644--- a/modules/sfp_shodan.py+++ b/modules/sfp_shodan.py@@ -98,12 +98,12 @@ class sfp_shodan(SpiderFootPlugin):return Nonetry:- info = json.loads(res['content'])+ return json.loads(res['content'])except Exception as e:self.sf.error(f"Error processing JSON response from SHODAN: {e}")return None- return info+ return Nonedef searchHosts(self, qry):res = self.sf.fetchUrl("https://api.shodan.io/shodan/host/search?query=hostname:" + qry@@ -115,12 +115,12 @@ class sfp_shodan(SpiderFootPlugin):return Nonetry:- info = json.loads(res['content'])+ return json.loads(res['content'])except Exception as e:self.sf.error(f"Error processing JSON response from SHODAN: {e}")return None- return info+ return Nonedef searchHtml(self, qry):params = {@@ -136,12 +136,12 @@ class sfp_shodan(SpiderFootPlugin):return Nonetry:- info = json.loads(res['content'])+ return json.loads(res['content'])except Exception as e:self.sf.error(f"Error processing JSON response from SHODAN: {e}")return None- return info+ return None# Handle events sent to this moduledef handleEvent(self, event):@@ -150,26 +150,26 @@ class sfp_shodan(SpiderFootPlugin):eventData = event.dataif self.errorState:- return None+ returnself.sf.debug(f"Received event, {eventName}, from {srcModuleName}")if self.opts['api_key'] == "":self.sf.error("You enabled sfp_shodan but did not set an API key!")self.errorState = True- return None+ return# Don't look up stuff twiceif eventData in self.results:self.sf.debug(f"Skipping {eventData}, already checked.")- return None+ returnelse:self.results[eventData] = Trueif eventName == "DOMAIN_NAME":hosts = self.searchHosts(eventData)if hosts is None:- return None+ returnevt = SpiderFootEvent("RAW_RIR_DATA", str(hosts), self.__name__, event)self.notifyListeners(evt)@@ -180,30 +180,30 @@ class sfp_shodan(SpiderFootPlugin):analytics_id = eventData.split(": ")[1]except Exception as e:self.sf.error(f"Unable to parse WEB_ANALYTICS_ID: {eventData} ({e})")- return None+ returnif network not in ['Google AdSense', 'Google Analytics', 'Google Site Verification']:self.sf.debug("Skipping " + eventData + ", as not supported.")- return None+ returnrec = self.searchHtml(analytics_id)if rec is None:- return None+ returnevt = SpiderFootEvent("RAW_RIR_DATA", str(rec), self.__name__, event)self.notifyListeners(evt)- return None+ returnif eventName == 'NETBLOCK_OWNER':if not self.opts['netblocklookup']:- return None+ returnelse:if IPNetwork(eventData).prefixlen < self.opts['maxnetblock']:self.sf.debug("Network size bigger than permitted: "+ str(IPNetwork(eventData).prefixlen) + " > "+ str(self.opts['maxnetblock']))- return None+ returnqrylist = list()if eventName.startswith("NETBLOCK_"):@@ -230,7 +230,7 @@ class sfp_shodan(SpiderFootPlugin):self.notifyListeners(evt)if self.checkForStop():- return None+ returnif rec.get('os') is not None:# Notify other modules of what you've found@@ -301,6 +301,5 @@ class sfp_shodan(SpiderFootPlugin):evt = SpiderFootEvent('VULNERABILITY', vuln,self.__name__, pevent)self.notifyListeners(evt)- return None# End of sfp_shodan classdiff --git a/modules/sfp_similar.py b/modules/sfp_similar.pyindex 339184d9..899fd6fb 100644--- a/modules/sfp_similar.py+++ b/modules/sfp_similar.py@@ -103,13 +103,13 @@ class sfp_similar(SpiderFootPlugin):dom = self.sf.domainKeyword(eventData, self.opts['_internettlds'])if not dom:- return None+ returntld = "." + eventData.split(dom + ".")[-1]self.sf.debug(f"Keyword extracted from {eventData}: {dom}")if dom in self.results:- return None+ returnself.results[dom] = True@@ -157,6 +157,4 @@ class sfp_similar(SpiderFootPlugin):except Exception:continue- return None-# End of sfp_similar classdiff --git a/modules/sfp_skymem.py b/modules/sfp_skymem.pyindex 249a5cbb..532efb66 100644--- a/modules/sfp_skymem.py+++ b/modules/sfp_skymem.py@@ -70,7 +70,7 @@ class sfp_skymem(SpiderFootPlugin):eventData = event.dataif eventData in self.results:- return None+ returnelse:self.results[eventData] = True@@ -80,7 +80,7 @@ class sfp_skymem(SpiderFootPlugin):res = self.sf.fetchUrl("http://www.skymem.info/srch?q=" + eventData, timeout=self.opts['_fetchtimeout'], useragent=self.opts['_useragent'])if res['content'] is None:- return None+ return# Extract emails from results pageemails = self.sf.parseEmails(res['content'])@@ -106,7 +106,7 @@ class sfp_skymem(SpiderFootPlugin):domain_ids = re.findall(r'<a href="/domain/([a-z0-9]+)\?p=', res['content'])if not domain_ids:- return None+ returndomain_id = domain_ids[0]@@ -143,6 +143,4 @@ class sfp_skymem(SpiderFootPlugin):if page >= max_page:break- return None-# End of sfp_skymem classdiff --git a/modules/sfp_snov.py b/modules/sfp_snov.pyindex a61140dc..f31e1a6d 100644--- a/modules/sfp_snov.py+++ b/modules/sfp_snov.py@@ -152,7 +152,7 @@ class sfp_snov(SpiderFootPlugin):eventData = event.dataif self.errorState:- return None+ returnself.sf.debug(f"Received event, {eventName}, from {srcModuleName}")@@ -161,28 +161,28 @@ class sfp_snov(SpiderFootPlugin):if self.opts['api_key_client_id'] == "" or self.opts['api_key_client_secret'] == "":self.sf.error("You enabled sfp_snov but did not set a Client ID and/or Client Secret")self.errorState = True- return None+ return# 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+ return++ self.results[eventData] = True# Get access token from Snov IO APIaccessToken = self.queryAccessToken()if accessToken is None or accessToken == '':self.sf.error("No access token received from snov.io for the provided Client ID and/or Client Secret")self.errorState = True- return None+ returncurrentOffset = 0nextPageHasData = Truewhile nextPageHasData:if self.checkForStop():- return None+ returndata = self.queryDomainName(eventData, accessToken, currentOffset)if data is None:@@ -224,5 +224,4 @@ class sfp_snov(SpiderFootPlugin):nextPageHasData = FalsecurrentOffset += self.limit- return None# End of sfp_snov classdiff --git a/modules/sfp_social.py b/modules/sfp_social.pyindex 56addc56..ec1a32e2 100644--- a/modules/sfp_social.py+++ b/modules/sfp_social.py@@ -70,7 +70,7 @@ class sfp_social(SpiderFootPlugin):self.sf.debug(f"Received event, {eventName}, from {srcModuleName}")if eventData in list(self.results.keys()):- return None+ returnself.results[eventData] = True@@ -95,6 +95,4 @@ class sfp_social(SpiderFootPlugin):evt = SpiderFootEvent("USERNAME", str(un), self.__name__, event)self.notifyListeners(evt)- return None-# End of sfp_social classdiff --git a/modules/sfp_socialprofiles.py b/modules/sfp_socialprofiles.pyindex a528d6ce..1ad32e43 100644--- a/modules/sfp_socialprofiles.py+++ b/modules/sfp_socialprofiles.py@@ -127,21 +127,21 @@ class sfp_socialprofiles(SpiderFootPlugin):self.currentEventSrc = eventif self.errorState:- return None+ returnself.sf.debug(f"Received event, {eventName}, from {srcModuleName}")if self.opts['google_api_key'] == "" and self.opts['bing_api_key'] == "":self.sf.error("You enabled sfp_socialprofiles but did not set a Google or Bing API key!")self.errorState = True- return None+ return# 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+ return++ self.results[eventData] = Trueif self.keywords is None:self.keywords = self.sf.domainKeywords(@@ -159,7 +159,7 @@ class sfp_socialprofiles(SpiderFootPlugin):self.sf.error("Yahoo is no longer supported. Please try 'bing' or 'google'.")- return None+ returnif self.opts["method"].lower() == "google":res = self.sf.googleIterate(@@ -190,7 +190,7 @@ class sfp_socialprofiles(SpiderFootPlugin):continueif self.checkForStop():- return None+ return# Submit the results for analysisevt = SpiderFootEvent(@@ -218,7 +218,7 @@ class sfp_socialprofiles(SpiderFootPlugin):instances.append(match)if self.checkForStop():- return None+ return# Fetch the profile page if we are checking# for a firm relationship.diff --git a/modules/sfp_sorbs.py b/modules/sfp_sorbs.pyindex 4e99125f..388ad61e 100644--- a/modules/sfp_sorbs.py+++ b/modules/sfp_sorbs.py@@ -163,28 +163,28 @@ class sfp_sorbs(SpiderFootPlugin):if eventName == 'NETBLOCK_OWNER':if not self.opts['netblocklookup']:- return None+ returnelse:if IPNetwork(eventData).prefixlen < self.opts['maxnetblock']:self.sf.debug("Network size bigger than permitted: "+ str(IPNetwork(eventData).prefixlen) + " > "+ str(self.opts['maxnetblock']))- return None+ returnif eventName == 'NETBLOCK_MEMBER':if not self.opts['subnetlookup']:- return None+ returnelse:if IPNetwork(eventData).prefixlen < self.opts['maxsubnet']:self.sf.debug("Network size bigger than permitted: "+ str(IPNetwork(eventData).prefixlen) + " > "+ str(self.opts['maxsubnet']))- return None+ returnif eventName.startswith("NETBLOCK_"):for addr in IPNetwork(eventData):if self.checkForStop():- return None+ returnself.queryAddr(str(addr), parentEvent)else:self.queryAddr(eventData, parentEvent)diff --git a/modules/sfp_spamhaus.py b/modules/sfp_spamhaus.pyindex db5587e0..8b82d3a9 100644--- a/modules/sfp_spamhaus.py+++ b/modules/sfp_spamhaus.py@@ -156,32 +156,32 @@ class sfp_spamhaus(SpiderFootPlugin):self.sf.debug(f"Received event, {eventName}, from {srcModuleName}")if eventData in self.results:- return None+ returnself.results[eventData] = Trueif eventName == 'NETBLOCK_OWNER':if not self.opts['netblocklookup']:- return None+ returnmax_netblock = self.opts['maxnetblock']if IPNetwork(eventData).prefixlen < max_netblock:self.sf.debug(f"Network size bigger than permitted: {IPNetwork(eventData).prefixlen} > {max_netblock}")- return None+ returnif eventName == 'NETBLOCK_MEMBER':if not self.opts['subnetlookup']:- return None+ returnmax_subnet = self.opts['maxsubnet']if IPNetwork(eventData).prefixlen < max_subnet:self.sf.debug(f"Network size bigger than permitted: {IPNetwork(eventData).prefixlen} > {max_subnet}")- return None+ returnif eventName.startswith("NETBLOCK_"):for addr in IPNetwork(eventData):if self.checkForStop():- return None+ returnself.queryAddr(str(addr), parentEvent)else:self.queryAddr(eventData, parentEvent)diff --git a/modules/sfp_spider.py b/modules/sfp_spider.pyindex 57adf0c3..06055431 100644--- a/modules/sfp_spider.py+++ b/modules/sfp_spider.py@@ -238,7 +238,7 @@ class sfp_spider(SpiderFootPlugin):self.notifyListeners(event)if not httpresult.get('headers'):- return None+ returnctype = httpresult['headers'].get('content-type')if ctype:@@ -326,7 +326,7 @@ class sfp_spider(SpiderFootPlugin):self.robotsRules[targetBase] = self.sf.parseRobotsTxt(robotsTxt['content'])if self.checkForStop():- return None+ return# First iteration we are starting with links found on the start page# Iterations after that are based on links found on those pages,@@ -335,7 +335,7 @@ class sfp_spider(SpiderFootPlugin):if links is None:self.sf.debug("No links found on the first fetch!")- return None+ returnwhile keepSpidering:# Gets hit in the second and subsequent iterations when more links@@ -352,7 +352,7 @@ class sfp_spider(SpiderFootPlugin):# Check if we've been asked to stopif self.checkForStop():- return None+ returnself.sf.debug("Fetching fresh content from: " + link)time.sleep(self.opts['pausesec'])diff --git a/modules/sfp_spur.py b/modules/sfp_spur.pyindex bcc858fa..3df44aee 100644--- a/modules/sfp_spur.py+++ b/modules/sfp_spur.py@@ -129,9 +129,7 @@ class sfp_spur(SpiderFootPlugin):self.sf.error("Unable to fetch data from spur.us")return None- content = res.get('content')-- return content+ return res.get('content')def handleEvent(self, event):eventName = event.eventType@@ -139,7 +137,7 @@ class sfp_spur(SpiderFootPlugin):eventData = event.dataif self.errorState:- return None+ returnself.sf.debug(f"Received event, {eventName}, from {srcModuleName}")@@ -148,34 +146,34 @@ class sfp_spur(SpiderFootPlugin):if self.opts['api_key'] == "":self.sf.error("You enabled sfp_spur but did not set an API key!")self.errorState = True- return None+ return# Don't look up stuff twiceif eventData in self.results:self.sf.debug(f"Skipping {eventData}, already checked.")- return None+ returnself.results[eventData] = Trueif eventName == 'NETBLOCK_OWNER':if not self.opts['netblocklookup']:- return None+ returnif IPNetwork(eventData).prefixlen < self.opts['maxnetblock']:self.sf.debug("Network size bigger than permitted: "+ str(IPNetwork(eventData).prefixlen) + " > "+ str(self.opts['maxnetblock']))- return None+ returnif eventName == 'NETBLOCK_MEMBER':if not self.opts['subnetlookup']:- return None+ returnif IPNetwork(eventData).prefixlen < self.opts['maxsubnet']:self.sf.debug("Network size bigger than permitted: "+ str(IPNetwork(eventData).prefixlen) + " > "+ str(self.opts['maxsubnet']))- return None+ returnqrylist = list()if eventName.startswith("NETBLOCK_"):@@ -185,13 +183,13 @@ class sfp_spur(SpiderFootPlugin):else:# If user has enabled affiliate checkingif eventName == "AFFILIATE_IPADDR" and not self.opts['checkaffiliates']:- return None+ returnqrylist.append(eventData)for addr in qrylist:if self.checkForStop():- return None+ returncontent = self.queryIPAddress(addr)@@ -281,6 +279,4 @@ class sfp_spur(SpiderFootPlugin):evt = SpiderFootEvent("MALICIOUS_IPADDR", maliciousIPDesc, self.__name__, event)self.notifyListeners(evt)- return None-# End of sfp_spur classdiff --git a/modules/sfp_spyonweb.py b/modules/sfp_spyonweb.pyindex 72021863..dd444f93 100644--- a/modules/sfp_spyonweb.py+++ b/modules/sfp_spyonweb.py@@ -195,10 +195,10 @@ class sfp_spyonweb(SpiderFootPlugin):eventData = event.dataif self.errorState:- return None+ returnif eventData in self.results:- return None+ returnself.results[eventData] = True@@ -207,7 +207,7 @@ class sfp_spyonweb(SpiderFootPlugin):if self.opts['api_key'] == "":self.sf.error("You enabled sfp_spyonweb but did not set an API key!")self.errorState = True- return None+ returnagelimit = int(time.time() * 1000) - (86400000 * self.opts['maxage'])@@ -217,7 +217,7 @@ class sfp_spyonweb(SpiderFootPlugin):if data is None:self.sf.info(f"No data found for {eventData}")- return None+ returngoogle_adsense = data.get('adsense')@@ -240,7 +240,7 @@ class sfp_spyonweb(SpiderFootPlugin):analytics_id = eventData.split(": ")[1]except Exception as e:self.sf.error(f"Unable to parse WEB_ANALYTICS_ID: {eventData} ({e})")- return None+ returndata = dict()if network == 'Google AdSense':@@ -248,11 +248,11 @@ class sfp_spyonweb(SpiderFootPlugin):elif network == 'Google Analytics':data = self.queryGoogleAnalytics(analytics_id, limit=self.opts['limit'])else:- return None+ returnif data is None:self.sf.info("No data found for " + eventData)- return None+ returnfor r in list(data.keys()):last_seen = int(datetime.datetime.strptime(data[r], '%Y-%m-%d').strftime('%s')) * 1000@@ -274,7 +274,7 @@ class sfp_spyonweb(SpiderFootPlugin):if data is None:self.sf.info("No data found for " + eventData)- return None+ returnself.cohostcount = 0diff --git a/modules/sfp_spyse.py b/modules/sfp_spyse.pyindex 49c581a4..a06908dc 100644--- a/modules/sfp_spyse.py+++ b/modules/sfp_spyse.py@@ -308,19 +308,19 @@ class sfp_spyse(SpiderFootPlugin):def handleEvent(self, event):if self.errorState:- return None+ returnif self.opts['api_key'] == '':self.sf.error("You enabled sfp_spyse but did not set an API key!")self.errorState = True- return None+ returneventName = event.eventTypesrcModuleName = event.moduleeventData = event.dataif eventData in self.results:- return None+ returnself.results[eventData] = True@@ -334,7 +334,7 @@ class sfp_spyse(SpiderFootPlugin):while nextPageHasData:if self.checkForStop():- return None+ returndata = self.queryDomainsOnIP(eventData, currentOffset)if not data:@@ -394,7 +394,7 @@ class sfp_spyse(SpiderFootPlugin):while nextPageHasData:if self.checkForStop():- return None+ returndata = self.queryIPPort(eventData, currentOffset)if not data:nextPageHasData = False@@ -439,7 +439,7 @@ class sfp_spyse(SpiderFootPlugin):while nextPageHasData:if self.checkForStop():- return None+ returndata = self.querySubdomains(eventData, currentOffset)if not data:@@ -484,6 +484,4 @@ class sfp_spyse(SpiderFootPlugin):evt = SpiderFootEvent("INTERNET_NAME", domain, self.__name__, event)self.notifyListeners(evt)- return None-# End of sfp_spyse classdiff --git a/modules/sfp_sslcert.py b/modules/sfp_sslcert.pyindex b33bf58b..a731e6c4 100644--- a/modules/sfp_sslcert.py+++ b/modules/sfp_sslcert.py@@ -82,7 +82,7 @@ class sfp_sslcert(SpiderFootPlugin):if eventName == "LINKED_URL_INTERNAL":if not eventData.lower().startswith("https://") and not self.opts['tryhttp']:- return None+ returntry:# Handle URLs containing port numbers@@ -93,7 +93,7 @@ class sfp_sslcert(SpiderFootPlugin):fqdn = self.sf.urlFQDN(eventData.lower())except Exception:self.sf.debug("Couldn't parse URL: " + eventData)- return None+ returnelse:fqdn = eventDataport = 443@@ -101,7 +101,7 @@ class sfp_sslcert(SpiderFootPlugin):if fqdn not in self.results:self.results[fqdn] = Trueelse:- return None+ returnself.sf.debug("Testing SSL for: " + fqdn + ':' + str(port))# Re-fetch the certificate from the site and process@@ -113,7 +113,7 @@ class sfp_sslcert(SpiderFootPlugin):cert = self.sf.parseCert(str(pemcert), fqdn, self.opts['certexpiringdays'])except Exception as x:self.sf.info("Unable to SSL-connect to " + fqdn + " (" + str(x) + ")")- return None+ returnif eventName in ['INTERNET_NAME', 'IP_ADDRESS']:evt = SpiderFootEvent('TCP_PORT_OPEN', fqdn + ':' + str(port), self.__name__, event)@@ -121,7 +121,7 @@ class sfp_sslcert(SpiderFootPlugin):if not cert.get('text'):self.sf.info("Failed to parse the SSL cert for " + fqdn)- return None+ return# Generate the event for the raw cert (in text form)# Cert raw data text contains a lot of gems..@@ -166,11 +166,10 @@ class sfp_sslcert(SpiderFootPlugin):if cert.get('expired'):evt = SpiderFootEvent("SSL_CERTIFICATE_EXPIRED", cert.get('expirystr', 'Unknown'), self.__name__, event)self.notifyListeners(evt)- return None+ returnif cert.get('expiring'):evt = SpiderFootEvent("SSL_CERTIFICATE_EXPIRING", cert.get('expirystr', 'Unknown'), self.__name__, event)self.notifyListeners(evt)- return None# End of sfp_sslcert classdiff --git a/modules/sfp_strangeheaders.py b/modules/sfp_strangeheaders.pyindex 75bdae9a..a0e02768 100644--- a/modules/sfp_strangeheaders.py+++ b/modules/sfp_strangeheaders.py@@ -69,21 +69,21 @@ class sfp_strangeheaders(SpiderFootPlugin):self.sf.debug(f"Received event, {eventName}, from {srcModuleName}")if eventSource in self.results:- return None- else:- self.results[eventSource] = True+ return++ self.results[eventSource] = Trueif not self.getTarget().matches(self.sf.urlFQDN(eventSource)):self.sf.debug("Not collecting header information for external sites.")- return None+ returntry:jdata = json.loads(eventData)if jdata is None:- return None+ returnexcept Exception:self.sf.error("Received HTTP headers from another module in an unexpected format.")- return None+ returnfor key in jdata:if key.lower() not in headers:diff --git a/modules/sfp_subdomain_takeover.py b/modules/sfp_subdomain_takeover.pyindex c8f9e248..43d0eb64 100644--- a/modules/sfp_subdomain_takeover.py+++ b/modules/sfp_subdomain_takeover.py@@ -56,7 +56,7 @@ class sfp_subdomain_takeover(SpiderFootPlugin):if res['content'] is None:self.sf.error("Unable to fetch %s" % url)self.errorState = True- return None+ returnself.sf.cachePut("subjack-fingerprints", res['content'])content = res['content']@@ -66,7 +66,7 @@ class sfp_subdomain_takeover(SpiderFootPlugin):except Exception as e:self.sf.error(f"Unable to parse subdomain takeover fingerprints list: {e}")self.errorState = True- return None+ return# What events is this module interested in for inputdef watchedEvents(self):@@ -83,10 +83,10 @@ class sfp_subdomain_takeover(SpiderFootPlugin):eventData = event.dataif self.errorState:- return None+ returnif eventData in self.results:- return None+ returnself.results[eventData] = True@@ -124,8 +124,6 @@ class sfp_subdomain_takeover(SpiderFootPlugin):self.notifyListeners(evt)break- return None-if eventName == "AFFILIATE_INTERNET_NAME_UNRESOLVED":for data in self.fingerprints:service = data.get("service")@@ -142,6 +140,4 @@ class sfp_subdomain_takeover(SpiderFootPlugin):evt = SpiderFootEvent("AFFILIATE_INTERNET_NAME_HIJACKABLE", eventData, self.__name__, event)self.notifyListeners(evt)- return None-# End of sfp_subdomain_takeover classdiff --git a/modules/sfp_talosintel.py b/modules/sfp_talosintel.pyindex df79904b..109e31c5 100644--- a/modules/sfp_talosintel.py+++ b/modules/sfp_talosintel.py@@ -193,19 +193,19 @@ class sfp_talosintel(SpiderFootPlugin):if eventData in self.results:self.sf.debug(f"Skipping {eventData}, already checked.")- return None+ returnself.results[eventData] = Trueif eventName == 'CO_HOSTED_SITE' and not self.opts.get('checkcohosts', False):- return None+ returnif eventName == 'AFFILIATE_IPADDR' \and not self.opts.get('checkaffiliates', False):- return None+ returnif eventName == 'NETBLOCK_OWNER' and not self.opts.get('checknetblocks', False):- return None+ returnif eventName == 'NETBLOCK_MEMBER' and not self.opts.get('checksubnets', False):- return None+ returnfor check in list(malchecks.keys()):cid = malchecks[check]['id']@@ -241,7 +241,7 @@ class sfp_talosintel(SpiderFootPlugin):url = self.lookupItem(cid, typeId, eventData)if self.checkForStop():- return None+ return# Notify other modules of what you've foundif url is not None:@@ -249,6 +249,4 @@ class sfp_talosintel(SpiderFootPlugin):evt = SpiderFootEvent(evtType, text, self.__name__, event)self.notifyListeners(evt)- return None-# End of sfp_talosintel classdiff --git a/modules/sfp_template.py b/modules/sfp_template.pyindex 98c5d01c..df6be2cf 100644--- a/modules/sfp_template.py+++ b/modules/sfp_template.py@@ -238,12 +238,11 @@ class sfp_template(SpiderFootPlugin):# Always process external data which is expected to be in a specific format# with try/except since we cannot trust the data is formatted as intended.try:- info = json.loads(res['content'])+ return json.loads(res['content'])except Exception as e:self.sf.error(f"Error processing JSON response from SHODAN: {e}")- return None- return info+ return None# Handle events sent to this moduledef handleEvent(self, event):@@ -252,28 +251,16 @@ class sfp_template(SpiderFootPlugin):# event.module - the name of the module that generated the event, e.g. sfp_dnsresolve# event.data - the actual data, e.g. 127.0.0.1. This can sometimes be megabytes in size (e.g. a PDF)eventName = event.eventType- srcModuleName = event.moduleeventData = event.data# Once we are in this state, return immediately.if self.errorState:- return None-- # Log this before complaining about a missing API key so we know the- # event was received.- self.sf.debug(f"Received event, {eventName}, from {srcModuleName}")-- # Always check if the API key is set and complain if it isn't, then set- # self.errorState to avoid this being a continual complaint during the scan.- if self.opts['api_key'] == "":- self.sf.error("You enabled sfp_template but did not set an API key!")- self.errorState = True- return None+ return# Don't look up stuff twiceif eventData in self.results:self.sf.debug(f"Skipping {eventData}, already checked.")- return None+ return# If eventData might be something large, set the key to a hash# of the value instead of the value, to avoid memory abuse.self.results[eventData] = True@@ -281,13 +268,13 @@ class sfp_template(SpiderFootPlugin):if eventName == 'NETBLOCK_OWNER':# Note here an example of handling the netblocklookup optionif not self.opts['netblocklookup']:- return None+ returnelse:if IPNetwork(eventData).prefixlen < self.opts['maxnetblock']:self.sf.debug("Network size bigger than permitted: "+ str(IPNetwork(eventData).prefixlen) + " > "+ str(self.opts['maxnetblock']))- return None+ return# When handling netblocks/subnets, assuming the user set# netblocklookup/subnetlookup to True, we need to expand it@@ -345,7 +332,7 @@ class sfp_template(SpiderFootPlugin):# Whenever operating in a loop, call this to check whether the user# requested the scan to be aborted.if self.checkForStop():- return None+ return# In some cases, you want to override the data source for the event# you're producing to be the data source of the event that you'vediff --git a/modules/sfp_threatminer.py b/modules/sfp_threatminer.pyindex 22fa9665..843c0314 100644--- a/modules/sfp_threatminer.py+++ b/modules/sfp_threatminer.py@@ -119,12 +119,11 @@ class sfp_threatminer(SpiderFootPlugin):return Nonetry:- info = json.loads(res['content'])+ return json.loads(res['content'])except Exception as e:self.sf.error(f"Error processing JSON response from ThreatMiner: {e}")- return None- return info+ return None# Handle events sent to this moduledef handleEvent(self, event):@@ -137,29 +136,29 @@ class sfp_threatminer(SpiderFootPlugin):# 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+ return++ self.results[eventData] = Trueif eventName == 'NETBLOCK_OWNER':if not self.opts['netblocklookup']:- return None+ returnelse:if IPNetwork(eventData).prefixlen < self.opts['maxnetblock']:self.sf.debug("Network size bigger than permitted: "+ str(IPNetwork(eventData).prefixlen) + " > "+ str(self.opts['maxnetblock']))- return None+ returnif eventName == 'NETBLOCK_MEMBER':if not self.opts['subnetlookup']:- return None+ returnelse:if IPNetwork(eventData).prefixlen < self.opts['maxsubnet']:self.sf.debug("Network size bigger than permitted: "+ str(IPNetwork(eventData).prefixlen) + " > "+ str(self.opts['maxsubnet']))- return None+ returnqrylist = list()if eventName.startswith("NETBLOCK_"):@@ -176,7 +175,7 @@ class sfp_threatminer(SpiderFootPlugin):ret = self.query(qry, "passive")if ret is None:self.sf.info("No Passive DNS info for " + qry)- return None+ returnif "results" not in ret:continue@@ -218,11 +217,11 @@ class sfp_threatminer(SpiderFootPlugin):ret = self.query(eventData, "subs")if ret is None:self.sf.debug("No hosts found")- return None+ returnif len(ret.get("results", list())) == 0:self.sf.debug("No hosts found")- return None+ returnfor rec in ret.get("results"):self.sf.debug("Found host results in ThreatMiner")diff --git a/modules/sfp_tldsearch.py b/modules/sfp_tldsearch.pyindex 2d4727c5..dd338ed9 100644--- a/modules/sfp_tldsearch.py+++ b/modules/sfp_tldsearch.py@@ -79,7 +79,7 @@ class sfp_tldsearch(SpiderFootPlugin):resolver.nameservers = [self.opts['_dnsserver']]if self.opts['skipwildcards'] and self.sf.checkDnsWildcard(tld):- return None+ returntry:addrs = self.sf.resolveHost(target)@@ -132,7 +132,7 @@ class sfp_tldsearch(SpiderFootPlugin):# Inform listening modulesif self.opts['activeonly']:if self.checkForStop():- return None+ returnpageContent = self.sf.fetchUrl('http://' + result,timeout=self.opts['_fetchtimeout'],@@ -151,7 +151,7 @@ class sfp_tldsearch(SpiderFootPlugin):eventData = event.dataif eventData in self.results:- return None+ returnelse:self.results[eventData] = True@@ -160,7 +160,7 @@ class sfp_tldsearch(SpiderFootPlugin):targetList = list()if keyword in self.results:- return None+ returnelse:self.results[keyword] = True@@ -183,7 +183,7 @@ class sfp_tldsearch(SpiderFootPlugin):tryDomain = keyword + "." + tldif self.checkForStop():- return None+ returnif len(targetList) <= self.opts['_maxthreads']:targetList.append([tryDomain, tld])@@ -195,6 +195,4 @@ class sfp_tldsearch(SpiderFootPlugin):if len(targetList) > 0:self.tryTldWrapper(targetList, event)- return None-# End of sfp_tldsearch classdiff --git a/modules/sfp_tool_cmseek.py b/modules/sfp_tool_cmseek.pyindex 2edcd70d..db2174ed 100644--- a/modules/sfp_tool_cmseek.py+++ b/modules/sfp_tool_cmseek.py@@ -78,19 +78,19 @@ class sfp_tool_cmseek(SpiderFootPlugin):self.sf.debug(f"Received event, {eventName}, from {srcModuleName}")if self.errorState:- return None+ return# Don't look up stuff twice, check IP == IP hereif eventData in self.results:self.sf.debug("Skipping " + eventData + " as already scanned.")- return None- else:- self.results[eventData] = True+ return++ self.results[eventData] = Trueif not self.opts['cmseekpath']:self.sf.error("You enabled sfp_tool_cmseek but did not set a path to the tool!")self.errorState = True- return None+ return# Normalize pathif self.opts['cmseekpath'].endswith('cmseek.py'):@@ -107,12 +107,12 @@ class sfp_tool_cmseek(SpiderFootPlugin):if not os.path.isfile(exe):self.sf.error("File does not exist: " + exe)self.errorState = True- return None+ return# Sanitize domain name.if not self.sf.sanitiseInput(eventData):self.sf.error("Invalid input, refusing to run.")- return None+ returntry:p = Popen([self.opts['pythonpath'], exe, "--follow-redirect", "-u", eventData], stdout=PIPE, stderr=PIPE)@@ -122,11 +122,11 @@ class sfp_tool_cmseek(SpiderFootPlugin):else:self.sf.error("Unable to read CMSeeK content.")self.sf.debug("Error running CMSeeK: " + stderr + ", " + stdout)- return None+ returnif "CMS Detection failed" in content:self.sf.debug("Couldn't detect the CMS for " + eventData)- return None+ returntry:f = io.open(resultpath + "/" + eventData + "/cms.json", encoding='utf-8')@@ -136,9 +136,8 @@ class sfp_tool_cmseek(SpiderFootPlugin):self.notifyListeners(evt)except Exception as e:self.sf.error("Couldn't parse the JSON output of CMSeeK: " + str(e))- return None+ returnexcept Exception as e:self.sf.error("Unable to run CMSeeK: " + str(e))- return None# End of sfp_tool_cmseek classdiff --git a/modules/sfp_tool_dnstwist.py b/modules/sfp_tool_dnstwist.pyindex 61a50dc3..b59c17d5 100644--- a/modules/sfp_tool_dnstwist.py+++ b/modules/sfp_tool_dnstwist.py@@ -80,19 +80,19 @@ class sfp_tool_dnstwist(SpiderFootPlugin):self.sf.debug(f"Received event, {eventName}, from {srcModuleName}")if self.errorState:- return None+ return# Don't look up stuff twice, check IP == IP hereif eventData in self.results:self.sf.debug("Skipping " + eventData + " as already scanned.")- return None- else:- self.results[eventData] = True+ return++ self.results[eventData] = Trueif not self.opts['dnstwistpath']:self.sf.error("You enabled sfp_tool_dnstwist but did not set a path to the tool!")self.errorState = True- return None+ return# Normalize pathif self.opts['dnstwistpath'].endswith('dnstwist.py'):@@ -106,12 +106,12 @@ class sfp_tool_dnstwist(SpiderFootPlugin):if not os.path.isfile(exe):self.sf.error("File does not exist: " + exe)self.errorState = True- return None+ return# Sanitize domain name.if not self.sf.sanitiseInput(eventData):self.sf.error("Invalid input, refusing to run.")- return None+ returntry:p = Popen([self.opts['pythonpath'], exe, "-f", "json", "-r", eventData], stdout=PIPE, stderr=PIPE)@@ -121,7 +121,7 @@ class sfp_tool_dnstwist(SpiderFootPlugin):else:self.sf.error("Unable to read DNSTwist content.")self.sf.debug("Error running DNSTwist: " + stderr + ", " + stdout)- return None+ return# For each line in output, generate a SIMILARDOMAIN eventtry:@@ -135,9 +135,9 @@ class sfp_tool_dnstwist(SpiderFootPlugin):self.notifyListeners(evt)except Exception as e:self.sf.error("Couldn't parse the JSON output of DNSTwist: " + str(e))- return None+ returnexcept Exception as e:self.sf.error("Unable to run DNSTwist: " + str(e))- return None+ return# End of sfp_tool_dnstwist classdiff --git a/modules/sfp_tool_nmap.py b/modules/sfp_tool_nmap.pyindex 628b0674..7f49909f 100644--- a/modules/sfp_tool_nmap.py+++ b/modules/sfp_tool_nmap.py@@ -82,41 +82,41 @@ class sfp_tool_nmap(SpiderFootPlugin):if srcModuleName == "sfp_tool_nmap":self.sf.debug("Skipping event from myself.")- return None+ returnself.sf.debug(f"Received event, {eventName}, from {srcModuleName}")if self.errorState:- return None+ returntry:if eventName == "NETBLOCK_OWNER" and self.opts['netblockscan']:net = IPNetwork(eventData)if net.prefixlen < self.opts['netblockscanmax']:self.sf.debug("Skipping port scanning of " + eventData + ", too big.")- return None+ returnexcept Exception as e:self.sf.error("Strange netblock identified, unable to parse: " + eventData + " (" + str(e) + ")")- return None+ return# Don't look up stuff twice, check IP == IP hereif eventData in self.results:self.sf.debug("Skipping " + eventData + " as already scanned.")- return None+ returnelse:# Might be a subnet within a subnet or IP within a subnetfor addr in self.results:if IPNetwork(eventData) in IPNetwork(addr):self.sf.debug("Skipping " + eventData + " as already within a scanned range.")- return None+ returnself.results[eventData] = Trueif not self.opts['nmappath']:self.sf.error("You enabled sfp_tool_nmap but did not set a path to the tool!")self.errorState = True- return None+ return# Normalize pathif self.opts['nmappath'].endswith('nmap'):@@ -131,12 +131,12 @@ class sfp_tool_nmap(SpiderFootPlugin):if not os.path.isfile(exe):self.sf.error("File does not exist: " + exe)self.errorState = True- return None+ return# Sanitize domain name.if not self.sf.validIP(eventData) and not self.sf.validIpNetwork(eventData):self.sf.error("Invalid input, refusing to run.")- return None+ returntry:p = Popen([exe, "-O", "--osscan-limit", eventData], stdout=PIPE, stderr=PIPE)@@ -146,18 +146,18 @@ class sfp_tool_nmap(SpiderFootPlugin):else:self.sf.error("Unable to read Nmap content.")self.sf.debug("Error running Nmap: " + stderr + ", " + stdout)- return None+ returnif "No exact OS matches for host" in content or "OSScan results may be unreliable" in content:self.sf.debug("Couldn't reliably detect the OS for " + eventData)- return None+ returnexcept Exception as e:self.sf.error("Unable to run Nmap: " + str(e))- return None+ returnif not content:self.sf.debug("No content from Nmap to parse.")- return None+ returnif eventName == "IP_ADDRESS":try:@@ -170,7 +170,7 @@ class sfp_tool_nmap(SpiderFootPlugin):self.notifyListeners(evt)except Exception as e:self.sf.error("Couldn't parse the output of Nmap: " + str(e))- return None+ returnif eventName == "NETBLOCK_OWNER":try:@@ -191,6 +191,6 @@ class sfp_tool_nmap(SpiderFootPlugin):currentIp = Noneexcept Exception as e:self.sf.error(f"Couldn't parse the output of Nmap: {e}")- return None+ return# End of sfp_tool_nmap classdiff --git a/modules/sfp_tool_whatweb.py b/modules/sfp_tool_whatweb.pyindex cc2afff5..9e397d67 100644--- a/modules/sfp_tool_whatweb.py+++ b/modules/sfp_tool_whatweb.py@@ -78,18 +78,18 @@ class sfp_tool_whatweb(SpiderFootPlugin):self.sf.debug(f"Received event, {eventName}, from {srcModuleName}")if self.errorState:- return None+ returnif eventData in self.results:self.sf.debug("Skipping " + eventData + " as already scanned.")- return None+ returnself.results[eventData] = Trueif not self.opts['whatweb_path']:self.sf.error("You enabled sfp_tool_whatweb but did not set a path to the tool!")self.errorState = True- return None+ returnexe = self.opts['whatweb_path']if self.opts['whatweb_path'].endswith('/'):@@ -99,12 +99,12 @@ class sfp_tool_whatweb(SpiderFootPlugin):if not os.path.isfile(exe):self.sf.error("File does not exist: " + exe)self.errorState = True- return None+ return# Sanitize domain name.if not self.sf.sanitiseInput(eventData):self.sf.error("Invalid input, refusing to run.")- return None+ return# Set aggression leveltry:@@ -132,25 +132,25 @@ class sfp_tool_whatweb(SpiderFootPlugin):stdout, stderr = p.communicate(input=None)except Exception as e:self.sf.error(f"Unable to run WhatWeb: {e}")- return None+ returnif p.returncode != 0:self.sf.error("Unable to read WhatWeb output.")self.sf.debug("Error running WhatWeb: " + stderr + ", " + stdout)- return None+ returnif not stdout:self.sf.debug(f"WhatWeb returned no output for {eventData}")- return None+ returntry:result_json = json.loads(stdout)except Exception as e:self.sf.error(f"Couldn't parse the JSON output of WhatWeb: {e}")- return None+ returnif len(result_json) == 0:- return None+ returnevt = SpiderFootEvent('RAW_RIR_DATA', str(result_json), self.__name__, event)self.notifyListeners(evt)diff --git a/modules/sfp_torch.py b/modules/sfp_torch.pyindex 38489db3..29c4f0e9 100644--- a/modules/sfp_torch.py+++ b/modules/sfp_torch.py@@ -58,11 +58,11 @@ class sfp_torch(SpiderFootPlugin):eventData = event.dataif not self.opts['fullnames'] and eventName == 'HUMAN_NAME':- return None+ returnif eventData in self.results:self.sf.debug("Already did a search for " + eventData + ", skipping.")- return None+ returnself.results[eventData] = True@@ -74,13 +74,13 @@ class sfp_torch(SpiderFootPlugin):if not formpage['content']:self.sf.info("Couldn't connect to TORCH, check that you have TOR enabled.")- return None+ return# Need the form ID to submit later for the searchm = re.findall(r"\<form method=\"get\" action=\"/(\S+)/search.cgi\"\>",formpage['content'], re.IGNORECASE | re.DOTALL)if not m:- return None+ returnformid = m[0]@@ -90,7 +90,7 @@ class sfp_torch(SpiderFootPlugin):while "color=gray>next >>" not in pagecontent.lower() and pagecount < self.opts['pages']:# Check if we've been asked to stopif self.checkForStop():- return None+ returnif pagecount > 0:p = "&np=" + str(pagecount)@@ -106,12 +106,12 @@ class sfp_torch(SpiderFootPlugin):if data is None or not data.get('content'):self.sf.info("No results returned from TORCH.")- return None+ returnpagecontent = data['content']if "No documents were found" in data['content']:- return None+ return# Submit the google results for analysisevt = SpiderFootEvent(@@ -134,7 +134,7 @@ class sfp_torch(SpiderFootPlugin):if self.sf.urlFQDN(link).endswith(".onion"):if self.checkForStop():- return None+ returnif self.opts['fetchlinks']:res = self.sf.fetchUrl(diff --git a/modules/sfp_torexits.py b/modules/sfp_torexits.pyindex 7f622890..854a9f6c 100644--- a/modules/sfp_torexits.py+++ b/modules/sfp_torexits.py@@ -178,19 +178,19 @@ class sfp_torexits(SpiderFootPlugin):if eventData in self.results:self.sf.debug(f"Skipping {eventData}, already checked.")- return None+ returnself.results[eventData] = Trueif eventName == 'CO_HOSTED_SITE' and not self.opts.get('checkcohosts', False):- return None+ returnif eventName == 'AFFILIATE_IPADDR' \and not self.opts.get('checkaffiliates', False):- return None+ returnif eventName == 'NETBLOCK_OWNER' and not self.opts.get('checknetblocks', False):- return None+ returnif eventName == 'NETBLOCK_MEMBER' and not self.opts.get('checksubnets', False):- return None+ returnfor check in list(malchecks.keys()):cid = malchecks[check]['id']@@ -225,7 +225,7 @@ class sfp_torexits(SpiderFootPlugin):url = self.lookupItem(cid, typeId, eventData)if self.checkForStop():- return None+ return# Notify other modules of what you've foundif url is not None:@@ -233,6 +233,4 @@ class sfp_torexits(SpiderFootPlugin):evt = SpiderFootEvent(evtType, text, self.__name__, event)self.notifyListeners(evt)- return None-# End of sfp_torexits classdiff --git a/modules/sfp_totalhash.py b/modules/sfp_totalhash.pyindex 7b3aeb6d..45665e92 100644--- a/modules/sfp_totalhash.py+++ b/modules/sfp_totalhash.py@@ -149,15 +149,15 @@ class sfp_totalhash(SpiderFootPlugin):if eventData in self.results:self.sf.debug(f"Skipping {eventData}, already checked.")- return None+ returnself.results[eventData] = Trueif eventName == 'CO_HOSTED_SITE' and not self.opts.get('checkcohosts', False):- return None+ returnif eventName == 'AFFILIATE_IPADDR' \and not self.opts.get('checkaffiliates', False):- return None+ returnfor check in list(malchecks.keys()):cid = malchecks[check]['id']@@ -186,7 +186,7 @@ class sfp_totalhash(SpiderFootPlugin):url = self.lookupItem(cid, typeId, eventData)if self.checkForStop():- return None+ return# Notify other modules of what you've foundif url is not None:@@ -194,6 +194,4 @@ class sfp_totalhash(SpiderFootPlugin):evt = SpiderFootEvent(evtType, text, self.__name__, event)self.notifyListeners(evt)- return None-# End of sfp_totalhash classdiff --git a/modules/sfp_twilio.py b/modules/sfp_twilio.pyindex ca286c0e..07544e00 100644--- a/modules/sfp_twilio.py+++ b/modules/sfp_twilio.py@@ -118,7 +118,7 @@ class sfp_twilio(SpiderFootPlugin):eventData = event.dataif self.errorState:- return None+ returnself.sf.debug(f"Received event, {eventName}, from {srcModuleName}")@@ -127,18 +127,18 @@ class sfp_twilio(SpiderFootPlugin):if self.opts['api_key_account_sid'] == "" or self.opts['api_key_auth_token'] == "":self.sf.error("You enabled sfp_twilio but did not set account sid/auth token")self.errorState = True- return None+ returnif eventData in self.results:self.sf.debug(f"Skipping {eventData}, already checked.")- return None+ returnself.results[eventData] = Truecontent = self.queryPhoneNumber(eventData)if content is None:- return None+ returndata = json.loads(content)@@ -153,6 +153,4 @@ class sfp_twilio(SpiderFootPlugin):evt = SpiderFootEvent("COMPANY_NAME", callerName, self.__name__, event)self.notifyListeners(evt)- return None-# End of sfp_twilio classdiff --git a/modules/sfp_twitter.py b/modules/sfp_twitter.pyindex 868dd1bb..96079802 100644--- a/modules/sfp_twitter.py+++ b/modules/sfp_twitter.py@@ -65,9 +65,9 @@ class sfp_twitter(SpiderFootPlugin):eventData = event.dataif eventData in self.results:- return None- else:- self.results[eventData] = True+ return++ self.results[eventData] = Trueself.sf.debug(f"Received event, {eventName}, from {srcModuleName}")@@ -77,21 +77,21 @@ class sfp_twitter(SpiderFootPlugin):url = eventData.split(": ")[1].replace("<SFURL>", "").replace("</SFURL>", "")except Exception as e:self.sf.error(f"Unable to parse SOCIAL_MEDIA: {eventData} ({e})")- return None+ returnif not network == "Twitter":self.sf.debug("Skipping social network profile, " + url + ", as not a Twitter profile")- return None+ returnres = self.sf.fetchUrl(url, timeout=self.opts['_fetchtimeout'],useragent="SpiderFoot")if res['content'] is None:- return None+ returnif not res['code'] == "200":self.sf.debug(url + " is not a valid Twitter profile")- return None+ return# Retrieve namehuman_name = re.findall(r'<div class="fullname">([^<]+)\s*</div>',diff --git a/modules/sfp_uceprotect.py b/modules/sfp_uceprotect.pyindex 8de4d580..f0654acd 100644--- a/modules/sfp_uceprotect.py+++ b/modules/sfp_uceprotect.py@@ -95,7 +95,7 @@ class sfp_uceprotect(SpiderFootPlugin):for domain in self.checks:if self.checkForStop():- return None+ returntry:lookup = self.reverseAddr(qaddr) + "." + domain@@ -136,8 +136,6 @@ class sfp_uceprotect(SpiderFootPlugin):except Exception as e:self.sf.debug("Unable to resolve " + qaddr + " / " + lookup + ": " + str(e))- return None-# Handle events sent to this moduledef handleEvent(self, event):eventName = event.eventType@@ -148,33 +146,34 @@ class sfp_uceprotect(SpiderFootPlugin):self.sf.debug(f"Received event, {eventName}, from {srcModuleName}")if eventData in self.results:- return None+ return+self.results[eventData] = Trueif eventName == 'NETBLOCK_OWNER':if not self.opts['netblocklookup']:- return None+ returnelse:if IPNetwork(eventData).prefixlen < self.opts['maxnetblock']:self.sf.debug("Network size bigger than permitted: "+ str(IPNetwork(eventData).prefixlen) + " > "+ str(self.opts['maxnetblock']))- return None+ returnif eventName == 'NETBLOCK_MEMBER':if not self.opts['subnetlookup']:- return None+ returnelse:if IPNetwork(eventData).prefixlen < self.opts['maxsubnet']:self.sf.debug("Network size bigger than permitted: "+ str(IPNetwork(eventData).prefixlen) + " > "+ str(self.opts['maxsubnet']))- return None+ returnif eventName.startswith("NETBLOCK_"):for addr in IPNetwork(eventData):if self.checkForStop():- return None+ returnself.queryAddr(str(addr), parentEvent)else:self.queryAddr(eventData, parentEvent)diff --git a/modules/sfp_urlscan.py b/modules/sfp_urlscan.pyindex 40fb1e6c..4295d948 100644--- a/modules/sfp_urlscan.py+++ b/modules/sfp_urlscan.py@@ -92,12 +92,11 @@ class sfp_urlscan(SpiderFootPlugin):return Nonetry:- result = json.loads(res['content'])+ return json.loads(res['content'])except Exception as e:self.sf.debug(f"Error processing JSON response: {e}")- return None- return result+ return None# Handle events sent to this moduledef handleEvent(self, event):@@ -106,26 +105,26 @@ class sfp_urlscan(SpiderFootPlugin):eventData = event.dataif self.errorState:- return None+ returnself.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+ returnself.results[eventData] = Truedata = self.query(eventData)if data is None:- return None+ returnresults = data.get('results')if not results:- return None+ returnevt = SpiderFootEvent('RAW_RIR_DATA', str(results), self.__name__, event)self.notifyListeners(evt)@@ -209,6 +208,4 @@ class sfp_urlscan(SpiderFootPlugin):evt = SpiderFootEvent('WEBSERVER_BANNER', server, self.__name__, event)self.notifyListeners(evt)- return None-# End of sfp_ipinfo classdiff --git a/modules/sfp_venmo.py b/modules/sfp_venmo.pyindex a5dac68f..dbd2e1db 100644--- a/modules/sfp_venmo.py+++ b/modules/sfp_venmo.py@@ -91,7 +91,7 @@ class sfp_venmo(SpiderFootPlugin):eventData = event.dataif eventData in self.results:- return None+ returnself.results[eventData] = True@@ -100,7 +100,7 @@ class sfp_venmo(SpiderFootPlugin):data = self.query(eventData)if not data:- return None+ returne = SpiderFootEvent('RAW_RIR_DATA', str(data), self.__name__, event)self.notifyListeners(e)diff --git a/modules/sfp_viewdns.py b/modules/sfp_viewdns.pyindex 60ec4249..ae6049ee 100644--- a/modules/sfp_viewdns.py+++ b/modules/sfp_viewdns.py@@ -151,18 +151,18 @@ class sfp_viewdns(SpiderFootPlugin):eventData = event.dataif self.errorState:- return None+ returnself.sf.debug(f"Received event, {eventName}, from {srcModuleName}")if self.opts['api_key'] == "":self.sf.error("You enabled sfp_viewdns but did not set an API key!")self.errorState = True- return None+ returnif eventData in self.results:self.sf.debug(f"Skipping {eventData}, already checked.")- return None+ returnself.results[eventData] = True@@ -176,22 +176,22 @@ class sfp_viewdns(SpiderFootPlugin):elif eventName == "PROVIDER_DNS":if not self.getTarget().matches(eventData):self.sf.debug("DNS provider found but not related to target, skipping")- return None+ returnident = "reversens"valkey = "domain"else:- return None+ returnself.accum = list()self.query(eventData, ident)rec = self.accumif not rec:- return None+ return# Leave out registrar parking sites, and other highly used IPsif eventName == "IP_ADDRESS" and len(rec) > self.opts['maxcohost']:- return None+ returnmyres = list()diff --git a/modules/sfp_virustotal.py b/modules/sfp_virustotal.pyindex d0af9f15..0995a2b9 100644--- a/modules/sfp_virustotal.py+++ b/modules/sfp_virustotal.py@@ -129,13 +129,12 @@ class sfp_virustotal(SpiderFootPlugin):return Nonetry:- data = json.loads(res['content'])+ return json.loads(res['content'])except Exception as e:self.sf.error(f"Error processing JSON response from VirusTotal: {e}")self.errorState = True- return None- return data+ return Nonedef queryDomain(self, qry):params = urllib.parse.urlencode({@@ -158,13 +157,12 @@ class sfp_virustotal(SpiderFootPlugin):return Nonetry:- data = json.loads(res['content'])+ return json.loads(res['content'])except Exception as e:self.sf.error(f"Error processing JSON response from VirusTotal: {e}")self.errorState = True- return None- return data+ return Nonedef handleEvent(self, event):eventName = event.eventType@@ -172,7 +170,7 @@ class sfp_virustotal(SpiderFootPlugin):eventData = event.dataif self.errorState:- return None+ returnself.sf.debug(f"Received event, {eventName}, from {srcModuleName}")@@ -181,39 +179,39 @@ class sfp_virustotal(SpiderFootPlugin):f"You enabled {self.__class__.__name__} but did not set an API key!")self.errorState = True- return None+ returnif eventData in self.results:self.sf.debug(f"Skipping {eventData}, already checked.")- return None+ returnself.results[eventData] = Trueif eventName.startswith("AFFILIATE") and not self.opts['checkaffiliates']:- return None+ returnif eventName == 'CO_HOSTED_SITE' and not self.opts['checkcohosts']:- return None+ returnif eventName == 'NETBLOCK_OWNER':if not self.opts['netblocklookup']:- return None+ returnnet_size = IPNetwork(eventData).prefixlenmax_netblock = self.opts['maxnetblock']if net_size < max_netblock:self.sf.debug(f"Network size {net_size} bigger than permitted: {max_netblock}")- return None+ returnif eventName == 'NETBLOCK_MEMBER':if not self.opts['subnetlookup']:- return None+ returnnet_size = IPNetwork(eventData).prefixlenmax_subnet = self.opts['maxsubnet']if net_size < max_subnet:self.sf.debug(f"Network size {net_size} bigger than permitted: {max_subnet}")- return None+ returnqrylist = list()if eventName.startswith("NETBLOCK_"):@@ -225,7 +223,7 @@ class sfp_virustotal(SpiderFootPlugin):for addr in qrylist:if self.checkForStop():- return None+ returnif self.sf.validIP(addr):info = self.queryIp(addr)diff --git a/modules/sfp_voipbl.py b/modules/sfp_voipbl.pyindex 6c6b0a81..80abdc1a 100644--- a/modules/sfp_voipbl.py+++ b/modules/sfp_voipbl.py@@ -190,19 +190,19 @@ class sfp_voipbl(SpiderFootPlugin):if eventData in self.results:self.sf.debug(f"Skipping {eventData}, already checked.")- return None+ returnself.results[eventData] = Trueif eventName == 'CO_HOSTED_SITE' and not self.opts.get('checkcohosts', False):- return None+ returnif eventName == 'AFFILIATE_IPADDR' \and not self.opts.get('checkaffiliates', False):- return None+ returnif eventName == 'NETBLOCK_OWNER' and not self.opts.get('checknetblocks', False):- return None+ returnif eventName == 'NETBLOCK_MEMBER' and not self.opts.get('checksubnets', False):- return None+ returnfor check in list(malchecks.keys()):cid = malchecks[check]['id']@@ -238,7 +238,7 @@ class sfp_voipbl(SpiderFootPlugin):url = self.lookupItem(cid, typeId, eventData)if self.checkForStop():- return None+ return# Notify other modules of what you've foundif url is not None:@@ -246,6 +246,4 @@ class sfp_voipbl(SpiderFootPlugin):evt = SpiderFootEvent(evtType, text, self.__name__, event)self.notifyListeners(evt)- return None-# End of sfp_voipbl classdiff --git a/modules/sfp_vxvault.py b/modules/sfp_vxvault.pyindex 75bdbae0..f662fb33 100644--- a/modules/sfp_vxvault.py+++ b/modules/sfp_vxvault.py@@ -114,8 +114,8 @@ class sfp_vxvault(SpiderFootPlugin):if data['content'] is None:self.sf.error("Unable to fetch " + url)return None- else:- self.sf.cachePut("sfmal_" + cid, data['content'])++ self.sf.cachePut("sfmal_" + cid, data['content'])# If we're looking at netblocksif targetType == "netblock":@@ -191,15 +191,15 @@ class sfp_vxvault(SpiderFootPlugin):if eventData in self.results:self.sf.debug(f"Skipping {eventData}, already checked.")- return None+ returnself.results[eventData] = Trueif eventName == 'CO_HOSTED_SITE' and not self.opts.get('checkcohosts', False):- return None+ returnif eventName == 'AFFILIATE_IPADDR' \and not self.opts.get('checkaffiliates', False):- return None+ returnfor check in list(malchecks.keys()):cid = malchecks[check]['id']@@ -228,7 +228,7 @@ class sfp_vxvault(SpiderFootPlugin):url = self.lookupItem(cid, typeId, eventData)if self.checkForStop():- return None+ return# Notify other modules of what you've foundif url is not None:@@ -236,6 +236,4 @@ class sfp_vxvault(SpiderFootPlugin):evt = SpiderFootEvent(evtType, text, self.__name__, event)self.notifyListeners(evt)- return None-# End of sfp_vxvault classdiff --git a/modules/sfp_watchguard.py b/modules/sfp_watchguard.pyindex eabc47a2..f3e665c5 100644--- a/modules/sfp_watchguard.py+++ b/modules/sfp_watchguard.py@@ -141,19 +141,19 @@ class sfp_watchguard(SpiderFootPlugin):if eventData in self.results:self.sf.debug(f"Skipping {eventData}, already checked.")- return None+ returnself.results[eventData] = Trueif eventName == 'CO_HOSTED_SITE' and not self.opts.get('checkcohosts', False):- return None+ returnif eventName == 'AFFILIATE_IPADDR' \and not self.opts.get('checkaffiliates', False):- return None+ returnif eventName == 'NETBLOCK_OWNER' and not self.opts.get('checknetblocks', False):- return None+ returnif eventName == 'NETBLOCK_MEMBER' and not self.opts.get('checksubnets', False):- return None+ returnfor check in list(malchecks.keys()):cid = malchecks[check]['id']@@ -189,7 +189,7 @@ class sfp_watchguard(SpiderFootPlugin):url = self.lookupItem(cid, typeId, eventData)if self.checkForStop():- return None+ return# Notify other modules of what you've foundif url is not None:@@ -197,6 +197,4 @@ class sfp_watchguard(SpiderFootPlugin):evt = SpiderFootEvent(evtType, text, self.__name__, event)self.notifyListeners(evt)- return None-# End of sfp_watchguard classdiff --git a/modules/sfp_webanalytics.py b/modules/sfp_webanalytics.pyindex 403f833d..dea29ba4 100644--- a/modules/sfp_webanalytics.py+++ b/modules/sfp_webanalytics.py@@ -55,7 +55,7 @@ class sfp_webanalytics(SpiderFootPlugin):if sourceData in self.results:self.sf.debug(f"Skipping {eventData}, already checked.")- return None+ returnself.results[sourceData] = True@@ -379,6 +379,4 @@ class sfp_webanalytics(SpiderFootPlugin):evt.moduleDataSource = datasourceself.notifyListeners(evt)- return None-# End of sfp_webanalytics classdiff --git a/modules/sfp_webframework.py b/modules/sfp_webframework.pyindex 4ee87242..c68f6fa2 100644--- a/modules/sfp_webframework.py+++ b/modules/sfp_webframework.py@@ -78,7 +78,7 @@ class sfp_webframework(SpiderFootPlugin):# We only want web contentif srcModuleName != "sfp_spider":- return None+ returnself.sf.debug(f"Received event, {eventName}, from {srcModuleName}")@@ -88,7 +88,7 @@ class sfp_webframework(SpiderFootPlugin):# We only want web content for pages on the target siteif not self.getTarget().matches(self.sf.urlFQDN(eventSource)):self.sf.debug("Not collecting web content information for external sites.")- return None+ returnfor regexpGrp in list(regexps.keys()):if regexpGrp in self.results[eventSource]:@@ -104,6 +104,4 @@ class sfp_webframework(SpiderFootPlugin):self.__name__, event)self.notifyListeners(evt)- return None-# End of sfp_webframework classdiff --git a/modules/sfp_webserver.py b/modules/sfp_webserver.pyindex 41292f4a..be79184f 100644--- a/modules/sfp_webserver.py+++ b/modules/sfp_webserver.py@@ -60,21 +60,21 @@ class sfp_webserver(SpiderFootPlugin):self.sf.debug(f"Received event, {eventName}, from {srcModuleName}")if eventSource in self.results:- return None+ returnself.results[eventSource] = Trueif not self.getTarget().matches(self.sf.urlFQDN(eventSource)):self.sf.debug("Not collecting web server information for external sites.")- return None+ returntry:jdata = json.loads(eventData)if jdata is None:- return None+ returnexcept Exception:self.sf.error("Received HTTP headers from another module in an unexpected format.")- return None+ return# Check location header for linked URLsif 'location' in jdata:@@ -113,7 +113,7 @@ class sfp_webserver(SpiderFootPlugin):evt = SpiderFootEvent("WEBSERVER_TECHNOLOGY", jdata['x-powered-by'],self.__name__, event)self.notifyListeners(evt)- return None+ returntech = Noneif 'set-cookie' in jdata and 'PHPSESS' in jdata['set-cookie']:diff --git a/modules/sfp_whatcms.py b/modules/sfp_whatcms.pyindex 51054b8e..71f394c9 100644--- a/modules/sfp_whatcms.py+++ b/modules/sfp_whatcms.py@@ -195,15 +195,15 @@ class sfp_whatcms(SpiderFootPlugin):eventData = event.dataif self.errorState:- return None+ returnif self.opts['api_key'] == '':self.sf.error('You enabled sfp_whatcms but did not set an API key!')self.errorState = True- return None+ returnif eventData in self.results:- return None+ returnself.results[eventData] = True@@ -213,13 +213,13 @@ class sfp_whatcms(SpiderFootPlugin):if data is None:self.sf.debug('No web technology found for ' + eventData)- return None+ returnresults = data.get('results')if results is None:self.sf.debug('No web technology found for ' + eventData)- return None+ returnevt = SpiderFootEvent('RAW_RIR_DATA', str(results), self.__name__, event)self.notifyListeners(evt)diff --git a/modules/sfp_whois.py b/modules/sfp_whois.pyindex 2dc1cfa6..d85cd647 100644--- a/modules/sfp_whois.py+++ b/modules/sfp_whois.py@@ -65,9 +65,9 @@ class sfp_whois(SpiderFootPlugin):eventData = event.dataif eventData in self.results:- return None- else:- self.results[eventData] = True+ return++ self.results[eventData] = Trueself.sf.debug(f"Received event, {eventName}, from {srcModuleName}")@@ -87,15 +87,15 @@ class sfp_whois(SpiderFootPlugin):data = str(whoisdata)if not data:self.sf.error("Unable to perform WHOIS on " + eventData)- return None+ returnexcept Exception as e:self.sf.error("Unable to perform WHOIS on " + eventData + ": " + str(e))- return None+ return# This is likely to be an error about being throttled rather than real dataif len(data) < 250:self.sf.error("Throttling from Whois is probably happening.")- return None+ returnif eventName.startswith("DOMAIN_NAME"):typ = "DOMAIN_WHOIS"diff --git a/modules/sfp_whoisology.py b/modules/sfp_whoisology.pyindex bd3919f4..0f0b88e8 100644--- a/modules/sfp_whoisology.py+++ b/modules/sfp_whoisology.py@@ -118,19 +118,19 @@ class sfp_whoisology(SpiderFootPlugin):eventData = event.dataif self.errorState:- return None+ returnself.sf.debug(f"Received event, {eventName}, from {srcModuleName}")if self.opts['api_key'] == "":self.sf.error("You enabled sfp_whoisology but did not set an API key!")self.errorState = True- return None+ return# Don't look up stuff twiceif eventData in self.results:self.sf.debug(f"Skipping {eventData}, already checked.")- return None+ returnelse:self.results[eventData] = Truediff --git a/modules/sfp_whoxy.py b/modules/sfp_whoxy.pyindex e742068b..a39d06cf 100644--- a/modules/sfp_whoxy.py+++ b/modules/sfp_whoxy.py@@ -129,21 +129,21 @@ class sfp_whoxy(SpiderFootPlugin):eventData = event.dataif self.errorState:- return None+ returnself.sf.debug(f"Received event, {eventName}, from {srcModuleName}")if self.opts['api_key'] == "":self.sf.error("You enabled sfp_whoxy but did not set an API key!")self.errorState = True- return None+ return# 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+ return++ self.results[eventData] = Truerec = self.query(eventData, "email")myres = list()diff --git a/modules/sfp_wigle.py b/modules/sfp_wigle.pyindex 2bc2069e..874e2635 100644--- a/modules/sfp_wigle.py+++ b/modules/sfp_wigle.py@@ -179,31 +179,31 @@ class sfp_wigle(SpiderFootPlugin):eventData = event.dataif self.errorState:- return None+ returnif self.opts['api_key_encoded'] == "":self.sf.error("You enabled sfp_wigle but did not set an API key!")self.errorState = True- return None+ returnself.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+ returnself.results[eventData] = Truecoords = self.getcoords(eventData)if not coords:self.sf.error("Couldn't get coordinates for address from Wigle.net.")- return None+ returnnets = self.getnetworks(coords)if not nets:self.sf.error("Couldn't get networks for coordinates from Wigle.net.")- return None+ returnfor n in nets:e = SpiderFootEvent("WIFI_ACCESS_POINT", n, self.__name__, event)diff --git a/modules/sfp_wikileaks.py b/modules/sfp_wikileaks.pyindex 65f34ed3..471bd6d0 100644--- a/modules/sfp_wikileaks.py+++ b/modules/sfp_wikileaks.py@@ -81,7 +81,7 @@ class sfp_wikileaks(SpiderFootPlugin):# Don't look up stuff twiceif eventData in self.results:self.sf.debug(f"Skipping {eventData}, already checked.")- return None+ returnself.results[eventData] = True@@ -104,7 +104,7 @@ class sfp_wikileaks(SpiderFootPlugin):)if res['content'] is None:self.sf.error("Unable to fetch Wikileaks content.")- return None+ return# Fetch the paste site contentlinks = dict()@@ -136,7 +136,7 @@ class sfp_wikileaks(SpiderFootPlugin):else:self.sf.debug("Found a link: " + link)if self.checkForStop():- return None+ return# Wikileaks leak links will have a nested folder structure linkif link.count('/') >= 4:diff --git a/modules/sfp_wikipediaedits.py b/modules/sfp_wikipediaedits.pyindex 03d87e2b..5533c719 100644--- a/modules/sfp_wikipediaedits.py+++ b/modules/sfp_wikipediaedits.py@@ -118,7 +118,7 @@ class sfp_wikipediaedits(SpiderFootPlugin):if eventData in self.results:self.sf.debug(f"Skipping {eventData}, already checked.")- return None+ returnself.results[eventData] = True@@ -126,7 +126,7 @@ class sfp_wikipediaedits(SpiderFootPlugin):if data is None:self.sf.debug(f"No results from Wikipedia for {eventData}")- return None+ returnfor link in data:evt = SpiderFootEvent("WIKIPEDIA_PAGE_EDIT", link, self.__name__, event)diff --git a/modules/sfp_xforce.py b/modules/sfp_xforce.pyindex 5508df26..afb2020e 100644--- a/modules/sfp_xforce.py+++ b/modules/sfp_xforce.py@@ -174,12 +174,11 @@ class sfp_xforce(SpiderFootPlugin):return Nonetry:- info = json.loads(res['content'])+ return json.loads(res['content'])except Exception as e:self.sf.error(f"Error processing JSON response from X-Force Exchange: {e}")- return None- return info+ return None# Handle events sent to this moduledef handleEvent(self, event):@@ -190,44 +189,44 @@ class sfp_xforce(SpiderFootPlugin):infield_sep = " ; "if self.errorState:- return None+ returnself.sf.debug(f"Received event, {eventName}, from {srcModuleName}")if self.opts['xforce_api_key'] == "" or self.opts['xforce_api_key_password'] == "":self.sf.error("You enabled sfp_xforce but did not set an API key/password!")self.errorState = True- return None+ return# 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+ return++ self.results[eventData] = Trueif eventName == 'NETBLOCK_OWNER':if not self.opts['netblocklookup']:- return None+ returnelse:if IPNetwork(eventData).prefixlen < self.opts['maxnetblock']:self.sf.debug("Network size bigger than permitted: "+ str(IPNetwork(eventData).prefixlen) + " > "+ str(self.opts['maxnetblock']))- return None+ returnif eventName == 'NETBLOCK_MEMBER':if not self.opts['subnetlookup']:- return None+ returnelse:if IPNetwork(eventData).prefixlen < self.opts['maxsubnet']:self.sf.debug("Network size bigger than permitted: "+ str(IPNetwork(eventData).prefixlen) + " > "+ str(self.opts['maxsubnet']))- return None+ returnif eventName.startswith('AFFILIATE_') and not self.opts.get('checkaffiliates', False):- return None+ returnqrylist = list()if eventName.startswith("NETBLOCK_"):@@ -241,7 +240,7 @@ class sfp_xforce(SpiderFootPlugin):if eventName == "IP_ADDRESS":evtType = "CO_HOSTED_SITE"if self.cohostcount > self.opts['maxcohost']:- return None+ returnret = self.query(eventData, "resolve")if ret is None:@@ -268,7 +267,7 @@ class sfp_xforce(SpiderFootPlugin):for addr in qrylist:if self.checkForStop():- return None+ returnif eventName == 'IP_ADDRESS' or eventName.startswith('NETBLOCK_'):evtType = 'MALICIOUS_IPADDR'diff --git a/modules/sfp_yandexdns.py b/modules/sfp_yandexdns.pyindex b2eb5fbc..6ee1243a 100644--- a/modules/sfp_yandexdns.py+++ b/modules/sfp_yandexdns.py@@ -94,7 +94,7 @@ class sfp_yandexdns(SpiderFootPlugin):self.sf.debug(f"Received event, {eventName}, from {srcModuleName}")if eventData in self.results:- return None+ returnself.results[eventData] = True@@ -105,15 +105,15 @@ class sfp_yandexdns(SpiderFootPlugin):resolved = Trueexcept Exception:self.sf.debug(f"Unable to resolve {eventData}")- return None+ returnif not resolved:- return None+ returnfound = self.queryAddr(eventData)if found:- return None+ returnif eventName == "CO_HOSTED_SITE":typ = "MALICIOUS_COHOST"diff --git a/modules/sfp_zetalytics.py b/modules/sfp_zetalytics.pyindex 1490dd0c..58da2997 100644--- a/modules/sfp_zetalytics.py+++ b/modules/sfp_zetalytics.py@@ -75,34 +75,31 @@ class sfp_zetalytics(SpiderFootPlugin):timeout=self.opts["_fetchtimeout"],useragent="SpiderFoot",)+if res["content"] is None:self.sf.info(f"No Zetalytics info found for {path}?{qs}")return None+try:- info = json.loads(res["content"])+ return json.loads(res["content"])except Exception as e:self.sf.error(f"Error processing JSON response from Zetalytics: {e}")- return None- return info+ return Nonedef query_subdomains(self, domain):- info = self.request("/subdomains", {"q": domain})- return info+ return self.request("/subdomains", {"q": domain})def query_hostname(self, hostname):- info = self.request("/hostname", {"q": hostname})- return info+ return self.request("/hostname", {"q": hostname})def query_email_domain(self, email_domain):- info = self.request("/email_domain", {"q": email_domain})- return info+ return self.request("/email_domain", {"q": email_domain})def query_email_address(self, email_address):- info = self.request("/email_address", {"q": email_address})- return info+ return self.request("/email_address", {"q": email_address})def generate_subdomains_events(self, data, pevent):if isinstance(data, dict):@@ -150,18 +147,18 @@ class sfp_zetalytics(SpiderFootPlugin):eventData = event.dataif self.errorState:- return None+ returnself.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!")self.errorState = True- return None+ returnif "{}:{}".format(eventName, eventData) in self.results:self.sf.debug(f"Skipping {eventName}:{eventData}, already checked.")- return None+ returnself.results["{}:{}".format(eventName, eventData)] = Trueif eventName == "INTERNET_NAME":@@ -180,6 +177,6 @@ class sfp_zetalytics(SpiderFootPlugin):self.generate_email_events(data, event)else:- return None+ returnself.emit("RAW_RIR_DATA", json.dumps(data), event)diff --git a/modules/sfp_zoneh.py b/modules/sfp_zoneh.pyindex f549ce11..0024b583 100644--- a/modules/sfp_zoneh.py+++ b/modules/sfp_zoneh.py@@ -104,19 +104,19 @@ class sfp_zoneh(SpiderFootPlugin):self.sf.debug(f"Received event, {eventName}, from {srcModuleName}")if self.errorState:- return None+ returnif eventData in self.results:self.sf.debug(f"Skipping {eventData}, already checked.")- return None- else:- self.results[eventData] = True+ return++ self.results[eventData] = Trueif eventName == 'CO_HOSTED_SITE' and not self.opts['checkcohosts']:- return None+ returnif eventName == 'AFFILIATE_INTERNET_NAME' or eventName == 'AFFILIATE_IPADDR' \and not self.opts['checkaffiliates']:- return None+ returnevtType = 'DEFACED_INTERNET_NAME'@@ -133,7 +133,7 @@ class sfp_zoneh(SpiderFootPlugin):evtType = 'DEFACED_AFFILIATE_IPADDR'if self.checkForStop():- return None+ returnurl = "https://www.zone-h.org/rss/specialdefacements"content = self.sf.cacheGet("sfzoneh", 48)@@ -142,7 +142,7 @@ class sfp_zoneh(SpiderFootPlugin):if data['content'] is None:self.sf.error("Unable to fetch " + url)self.errorState = True- return None+ returnelse:self.sf.cachePut("sfzoneh", data['content'])content = data['content']