SpiderFoot automates OSINT for threat intelligence and mapping your attack surface.
Python attacksurfacecticybersecurityfootprintinghackinginformation-gatheringinformation-securityinfosecintelligence-gatheringosintosint-frameworkosint-reconnaissanceosint-toolpentestingpythonreconsecurity-toolsthreat-intelligencethreatintel
flake8: modules: Resolve R501 violations (#1316)
bcolesfcdfb9e42c59
diff --git a/modules/sfp_bgpview.py b/modules/sfp_bgpview.pyindex cad3741f..3e4e98a4 100644--- a/modules/sfp_bgpview.py+++ b/modules/sfp_bgpview.py@@ -150,13 +150,13 @@ class sfp_bgpview(SpiderFootPlugin):eventData = event.dataif self.errorState:- return None+ returnself.sf.debug(f"Received event, {eventName}, from {srcModuleName}")if eventData in self.results:self.sf.debug(f"Skipping {eventData}, already checked.")- return None+ returnself.results[eventData] = True@@ -165,7 +165,7 @@ class sfp_bgpview(SpiderFootPlugin):if not data:self.sf.info("No results found for ASN " + eventData)- return None+ returne = SpiderFootEvent('RAW_RIR_DATA', str(data), self.__name__, event)self.notifyListeners(e)@@ -173,7 +173,7 @@ class sfp_bgpview(SpiderFootPlugin):address = data.get('owner_address')if not address:- return None+ returnevt = SpiderFootEvent('PHYSICAL_ADDRESS', ', '.join([_f for _f in address if _f]), self.__name__, event)self.notifyListeners(evt)@@ -183,7 +183,7 @@ class sfp_bgpview(SpiderFootPlugin):if not data:self.sf.info("No results found for netblock " + eventData)- return None+ returne = SpiderFootEvent('RAW_RIR_DATA', str(data), self.__name__, event)self.notifyListeners(e)@@ -191,7 +191,7 @@ class sfp_bgpview(SpiderFootPlugin):address = data.get('owner_address')if not address:- return None+ returnevt = SpiderFootEvent('PHYSICAL_ADDRESS', ', '.join([_f for _f in address if _f]), self.__name__, event)self.notifyListeners(evt)@@ -201,7 +201,7 @@ class sfp_bgpview(SpiderFootPlugin):if not data:self.sf.info("No results found for IP address " + eventData)- return None+ returne = SpiderFootEvent('RAW_RIR_DATA', str(data), self.__name__, event)self.notifyListeners(e)@@ -210,7 +210,7 @@ class sfp_bgpview(SpiderFootPlugin):if not prefixes:self.sf.info("No prefixes found for IP address " + eventData)- return None+ returnfor prefix in prefixes:p = prefix.get('prefix')diff --git a/modules/sfp_binaryedge.py b/modules/sfp_binaryedge.pyindex a624fb6e..1d0792e5 100644--- a/modules/sfp_binaryedge.py+++ b/modules/sfp_binaryedge.py@@ -186,7 +186,7 @@ class sfp_binaryedge(SpiderFootPlugin):eventData = event.dataif self.errorState:- return None+ returnself.sf.debug(f"Received event, {eventName}, from {srcModuleName}")@@ -195,11 +195,11 @@ class sfp_binaryedge(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] = True@@ -207,7 +207,7 @@ class sfp_binaryedge(SpiderFootPlugin):ret = self.query(eventData, "email")if ret is None:self.sf.info(f"No leak info for {eventData}")- return None+ returnfor rec in ret:events = rec.get('events')@@ -221,27 +221,27 @@ class sfp_binaryedge(SpiderFootPlugin):self.notifyListeners(e)# No further API endpoints available for email addresses. we can bail out here- 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 bigger than permitted: {net_size} > {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 bigger than permitted: {net_size} > {max_subnet}")- return None+ return# For IP Addresses, do the additional passive DNS lookupif eventName == "IP_ADDRESS":@@ -249,7 +249,7 @@ class sfp_binaryedge(SpiderFootPlugin):ret = self.query(eventData, "passive")if ret is None:self.sf.info(f"No Passive DNS info for {eventData}")- return None+ returnfor rec in ret:events = rec.get('events')@@ -285,7 +285,7 @@ class sfp_binaryedge(SpiderFootPlugin):ret = self.query(eventData, "subs")if ret is None:self.sf.info(f"No hosts found for {eventData}")- return None+ returnfor rec in ret:events = rec.get('events')@@ -318,10 +318,10 @@ class sfp_binaryedge(SpiderFootPlugin):for addr in qrylist:if self.checkForStop():- return None+ returnif self.errorState:- return None+ returnif addr in self.checkedips:continue@@ -352,10 +352,10 @@ class sfp_binaryedge(SpiderFootPlugin):for addr in qrylist:if self.checkForStop():- return None+ returnif self.errorState:- return None+ returnif addr in self.checkedips:continue@@ -392,10 +392,10 @@ class sfp_binaryedge(SpiderFootPlugin):for addr in qrylist:if self.checkForStop():- return None+ returnif self.errorState:- return None+ returnif addr in self.checkedips:continue@@ -403,7 +403,7 @@ class sfp_binaryedge(SpiderFootPlugin):ret = self.query(addr, "ip")if ret is None:self.sf.info(f"No port/banner info for {addr}")- return None+ returnfor rec in ret:events = rec.get('events')diff --git a/modules/sfp_bingsearch.py b/modules/sfp_bingsearch.pyindex 65ced374..75240910 100644--- a/modules/sfp_bingsearch.py+++ b/modules/sfp_bingsearch.py@@ -78,18 +78,18 @@ class sfp_bingsearch(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_bingsearch but did not set a Bing API key!")self.errorState = True- return None+ returnif eventData in self.results:self.sf.debug("Already did a search for " + eventData + ", skipping.")- return None+ returnself.results[eventData] = True@@ -106,7 +106,7 @@ class sfp_bingsearch(SpiderFootPlugin):)if res is None:# Failed to talk to the bing API or no results returned- return None+ returnurls = res["urls"]new_links = list(set(urls) - set(self.results.keys()))diff --git a/modules/sfp_bingsharedip.py b/modules/sfp_bingsharedip.pyindex 9d1e9013..9bee4f59 100644--- a/modules/sfp_bingsharedip.py+++ b/modules/sfp_bingsharedip.py@@ -92,27 +92,27 @@ class sfp_bingsharedip(SpiderFootPlugin):self.currentEventSrc = eventif self.errorState:- return None+ returnself.sf.debug(f"Received event, {eventName}, from {srcModuleName}")if self.opts['api_key'] == "" and self.opts['api_key'] == "":self.sf.error("You enabled sfp_bingsharedip but did not set a Bing API key!")self.errorState = True- return None+ returnif eventData in self.results:self.sf.debug(f"Skipping {eventData}, already checked.")- return None+ return# Ignore IP addresses from myself as they are just for creating# a link from the netblock to the co-host.if eventName == "IP_ADDRESS" and srcModuleName == "sfp_bingsharedip":self.sf.debug("Ignoring " + eventName + ", from self.")- return None+ returnif self.cohostcount > self.opts["maxcohost"]:- return None+ returnqrylist = list()if eventName.startswith("NETBLOCK_"):@@ -128,7 +128,7 @@ class sfp_bingsharedip(SpiderFootPlugin):for ip in qrylist:if self.checkForStop():- return None+ returnres = self.sf.bingIterate(searchString="ip:" + ip,@@ -141,7 +141,7 @@ class sfp_bingsharedip(SpiderFootPlugin):)if res is None:# Failed to talk to bing api or no results returned- return None+ returnurls = res["urls"]@@ -181,5 +181,4 @@ class sfp_bingsharedip(SpiderFootPlugin):)self.notifyListeners(evt)-# End of sfp_bingsharedip classdiff --git a/modules/sfp_binstring.py b/modules/sfp_binstring.pyindex 1e4a649f..e5dbb73b 100644--- a/modules/sfp_binstring.py+++ b/modules/sfp_binstring.py@@ -105,13 +105,10 @@ class sfp_binstring(SpiderFootPlugin):return words# What events is this module interested in for input- # * = be notified about all events.def watchedEvents(self):return ["LINKED_URL_INTERNAL"]# What events this module produces- # This is to support the end user in selecting modules based on events- # produced.def producedEvents(self):return ["RAW_FILE_META_DATA"]@@ -124,30 +121,29 @@ class sfp_binstring(SpiderFootPlugin):self.sf.debug(f"Received event, {eventName}, from {srcModuleName}")if eventData in self.results:- return None- else:- self.results.append(eventData)+ return++ self.results.append(eventData)- # if the file matches any of the file extensions we are interested in- # then fetch the file and write it to aa temporary place- res = Nonefor fileExt in self.opts['fileexts']:- if eventData.lower().endswith("." + fileExt.lower()) or "." + fileExt + "?" in eventData.lower():- res = self.sf.fetchUrl(eventData,- useragent=self.opts['_useragent'],- dontMangle=True,- sizeLimit=self.opts['maxfilesize'],- verify=False)-- if res:- self.sf.debug("Searching for strings")- words = self.getStrings(res['content'])-- if words:- wordstr = '\n'.join(words[0:self.opts['maxwords']])-- # Notify other modules of what you've found- evt = SpiderFootEvent("RAW_FILE_META_DATA", wordstr, self.__name__, event)- self.notifyListeners(evt)+ if eventData.lower().endswith(f".{fileExt.lower()}") or f".{fileExt.lower()}?" in eventData.lower():+ res = self.sf.fetchUrl(+ eventData,+ useragent=self.opts['_useragent'],+ dontMangle=True,+ sizeLimit=self.opts['maxfilesize'],+ verify=False+ )++ if not res:+ continue++ self.sf.debug(f"Searching {eventData} for strings")+ words = self.getStrings(res['content'])++ if words:+ wordstr = '\n'.join(words[0:self.opts['maxwords']])+ evt = SpiderFootEvent("RAW_FILE_META_DATA", wordstr, self.__name__, event)+ self.notifyListeners(evt)# End of sfp_binstring classdiff --git a/modules/sfp_bitcoinabuse.py b/modules/sfp_bitcoinabuse.pyindex 627c0e7d..595b332b 100644--- a/modules/sfp_bitcoinabuse.py+++ b/modules/sfp_bitcoinabuse.py@@ -98,18 +98,18 @@ class sfp_bitcoinabuse(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_bitcoinabuse 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] = Truediff --git a/modules/sfp_bitcoinwhoswho.py b/modules/sfp_bitcoinwhoswho.pyindex 78ed4e71..937e8ab7 100644--- a/modules/sfp_bitcoinwhoswho.py+++ b/modules/sfp_bitcoinwhoswho.py@@ -109,18 +109,18 @@ class sfp_bitcoinwhoswho(SpiderFootPlugin):def handleEvent(self, event):if self.errorState:- return None+ returnself.sf.debug(f"Received event, {event.eventType}, from {event.module}")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 event.data in self.results:self.sf.debug(f"Skipping {event.data}, already checked.")- return None+ returnself.results[event.data] = Trueif event.eventType == "BITCOIN_ADDRESS":diff --git a/modules/sfp_blockchain.py b/modules/sfp_blockchain.pyindex ac7b4ff7..251879a0 100644--- a/modules/sfp_blockchain.py+++ b/modules/sfp_blockchain.py@@ -75,7 +75,7 @@ class sfp_blockchain(SpiderFootPlugin):if eventData in self.results:self.sf.debug(f"Skipping {eventData}, already checked.")- return None+ returnself.results[eventData] = True@@ -84,13 +84,13 @@ class sfp_blockchain(SpiderFootPlugin):timeout=self.opts['_fetchtimeout'], useragent=self.opts['_useragent'])if res['content'] is None:self.sf.info("No Blockchain info found for " + eventData)- return None+ returntry:data = json.loads(res['content'])balance = float(data[eventData]['final_balance']) / 100000000except Exception as e:self.sf.debug(f"Error processing JSON response: {e}")- return None+ returnevt = SpiderFootEvent("BITCOIN_BALANCE", str(balance) + " BTC", self.__name__, event)self.notifyListeners(evt)diff --git a/modules/sfp_builtwith.py b/modules/sfp_builtwith.pyindex da01b498..124b93c5 100644--- a/modules/sfp_builtwith.py+++ b/modules/sfp_builtwith.py@@ -103,7 +103,8 @@ class sfp_builtwith(SpiderFootPlugin):return json.loads(res['content'])['Relationships']except Exception as e:self.sf.error(f"Error processing JSON response from builtwith.com: {e}")- return None++ return Nonedef queryDomainInfo(self, t):url = f"https://api.builtwith.com/rv1/api.json?LOOKUP={t}&KEY={self.opts['api_key']}"@@ -120,7 +121,8 @@ class sfp_builtwith(SpiderFootPlugin):return json.loads(res['content'])['Results'][0]except Exception as e:self.sf.error(f"Error processing JSON response from builtwith.com: {e}")- return None++ return None# Handle events sent to this moduledef handleEvent(self, event):@@ -129,18 +131,18 @@ class sfp_builtwith(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_builtwith 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@@ -209,7 +211,7 @@ class sfp_builtwith(SpiderFootPlugin):data = self.queryRelationships(eventData)if data is None:- return None+ returnagelimit = int(time.time() * 1000) - (86400000 * self.opts['maxage'])diff --git a/modules/sfp_c99.py b/modules/sfp_c99.pyindex 389ee650..f9fe8152 100644--- a/modules/sfp_c99.py+++ b/modules/sfp_c99.py@@ -167,7 +167,7 @@ class sfp_c99(SpiderFootPlugin):for subDomainElem in subDomainData:if self.checkForStop():- return None+ returnsubDomain = subDomainElem.get("subdomain", "").strip()@@ -183,7 +183,7 @@ class sfp_c99(SpiderFootPlugin):for domainHistoryElem in domainHistoryData:if self.checkForStop():- return None+ returnip = domainHistoryElem.get("ip_address")@@ -229,7 +229,7 @@ class sfp_c99(SpiderFootPlugin):if isinstance(domains, list):for domain in domains:if self.checkForStop():- return None+ returndomain = domain.strip()if domain:@@ -323,7 +323,7 @@ class sfp_c99(SpiderFootPlugin):found = Truefor ipElem in ips:if self.checkForStop():- return None+ returnevt = SpiderFootEvent("IP_ADDRESS",@@ -351,7 +351,7 @@ class sfp_c99(SpiderFootPlugin):def emitHostname(self, data, event):if not self.sf.validHost(data, self.opts['_internettlds']):- return None+ returnif self.opts["verify"] and not self.sf.resolveHost(data):self.sf.debug(@@ -394,19 +394,19 @@ class sfp_c99(SpiderFootPlugin):# Once we are in this state, return immediately.if self.errorState:- return None+ returnself.sf.debug(f"Received event, {eventName}, from {srcModuleName}")if self.opts["api_key"] == "":self.sf.error("You enabled sfp_c99, 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] = Truediff --git a/modules/sfp_callername.py b/modules/sfp_callername.pyindex 03f85dd0..9aa7b85f 100644--- a/modules/sfp_callername.py+++ b/modules/sfp_callername.py@@ -75,10 +75,10 @@ class sfp_callername(SpiderFootPlugin):eventData = event.dataif self.errorState:- return None+ returnif eventData in self.results:- return None+ returnself.results[eventData] = True@@ -87,14 +87,14 @@ class sfp_callername(SpiderFootPlugin):# Only US numbers are supported (+1)if not eventData.startswith('+1'):self.sf.debug('Unsupported phone number: ' + eventData)- return None+ return# Strip country code (+1) and formattingnumber = eventData.lstrip('+1').strip('(').strip(')').strip('-').strip(' ')if not number.isdigit():self.sf.debug('Invalid phone number: ' + number)- return None+ return# Query CallerName.com for the specified phone numberurl = f"https://callername.com/{number}"@@ -104,11 +104,11 @@ class sfp_callername(SpiderFootPlugin):if res['content'] is None:self.sf.debug('No response from CallerName.com')- return None+ returnif res['code'] != '200':self.sf.debug('No phone information found for ' + eventData)- return None+ returnlocation_match = re.findall(r'<div class="callerid"><h4>.*?</h4><p>(.+?)</p></div>', res['content'], re.MULTILINE | re.DOTALL)diff --git a/modules/sfp_cinsscore.py b/modules/sfp_cinsscore.pyindex 7bec13e1..128a80ed 100644--- a/modules/sfp_cinsscore.py+++ b/modules/sfp_cinsscore.py@@ -121,10 +121,10 @@ class sfp_cinsscore(SpiderFootPlugin):if eventData in self.results:self.sf.debug(f"Skipping {eventData}, already checked.")- return None+ returnif self.errorState:- return None+ returnself.results[eventData] = True@@ -133,28 +133,28 @@ class sfp_cinsscore(SpiderFootPlugin):evtType = 'MALICIOUS_IPADDR'elif eventName == 'AFFILIATE_IPADDR':if not self.opts.get('checkaffiliates', False):- return None+ returntargetType = 'ip'evtType = 'MALICIOUS_AFFILIATE_IPADDR'elif eventName == 'NETBLOCK_OWNER':if not self.opts.get('checknetblocks', False):- return None+ returntargetType = 'netblock'evtType = 'MALICIOUS_NETBLOCK'elif eventName == 'NETBLOCK_MEMBER':if not self.opts.get('checksubnets', False):- return None+ returntargetType = 'netblock'evtType = 'MALICIOUS_SUBNET'else:- return None+ returnself.sf.debug(f"Checking maliciousness of {eventData} with cinsscore.com")url = self.query(eventData, targetType)if not url:- return None+ returntext = f"cinsscore.com [{eventData}]\n<SFURL>{url}</SFURL>"evt = SpiderFootEvent(evtType, text, self.__name__, event)diff --git a/modules/sfp_circllu.py b/modules/sfp_circllu.pyindex dd0f9bb7..aa7aeef1 100644--- a/modules/sfp_circllu.py+++ b/modules/sfp_circllu.py@@ -136,23 +136,23 @@ class sfp_circllu(SpiderFootPlugin):ret = Noneif self.errorState:- return None+ returnself.sf.debug(f"Received event, {eventName}, from {srcModuleName}")# Ignore messages from myselfif srcModuleName == "sfp_circllu":self.sf.debug("Ignoring " + eventName + ", from self.")- return None+ returnif self.opts['api_key_login'] == "" or self.opts['api_key_password'] == "":self.sf.error("You enabled sfp_circllu but did not set an credentials!")self.errorState = True- return None+ returnif eventData in self.results:self.sf.debug(f"Skipping {eventData}, already checked.")- return None+ returnself.results[eventData] = True@@ -195,7 +195,7 @@ class sfp_circllu(SpiderFootPlugin):ret = self.query(eventData, "PDNS")if not ret:self.sf.info("No CIRCL.LU passive DNS data found for " + eventData)- return None+ return# CIRCL.LU doesn't return valid JSON - it's one JSON record per linefor line in ret.split("\n"):diff --git a/modules/sfp_citadel.py b/modules/sfp_citadel.pyindex 68321e06..fcb1fb50 100644--- a/modules/sfp_citadel.py+++ b/modules/sfp_citadel.py@@ -129,19 +129,19 @@ class sfp_citadel(SpiderFootPlugin):self.sf.debug(f"Received event, {eventName}, from {srcModuleName}")if self.errorState:- 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.queryEmail(eventData)if data is None:- return None+ returnerror = data.get('error')message = data.get('message')@@ -150,11 +150,11 @@ class sfp_citadel(SpiderFootPlugin):self.sf.error(f"Error encountered processing {eventData}: {message}")if "MISSING API" in message:self.errorState = True- return None- return None+ return+ returnif not message:- return None+ returnfor site in message:self.sf.info(f"Found Leak-Lookup entry for {eventData}: {site}")diff --git a/modules/sfp_cleantalk.py b/modules/sfp_cleantalk.pyindex 8e94325a..bfbd7ec1 100644--- a/modules/sfp_cleantalk.py+++ b/modules/sfp_cleantalk.py@@ -138,10 +138,10 @@ class sfp_cleantalk(SpiderFootPlugin):if eventData in self.results:self.sf.debug(f"Skipping {eventData}, already checked.")- return None+ returnif self.errorState:- return None+ returnself.results[eventData] = True@@ -150,28 +150,28 @@ class sfp_cleantalk(SpiderFootPlugin):evtType = 'MALICIOUS_IPADDR'elif eventName == 'AFFILIATE_IPADDR':if not self.opts.get('checkaffiliates', False):- return None+ returntargetType = 'ip'evtType = 'MALICIOUS_AFFILIATE_IPADDR'elif eventName == 'NETBLOCK_OWNER':if not self.opts.get('checknetblocks', False):- return None+ returntargetType = 'netblock'evtType = 'MALICIOUS_NETBLOCK'elif eventName == 'NETBLOCK_MEMBER':if not self.opts.get('checksubnets', False):- return None+ returntargetType = 'netblock'evtType = 'MALICIOUS_SUBNET'else:- return None+ returnself.sf.debug(f"Checking maliciousness of {eventData} with CleanTalk Spam List")url = self.query(eventData, targetType)if not url:- return None+ returntext = f"CleanTalk Spam List [{eventData}]\n<SFURL>{url}</SFURL>"evt = SpiderFootEvent(evtType, text, self.__name__, event)diff --git a/modules/sfp_clearbit.py b/modules/sfp_clearbit.pyindex 783e89d6..4882d69e 100644--- a/modules/sfp_clearbit.py+++ b/modules/sfp_clearbit.py@@ -116,24 +116,24 @@ class sfp_clearbit(SpiderFootPlugin):eventData = event.dataif self.errorState:- return None+ returnif self.opts['api_key'] == "":self.sf.error("You enabled sfp_clearbit but did not set an API key!")self.errorState = True- return None+ returnself.sf.debug(f"Received event, {eventName}, from {srcModuleName}")if eventData in self.results:self.sf.debug(f"Skipping {eventData}, already checked.")- return None+ returnself.results[eventData] = Truedata = self.query(eventData)if not data:- return None+ returntry:# Get the name associated with the e-maildiff --git a/modules/sfp_cloudflaredns.py b/modules/sfp_cloudflaredns.pyindex bbc030eb..dde25550 100644--- a/modules/sfp_cloudflaredns.py+++ b/modules/sfp_cloudflaredns.py@@ -97,7 +97,7 @@ class sfp_cloudflaredns(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@@ -106,7 +106,7 @@ class sfp_cloudflaredns(SpiderFootPlugin):if self.sf.resolveHost(eventData):resolved = Trueexcept Exception:- return None+ returnif resolved:found = self.queryAddr(eventData)diff --git a/modules/sfp_coinblocker.py b/modules/sfp_coinblocker.pyindex fd12328c..301ac5bb 100644--- a/modules/sfp_coinblocker.py+++ b/modules/sfp_coinblocker.py@@ -205,19 +205,19 @@ class sfp_coinblocker(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']@@ -249,7 +249,7 @@ class sfp_coinblocker(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:diff --git a/modules/sfp_commoncrawl.py b/modules/sfp_commoncrawl.pyindex 36a47f9e..74ce3e44 100644--- a/modules/sfp_commoncrawl.py+++ b/modules/sfp_commoncrawl.py@@ -139,10 +139,10 @@ class sfp_commoncrawl(SpiderFootPlugin):self.sf.debug(f"Received event, {eventName}, from {srcModuleName}")if self.errorState:- return None+ returnif eventData in self.results:- return None+ returnself.results[eventData] = True@@ -151,23 +151,23 @@ class sfp_commoncrawl(SpiderFootPlugin):if not self.indexBase:self.sf.error("Unable to fetch CommonCrawl index.")- return None+ returnif len(self.indexBase) == 0:self.sf.error("Unable to fetch CommonCrawl index.")- return None+ returndata = self.search(eventData)if not data:self.sf.error("Unable to obtain content from CommonCrawl.")- return None+ returnsent = list()for content in data:try:for line in content.split("\n"):if self.checkForStop():- return None+ returnif len(line) < 2:continuediff --git a/modules/sfp_comodo.py b/modules/sfp_comodo.pyindex 365a7859..8b180c21 100644--- a/modules/sfp_comodo.py+++ b/modules/sfp_comodo.py@@ -96,7 +96,7 @@ class sfp_comodo(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@@ -105,7 +105,7 @@ class sfp_comodo(SpiderFootPlugin):if self.sf.resolveHost(eventData):resolved = Trueexcept Exception:- return None+ returnif resolved:found = self.queryAddr(eventData)diff --git a/modules/sfp_cookie.py b/modules/sfp_cookie.pyindex 9171bc03..1c4bde38 100644--- a/modules/sfp_cookie.py+++ b/modules/sfp_cookie.py@@ -58,21 +58,21 @@ class sfp_cookie(SpiderFootPlugin):self.sf.debug(f"Received event, {eventName}, from {srcModuleName}")if eventSource in self.results:- return None+ returnelse:self.results[eventSource] = Trueif not self.getTarget().matches(self.sf.urlFQDN(eventSource)):self.sf.debug("Not collecting cookies from 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+ returnif 'set-cookie' in jdata:evt = SpiderFootEvent("TARGET_WEB_COOKIE", jdata['set-cookie'],diff --git a/modules/sfp_countryname.py b/modules/sfp_countryname.pyindex f1d57316..c9c9d12e 100644--- a/modules/sfp_countryname.py+++ b/modules/sfp_countryname.py@@ -193,7 +193,7 @@ class sfp_countryname(SpiderFootPlugin):if eventDataHash in self.results:self.sf.debug(f"Skipping {eventData}, already checked.")- return None+ returnself.results[eventDataHash] = True@@ -221,7 +221,7 @@ class sfp_countryname(SpiderFootPlugin):if not countryNames:self.sf.debug(f"Found no country names associated with {eventName}: {eventData}")- return None+ returnfor countryName in set(countryNames):if not countryName:diff --git a/modules/sfp_crobat_api.py b/modules/sfp_crobat_api.pyindex 2019d494..478881dd 100644--- a/modules/sfp_crobat_api.py+++ b/modules/sfp_crobat_api.py@@ -122,31 +122,31 @@ class sfp_crobat_api(SpiderFootPlugin):eventData = event.dataif self.errorState:- return None+ returnif eventData in self.results:- return None+ returnself.results[eventData] = Trueself.sf.debug(f"Received event, {eventName}, from {srcModuleName}")if eventName != "DOMAIN_NAME":- return None+ returnpage = 0while page < self.opts['max_pages']:if self.checkForStop():- return None+ returnif self.errorState:- return None+ returndata = self.queryDomain(eventData, page)if not data:self.sf.debug(f"No information found for domain {eventData} (page: {page})")- return None+ returnevt = SpiderFootEvent('RAW_RIR_DATA', str(data), self.__name__, event)self.notifyListeners(evt)diff --git a/modules/sfp_crossref.py b/modules/sfp_crossref.pyindex 525ecdc1..430d838b 100644--- a/modules/sfp_crossref.py+++ b/modules/sfp_crossref.py@@ -73,14 +73,14 @@ class sfp_crossref(SpiderFootPlugin):elif 'URL' in eventName:url = eventDataelse:- return None+ returnfqdn = self.sf.urlFQDN(url)# We are only interested in external sites for the crossrefif self.getTarget().matches(fqdn):self.sf.debug(f"Ignoring {url} as not external")- return None+ returnif eventData in self.fetched:self.sf.debug(f"Ignoring {url} as already tested")@@ -88,7 +88,7 @@ class sfp_crossref(SpiderFootPlugin):if not self.sf.resolveHost(fqdn):self.sf.debug(f"Ignoring {url} as {fqdn} does not resolve")- return None+ returnself.fetched[url] = True@@ -104,7 +104,7 @@ class sfp_crossref(SpiderFootPlugin):if res['content'] is None:self.sf.debug(f"Ignoring {url} as no data returned")- return None+ returnmatched = Falsefor name in self.getTarget().getNames():@@ -126,7 +126,7 @@ class sfp_crossref(SpiderFootPlugin):# Check the base url to see if there is an affiliationurl = self.sf.urlBaseUrl(eventData)if url in self.fetched:- return None+ returnself.fetched[url] = True@@ -151,7 +151,7 @@ class sfp_crossref(SpiderFootPlugin):breakif not matched:- return None+ returnif not event.moduleDataSource:event.moduleDataSource = "Unknown"diff --git a/modules/sfp_crt.py b/modules/sfp_crt.pyindex 08ecc352..2aace393 100644--- a/modules/sfp_crt.py+++ b/modules/sfp_crt.py@@ -80,7 +80,7 @@ class sfp_crt(SpiderFootPlugin):eventData = event.dataif eventData in self.results:- return None+ returnself.results[eventData] = True@@ -97,16 +97,15 @@ class sfp_crt(SpiderFootPlugin):if res['content'] is None:self.sf.info("No certificate transparency info found for " + eventData)- return None+ returntry:data = json.loads(res['content'])except Exception as e:self.sf.debug(f"Error processing JSON response: {e}")- return Noneif data is None or len(data) == 0:- return None+ returnevt = SpiderFootEvent("RAW_RIR_DATA", str(data), self.__name__, event)self.notifyListeners(evt)@@ -167,7 +166,7 @@ class sfp_crt(SpiderFootPlugin):for cert_id in fetch_certs:if self.checkForStop():- return None+ returnparams = {'d': str(cert_id)diff --git a/modules/sfp_customfeed.py b/modules/sfp_customfeed.pyindex 13b26421..f07eb9e8 100644--- a/modules/sfp_customfeed.py+++ b/modules/sfp_customfeed.py@@ -103,8 +103,7 @@ class sfp_customfeed(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":@@ -180,28 +179,28 @@ class sfp_customfeed(SpiderFootPlugin):self.sf.debug(f"Received event, {eventName}, from {srcModuleName}")if self.errorState:- return None+ returnif self.opts['url'] == "":self.sf.error("You enabled sfp_customfeed but defined no custom feed URL!")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 == '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']@@ -237,7 +236,7 @@ class sfp_customfeed(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:diff --git a/modules/sfp_darksearch.py b/modules/sfp_darksearch.pyindex a662ca1c..31a4c015 100644--- a/modules/sfp_darksearch.py+++ b/modules/sfp_darksearch.py@@ -105,11 +105,11 @@ class sfp_darksearch(SpiderFootPlugin):eventData = event.dataif not self.opts['fullnames'] and eventName == 'HUMAN_NAME':- return None+ returnif eventData in self.results:self.sf.debug(f"Skipping {eventData}, already checked.")- return None+ returnself.results[eventData] = True@@ -121,12 +121,12 @@ class sfp_darksearch(SpiderFootPlugin):found = Falseif self.checkForStop():- return None+ returnquery_results = self.query(eventData, page)if query_results is None:- return None+ returnpage += 1@@ -141,7 +141,7 @@ class sfp_darksearch(SpiderFootPlugin):data = query_results.get('data')if data is None:- return None+ returnfor result in data:if result is None:diff --git a/modules/sfp_dehashed.py b/modules/sfp_dehashed.pyindex 99b730f3..c750632f 100644--- a/modules/sfp_dehashed.py+++ b/modules/sfp_dehashed.py@@ -144,13 +144,13 @@ class sfp_dehashed(SpiderFootPlugin):eventData = event.dataif srcModuleName == self.__name__:- return None+ returnif eventData in self.results:- return None+ returnif self.errorState:- return None+ returnself.results[eventData] = True@@ -167,7 +167,7 @@ class sfp_dehashed(SpiderFootPlugin):while currentPage <= maxPages:if self.checkForStop():- return None+ returnif self.errorState:break@@ -175,7 +175,7 @@ class sfp_dehashed(SpiderFootPlugin):data = self.query(event, perPage, currentPage)if not data:- return None+ returnbreachResults = set()emailResults = set()@@ -230,6 +230,6 @@ class sfp_dehashed(SpiderFootPlugin):currentPage += 1if data.get('total') < self.opts['per_page']:- return None+ break# End of sfp_dehashed classdiff --git a/modules/sfp_digitaloceanspace.py b/modules/sfp_digitaloceanspace.pyindex e93dcc37..4030b380 100644--- a/modules/sfp_digitaloceanspace.py+++ b/modules/sfp_digitaloceanspace.py@@ -73,11 +73,11 @@ class sfp_digitaloceanspace(SpiderFootPlugin):res = self.sf.fetchUrl(url, timeout=10, useragent="SpiderFoot", noLog=True)if not res['content']:- return None+ returnif "NoSuchBucket" in res['content']:self.sf.debug(f"Not a valid bucket: {url}")- return None+ return# Bucket foundif res['code'] in ["301", "302", "200"]:@@ -152,7 +152,7 @@ class sfp_digitaloceanspace(SpiderFootPlugin):eventData = event.dataif eventData in self.results:- return None+ returnself.results[eventData] = True@@ -163,7 +163,7 @@ class sfp_digitaloceanspace(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'])@@ -176,7 +176,7 @@ class sfp_digitaloceanspace(SpiderFootPlugin):suffixes = [''] + self.opts['suffixes'].split(',')for s in suffixes:if self.checkForStop():- return None+ returnb = t + s + "." + eurl = "https://" + bdiff --git a/modules/sfp_dnsgrep.py b/modules/sfp_dnsgrep.pyindex 7b6b218b..41e29a6f 100644--- a/modules/sfp_dnsgrep.py+++ b/modules/sfp_dnsgrep.py@@ -113,7 +113,7 @@ class sfp_dnsgrep(SpiderFootPlugin):eventData = event.dataif eventData in self.results:- return None+ returnself.results[eventData] = Trueself.sf.debug(f"Received event, {eventName}, from {srcModuleName}")@@ -122,7 +122,7 @@ class sfp_dnsgrep(SpiderFootPlugin):if data is None:self.sf.info("No DNS records found for " + eventData)- return None+ returnevt = SpiderFootEvent('RAW_RIR_DATA', str(data), self.__name__, event)self.notifyListeners(evt)diff --git a/modules/sfp_dnsneighbor.py b/modules/sfp_dnsneighbor.pyindex 4185ee92..3698092e 100644--- a/modules/sfp_dnsneighbor.py+++ b/modules/sfp_dnsneighbor.py@@ -74,7 +74,7 @@ class sfp_dnsneighbor(SpiderFootPlugin):self.sf.debug(f"Received event, {eventName}, from {srcModuleName}")if eventDataHash in self.events:- return None+ returnself.events[eventDataHash] = True@@ -84,7 +84,7 @@ class sfp_dnsneighbor(SpiderFootPlugin):network = ipaddress.ip_network(f"{eventData}/{netmask}", strict=False)except ValueError:self.sf.error(f"Invalid IP address received: {eventData}")- return None+ returnself.sf.debug(f"Lookaside max: {network.network_address}, min: {network.broadcast_address}")@@ -92,7 +92,7 @@ class sfp_dnsneighbor(SpiderFootPlugin):sip = str(ip)self.sf.debug("Attempting look-aside lookup of: " + sip)if self.checkForStop():- return None+ returnif sip in self.hostresults or sip == eventData:continue@@ -122,7 +122,7 @@ class sfp_dnsneighbor(SpiderFootPlugin):for addr in addrs:if self.checkForStop():- return None+ returnif addr == sip:continue@@ -148,8 +148,7 @@ class sfp_dnsneighbor(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_dnsresolve.py b/modules/sfp_dnsresolve.pyindex adf9546b..b8fb4446 100644--- a/modules/sfp_dnsresolve.py+++ b/modules/sfp_dnsresolve.py@@ -374,7 +374,7 @@ class sfp_dnsresolve(SpiderFootPlugin):def processDomain(self, domainName, parentEvent, affil=False, host=None):if domainName in self.domresults:self.sf.debug(f"Skipping domain, {domainName}, already processed.")- return None+ returnself.domresults[domainName] = True@@ -382,7 +382,7 @@ class sfp_dnsresolve(SpiderFootPlugin):domevt = SpiderFootEvent("AFFILIATE_DOMAIN_NAME", domainName,self.__name__, parentEvent)self.notifyListeners(domevt)- return None+ returnif self.getTarget().matches(domainName):domevt = SpiderFootEvent("DOMAIN_NAME", domainName,@@ -392,11 +392,10 @@ class sfp_dnsresolve(SpiderFootPlugin):# Only makes sense to link this event with a source event# that sits on the parent domain.if not host:- return None+ returnif parentEvent.data.endswith("." + domainName):domevt = SpiderFootEvent("DOMAIN_NAME_PARENT", domainName,self.__name__, parentEvent)self.notifyListeners(domevt)- return None# End of sfp_dnsresolve classdiff --git a/modules/sfp_dnszonexfer.py b/modules/sfp_dnszonexfer.pyindex b312b19e..9142a93f 100644--- a/modules/sfp_dnszonexfer.py+++ b/modules/sfp_dnszonexfer.py@@ -61,11 +61,11 @@ class sfp_dnszonexfer(SpiderFootPlugin):if srcModuleName == "sfp_dnszonexfer":self.sf.debug(f"Ignoring {eventName}, from self.")- return None+ returnif eventDataHash in self.events:self.sf.debug("Skipping duplicate event for " + eventData)- return None+ returnself.events[eventDataHash] = True@@ -79,7 +79,7 @@ class sfp_dnszonexfer(SpiderFootPlugin):if not self.sf.validIP(eventData):nsips = self.sf.resolveHost(eventData)if not nsips:- return None+ returnif len(nsips) > 0:for n in nsips:@@ -88,7 +88,7 @@ class sfp_dnszonexfer(SpiderFootPlugin):breakelse:self.sf.error("Couldn't resolve the name server, so not attempting zone transfer.")- return None+ returnelse:nsip = eventDatadiff --git a/modules/sfp_dronebl.py b/modules/sfp_dronebl.pyindex 80828052..fd70efe2 100644--- a/modules/sfp_dronebl.py+++ b/modules/sfp_dronebl.py@@ -107,7 +107,7 @@ class sfp_dronebl(SpiderFootPlugin):for domain in self.checks:if self.checkForStop():- return None+ returntry:lookup = self.reverseAddr(qaddr) + "." + domain@@ -125,13 +125,12 @@ class sfp_dronebl(SpiderFootPlugin):text = self.checks[domain] + " (" + qaddr + ")"break- if str(addr) not in list(self.checks[domain].keys()):- self.sf.debug("Return code not found in list: " + str(addr))- continue+ if str(addr) in list(self.checks[domain].keys()):+ k = str(addr)+ text = self.checks[domain][k] + " (" + qaddr + ")"+ break- k = str(addr)- text = self.checks[domain][k] + " (" + qaddr + ")"- break+ self.sf.debug("Return code not found in list: " + str(addr))if text is not None:if eventName == "AFFILIATE_IPADDR":@@ -149,8 +148,6 @@ class sfp_dronebl(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.eventTypediff --git a/modules/sfp_duckduckgo.py b/modules/sfp_duckduckgo.pyindex 0abc9394..ba1ddc7d 100644--- a/modules/sfp_duckduckgo.py+++ b/modules/sfp_duckduckgo.py@@ -77,11 +77,11 @@ class sfp_duckduckgo(SpiderFootPlugin):if self.opts['affiliatedomains'] and "AFFILIATE_" in eventName:eventData = self.sf.hostDomain(eventData, self.opts['_internettlds'])if not eventData:- return None+ returnif eventData in self.results:self.sf.debug(f"Skipping {eventData}, already checked.")- return None+ returnself.results[eventData] = True@@ -91,17 +91,17 @@ class sfp_duckduckgo(SpiderFootPlugin):if res['content'] is None:self.sf.error(f"Unable to fetch {url}")- return None+ returntry:ret = json.loads(res['content'])except Exception as e:self.sf.error(f"Error processing JSON response from DuckDuckGo: {e}")- return None+ returnif not ret['Heading']:self.sf.debug(f"No DuckDuckGo information for {eventData}")- return None+ return# Submit the DuckDuckGo results for analysisevt = SpiderFootEvent("SEARCH_ENGINE_WEB_CONTENT", res['content'],diff --git a/modules/sfp_email.py b/modules/sfp_email.pyindex 3db38de9..98e6d26f 100644--- a/modules/sfp_email.py+++ b/modules/sfp_email.py@@ -71,7 +71,7 @@ class sfp_email(SpiderFootPlugin):mailDom = email.split('@')[1].strip('.')if not self.sf.validHost(mailDom, self.opts['_internettlds']):self.sf.debug("Skipping " + email + " as not a valid e-mail.")- return None+ returnif not self.getTarget().matches(mailDom, includeChildren=True, includeParents=True) and not self.getTarget().matches(email):self.sf.debug("External domain, so possible affiliate e-mail")diff --git a/modules/sfp_emailcrawlr.py b/modules/sfp_emailcrawlr.pyindex 49b33d15..b6054ec4 100644--- a/modules/sfp_emailcrawlr.py+++ b/modules/sfp_emailcrawlr.py@@ -149,15 +149,15 @@ class sfp_emailcrawlr(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_emailcrawlr but did not set an API key!")self.errorState = True- return None+ returnself.results[eventData] = True@@ -168,7 +168,7 @@ class sfp_emailcrawlr(SpiderFootPlugin):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)@@ -177,7 +177,7 @@ class sfp_emailcrawlr(SpiderFootPlugin):if not emails:self.sf.info(f"No emails found for domain {eventData}")- return None+ returnfor res in emails:email = res.get('email')diff --git a/modules/sfp_emailrep.py b/modules/sfp_emailrep.pyindex cdeb96a6..5600a362 100644--- a/modules/sfp_emailrep.py+++ b/modules/sfp_emailrep.py@@ -125,7 +125,7 @@ class sfp_emailrep(SpiderFootPlugin):eventData = event.dataif eventData in self.results:- return None+ returnself.results[eventData] = True@@ -137,12 +137,12 @@ class sfp_emailrep(SpiderFootPlugin):res = self.query(eventData)if res is None:- return None+ returndetails = res.get('details')if not details:- return None+ returncredentials_leaked = details.get('credentials_leaked')if credentials_leaked:diff --git a/modules/sfp_emergingthreats.py b/modules/sfp_emergingthreats.pyindex 2734020f..048715b9 100644--- a/modules/sfp_emergingthreats.py+++ b/modules/sfp_emergingthreats.py@@ -128,10 +128,10 @@ class sfp_emergingthreats(SpiderFootPlugin):if eventData in self.results:self.sf.debug(f"Skipping {eventData}, already checked.")- return None+ returnif self.errorState:- return None+ returnself.results[eventData] = True@@ -140,28 +140,28 @@ class sfp_emergingthreats(SpiderFootPlugin):evtType = 'MALICIOUS_IPADDR'elif eventName == 'AFFILIATE_IPADDR':if not self.opts.get('checkaffiliates', False):- return None+ returntargetType = 'ip'evtType = 'MALICIOUS_AFFILIATE_IPADDR'elif eventName == 'NETBLOCK_OWNER':if not self.opts.get('checknetblocks', False):- return None+ returntargetType = 'netblock'evtType = 'MALICIOUS_NETBLOCK'elif eventName == 'NETBLOCK_MEMBER':if not self.opts.get('checksubnets', False):- return None+ returntargetType = 'netblock'evtType = 'MALICIOUS_SUBNET'else:- return None+ returnself.sf.debug(f"Checking maliciousness of {eventData} with emergingthreats.net")url = self.query(eventData, targetType)if not url:- return None+ returntext = f"emergingthreats.net [{eventData}]\n<SFURL>{url}</SFURL>"evt = SpiderFootEvent(evtType, text, self.__name__, event)diff --git a/modules/sfp_errors.py b/modules/sfp_errors.pyindex 1bef80c4..cc3fa915 100644--- a/modules/sfp_errors.py+++ b/modules/sfp_errors.py@@ -77,7 +77,7 @@ class sfp_errors(SpiderFootPlugin):# We only want web content from the targetif srcModuleName != "sfp_spider":- return None+ returneventSource = event.actualSource@@ -89,7 +89,7 @@ class sfp_errors(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]:diff --git a/modules/sfp_etherscan.py b/modules/sfp_etherscan.pyindex 7f84492c..3eeb225c 100644--- a/modules/sfp_etherscan.py+++ b/modules/sfp_etherscan.py@@ -93,11 +93,13 @@ class sfp_etherscan(SpiderFootPlugin):if res['content'] is None:self.sf.info(f"No Etherscan data found for {qry}")return None+try:return json.loads(res['content'])except Exception as e:self.sf.debug(f"Error processing JSON response: {e}")- return None++ return None# Handle events sent to this moduledef handleEvent(self, event):@@ -108,7 +110,7 @@ class sfp_etherscan(SpiderFootPlugin):self.sf.debug(f"Received event, {eventName}, from {srcModuleName}")if self.errorState:- return None+ returnif self.opts['api_key'] == "":self.sf.error("You enabled sfp_etherscan but did not set an API key!")@@ -117,14 +119,14 @@ class sfp_etherscan(SpiderFootPlugin):if 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:self.sf.info(f"No Etherscan data found for {eventData}")- return None+ return# Value returned by etherscan was too large in comparison to actual wallet balancebalance = float(data.get('result')) / 1000000000000000000diff --git a/modules/sfp_filemeta.py b/modules/sfp_filemeta.pyindex 559cd4cb..84b14663 100644--- a/modules/sfp_filemeta.py+++ b/modules/sfp_filemeta.py@@ -73,13 +73,13 @@ class sfp_filemeta(SpiderFootPlugin):self.sf.debug(f"Received event, {eventName}, from {srcModuleName}")if eventData in self.results:- return None+ returnself.results[eventData] = Truefor fileExt in self.opts['fileexts']:if self.checkForStop():- return None+ returnif "." + fileExt.lower() in eventData.lower():# Fetch the file, allow much more time given that these files are@@ -90,11 +90,11 @@ class sfp_filemeta(SpiderFootPlugin):verify=False)if ret['content'] is None:self.sf.error(f"Unable to fetch file for meta analysis: {eventData}")- return None+ returnif len(ret['content']) < 512:self.sf.error(f"Strange content encountered, size of {len(ret['content'])}")- return None+ returnmeta = Nonedata = None@@ -109,7 +109,7 @@ class sfp_filemeta(SpiderFootPlugin):self.sf.debug("Obtained meta data from " + eventData)except Exception as e:self.sf.error(f"Unable to parse meta data from: {eventData} ({e})")- return None+ returnif fileExt.lower() in ["docx"]:try:@@ -123,7 +123,7 @@ class sfp_filemeta(SpiderFootPlugin):meta = ", ".join(data)except Exception as e:self.sf.error(f"Unable to process file: {eventData} ({e})")- return None+ returnif fileExt.lower() in ["pptx"]:try:@@ -137,7 +137,7 @@ class sfp_filemeta(SpiderFootPlugin):meta = ", ".join(data)except Exception as e:self.sf.error(f"Unable to process file: {eventData} ({e})")- return None+ returnif fileExt.lower() in ["jpg", "jpeg", "tiff"]:try:@@ -148,7 +148,7 @@ class sfp_filemeta(SpiderFootPlugin):meta = str(data)except Exception as e:self.sf.error(f"Unable to parse meta data from: {eventData} ({e})")- return None+ returnif meta is not None and data is not None:evt = SpiderFootEvent("RAW_FILE_META_DATA", meta,@@ -170,7 +170,7 @@ class sfp_filemeta(SpiderFootPlugin):val.append(str(data['Image Software']))except Exception as e:self.sf.error("Failed to parse PDF, " + eventData + ": " + str(e))- return None+ returnfor v in val:if v and not isinstance(v, PyPDF2.generic.NullObject):diff --git a/modules/sfp_flickr.py b/modules/sfp_flickr.pyindex 9191896d..9a7318eb 100644--- a/modules/sfp_flickr.py+++ b/modules/sfp_flickr.py@@ -130,7 +130,8 @@ class sfp_flickr(SpiderFootPlugin):return json.loads(res['content'])except Exception as e:self.sf.debug(f"Error processing JSON response: {e}")- return None++ return None# Handle events sent to this moduledef handleEvent(self, event):@@ -140,7 +141,7 @@ class sfp_flickr(SpiderFootPlugin):if eventData in self.results:self.sf.debug(f"Skipping {eventData}, already checked")- return None+ returnself.results[eventData] = True@@ -148,14 +149,14 @@ class sfp_flickr(SpiderFootPlugin):if srcModuleName == 'sfp_flickr':self.sf.debug(f"Ignoring {eventData}, from self.")- return None+ return# Retrieve API keyapi_key = self.retrieveApiKey()if not api_key:self.sf.error("Failed to obtain API key")- return None+ returnself.sf.debug(f"Retrieved API key: {api_key}")@@ -166,26 +167,26 @@ class sfp_flickr(SpiderFootPlugin):per_page = self.opts['per_page']while page <= pages:if self.checkForStop():- return None+ returnif self.errorState:- return None+ returndata = self.query(eventData, api_key, page=page, per_page=per_page)if data is None:- return None+ return# Check the response is okif data.get('stat') != "ok":self.sf.debug("Error retrieving search results.")- return None+ returnphotos = data.get('photos')if not photos:self.sf.debug("No search results.")- return None+ return# Calculate number of pages to retrieveresult_pages = int(photos.get('pages', 0))@@ -245,10 +246,10 @@ class sfp_flickr(SpiderFootPlugin):for host in set(hosts):if self.checkForStop():- return None+ returnif self.errorState:- return None+ returnif self.opts['dns_resolve'] and not self.sf.resolveHost(host):self.sf.debug(f"Host {host} could not be resolved")diff --git a/modules/sfp_fraudguard.py b/modules/sfp_fraudguard.pyindex 4c91f66e..4e1ef7ec 100644--- a/modules/sfp_fraudguard.py+++ b/modules/sfp_fraudguard.py@@ -132,30 +132,30 @@ class sfp_fraudguard(SpiderFootPlugin):eventData = event.dataif self.errorState:- return None+ returnself.sf.debug(f"Received event, {eventName}, from {srcModuleName}")if self.opts['fraudguard_api_key_account'] == "" or self.opts['fraudguard_api_key_password'] == "":self.sf.error("You enabled sfp_fraudguard but did not set an API username/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+ 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+ returnqrylist = list()rtype = ""@@ -170,7 +170,7 @@ class sfp_fraudguard(SpiderFootPlugin):for addr in qrylist:if self.checkForStop():- return None+ returnrec = self.query(addr)if rec is not None:diff --git a/modules/sfp_fringeproject.py b/modules/sfp_fringeproject.pyindex da5ab275..c4b66bb1 100644--- a/modules/sfp_fringeproject.py+++ b/modules/sfp_fringeproject.py@@ -103,17 +103,17 @@ class sfp_fringeproject(SpiderFootPlugin):eventData = event.dataif self.errorState:- return None+ returnself.sf.debug(f"Received event, {eventName}, from {srcModuleName}")if srcModuleName == 'sfp_fringeproject':self.sf.debug("Ignoring " + eventData + ", from self.")- return None+ returnif eventData in self.results:self.sf.debug(f"Skipping {eventData}, already checked.")- return None+ returnself.results[eventData] = True@@ -121,7 +121,7 @@ class sfp_fringeproject(SpiderFootPlugin):if not data:self.sf.info("No results found for " + eventData)- return None+ returne = SpiderFootEvent('RAW_RIR_DATA', str(data), self.__name__, event)self.notifyListeners(e)diff --git a/modules/sfp_fsecure_riddler.py b/modules/sfp_fsecure_riddler.pyindex cd062e82..b20f82bc 100644--- a/modules/sfp_fsecure_riddler.py+++ b/modules/sfp_fsecure_riddler.py@@ -97,30 +97,28 @@ class sfp_fsecure_riddler(SpiderFootPlugin):timeout=self.opts['_fetchtimeout'])if res['content'] is None:- return None+ returntry:data = json.loads(res['content'])except Exception as e:self.sf.debug(f"Error processing JSON response from F-Secure Riddler: {e}")- return None+ returntry:token = data.get('response').get('user').get('authentication_token')except Exception:self.sf.error('Login failed')self.errorState = True- return None+ returnif not token:self.sf.error('Login failed')self.errorState = True- return None+ returnself.token = token- return None-# https://riddler.io/help/searchdef query(self, qry):params = {@@ -165,22 +163,22 @@ class sfp_fsecure_riddler(SpiderFootPlugin):eventData = event.dataif self.errorState:- return None+ returnself.sf.debug(f"Received event, {eventName}, from {srcModuleName}")if srcModuleName == 'sfp_fsecure_riddler':self.sf.debug("Ignoring " + eventData + ", from self.")- return None+ returnif eventData in self.results:self.sf.debug(f"Skipping {eventData}, already checked.")- return None+ returnif self.opts['username'] == '' or self.opts['password'] == '':self.sf.error('You enabled sfp_fsecure_riddler but did not set an API username/password!')self.errorState = True- return None+ returnif not self.token:self.login()@@ -196,7 +194,7 @@ class sfp_fsecure_riddler(SpiderFootPlugin):if not data:self.sf.info("No results found for " + eventData)- return None+ returne = SpiderFootEvent('RAW_RIR_DATA', str(data), self.__name__, event)self.notifyListeners(e)diff --git a/modules/sfp_fullcontact.py b/modules/sfp_fullcontact.pyindex 4e8a231c..cc68ebed 100644--- a/modules/sfp_fullcontact.py+++ b/modules/sfp_fullcontact.py@@ -165,20 +165,20 @@ class sfp_fullcontact(SpiderFootPlugin):eventData = event.dataif self.errorState:- return None+ returnif 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+ returnself.sf.debug(f"Received event, {eventName}, from {srcModuleName}")if eventData in self.results:self.sf.debug(f"Skipping {eventData}, already checked.")- return None+ returnself.results[eventData] = True@@ -186,7 +186,7 @@ class sfp_fullcontact(SpiderFootPlugin):data = self.queryPersonByEmail(eventData)if not data:- return None+ returnfull_name = data.get('fullName')@@ -194,13 +194,13 @@ class sfp_fullcontact(SpiderFootPlugin):e = SpiderFootEvent("RAW_RIR_DATA", f"Possible full name: {full_name}", self.__name__, event)self.notifyListeners(e)- return None+ returnif eventName == "DOMAIN_NAME":data = self.queryCompany(eventData)if not data:- return None+ returnif data.get("details"):data = data['details']diff --git a/modules/sfp_github.py b/modules/sfp_github.pyindex d4d0c078..eea63d79 100644--- a/modules/sfp_github.py+++ b/modules/sfp_github.py@@ -93,7 +93,7 @@ class sfp_github(SpiderFootPlugin):if eventData in self.results:self.sf.debug(f"Already did a search for {eventData}, skipping.")- return None+ returnself.results[eventData] = True@@ -104,18 +104,18 @@ class sfp_github(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 network != "Github":self.sf.debug(f"Skipping social network profile, {url}, as not a GitHub profile")- return None+ returntry:urlParts = url.split("/")username = urlParts[len(urlParts) - 1]except Exception:self.sf.debug(f"Couldn't get a username out of {url}")- return None+ returnres = self.sf.fetchUrl(f"https://api.github.com/users/{username}",@@ -124,23 +124,23 @@ class sfp_github(SpiderFootPlugin):)if res['content'] is None:- return None+ returntry:json_data = json.loads(res['content'])except Exception as e:self.sf.debug(f"Error processing JSON response: {e}")- return None+ returnif not json_data.get('login'):self.sf.debug(f"{username} is not a valid GitHub profile")- return None+ returnfull_name = json_data.get('name')if not full_name:self.sf.debug(f"{username} is not a valid GitHub profile")- return None+ returne = SpiderFootEvent("RAW_RIR_DATA", "Possible full name: {full_name}", self.__name__, event)self.notifyListeners(e)@@ -148,21 +148,21 @@ class sfp_github(SpiderFootPlugin):location = json_data.get('location')if location is None:- return None+ returnif len(location) < 3 or len(location) > 100:self.sf.debug(f"Skipping likely invalid location: {location}")- return None+ returne = SpiderFootEvent("GEOINFO", location, self.__name__, event)self.notifyListeners(e)- return None+ returnif eventName == "DOMAIN_NAME":username = self.sf.domainKeyword(eventData, self.opts['_internettlds'])if not username:- return None+ returnif eventName == "USERNAME":username = eventDatadiff --git a/modules/sfp_googlemaps.py b/modules/sfp_googlemaps.pyindex 72eafd00..71452f28 100644--- a/modules/sfp_googlemaps.py+++ b/modules/sfp_googlemaps.py@@ -97,11 +97,11 @@ class sfp_googlemaps(SpiderFootPlugin):eventData = event.dataif self.errorState:- return None+ returnif eventData in self.results:self.sf.debug(f"Skipping {eventData}, already checked.")- return None+ returnself.results[eventData] = True@@ -112,13 +112,13 @@ class sfp_googlemaps(SpiderFootPlugin):f"You enabled {self.__class__.__name__} but did not set an API key!")self.errorState = True- return None+ returnres = self.query(eventData)if not res:self.sf.debug(f"No information found for {eventData}")- return None+ returnevt = SpiderFootEvent("RAW_RIR_DATA",@@ -132,10 +132,10 @@ class sfp_googlemaps(SpiderFootPlugin):data = json.loads(res['content'])['results'][0]except Exception as e:self.sf.debug(f"Error processing JSON response: {e}")- return None+ returnif srcModuleName == "sfp_googlemaps":- return None+ returngeometry = data.get('geometry')if geometry:diff --git a/modules/sfp_googleobjectstorage.py b/modules/sfp_googleobjectstorage.pyindex ffde98cd..d7c84041 100644--- a/modules/sfp_googleobjectstorage.py+++ b/modules/sfp_googleobjectstorage.py@@ -71,11 +71,11 @@ class sfp_googleobjectstorage(SpiderFootPlugin):res = self.sf.fetchUrl(url, timeout=10, useragent="SpiderFoot", noLog=True)if not res['content']:- return None+ returnif "NoSuchBucket" in res['content']:self.sf.debug(f"Not a valid bucket: {url}")- return None+ return# Bucket foundif res['code'] in ["301", "302", "200"]:@@ -150,7 +150,7 @@ class sfp_googleobjectstorage(SpiderFootPlugin):eventData = event.dataif eventData in self.results:- return None+ returnself.results[eventData] = True@@ -161,7 +161,7 @@ class sfp_googleobjectstorage(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'])@@ -173,7 +173,7 @@ class sfp_googleobjectstorage(SpiderFootPlugin):suffixes = [''] + self.opts['suffixes'].split(',')for s in suffixes:if self.checkForStop():- return None+ returnb = t + s + ".storage.googleapis.com"url = "https://" + bdiff --git a/modules/sfp_googlesafebrowsing.py b/modules/sfp_googlesafebrowsing.pyindex 1f008de4..da1f853c 100644--- a/modules/sfp_googlesafebrowsing.py+++ b/modules/sfp_googlesafebrowsing.py@@ -171,7 +171,7 @@ class sfp_googlesafebrowsing(SpiderFootPlugin):eventData = event.dataif self.errorState:- return None+ returnself.sf.debug(f"Received event, {eventName}, from {srcModuleName}")@@ -180,11 +180,11 @@ class sfp_googlesafebrowsing(SpiderFootPlugin):"You enabled sfp_googlesafebrowsing 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@@ -206,7 +206,7 @@ class sfp_googlesafebrowsing(SpiderFootPlugin):rec = self.query(eventData)if rec is None:- return None+ returnevt = SpiderFootEvent("RAW_RIR_DATA", str(rec), self.__name__, event)self.notifyListeners(evt)diff --git a/modules/sfp_googlesearch.py b/modules/sfp_googlesearch.pyindex ab0f837c..6441ad30 100644--- a/modules/sfp_googlesearch.py+++ b/modules/sfp_googlesearch.py@@ -85,18 +85,18 @@ class sfp_googlesearch(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_googlesearch but did not set a Google API key!")self.errorState = True- return None+ returnif eventData in self.results:self.sf.debug("Already did a search for " + eventData + ", skipping.")- return None+ returnself.results[eventData] = True@@ -112,7 +112,7 @@ class sfp_googlesearch(SpiderFootPlugin):)if res is None:# Failed to talk to the Google API or no results returned- return None+ returnurls = res["urls"]new_links = list(set(urls) - set(self.results.keys()))diff --git a/modules/sfp_grayhatwarfare.py b/modules/sfp_grayhatwarfare.pyindex 31456086..5817b4b7 100644--- a/modules/sfp_grayhatwarfare.py+++ b/modules/sfp_grayhatwarfare.py@@ -126,10 +126,10 @@ class sfp_grayhatwarfare(SpiderFootPlugin):eventData = event.dataif eventData in self.results:- return None+ returnif self.errorState:- return None+ returnself.results[eventData] = True@@ -150,7 +150,7 @@ class sfp_grayhatwarfare(SpiderFootPlugin):while currentPage < maxPages:currentIndex = currentPage * perPageif self.checkForStop():- return None+ returnif self.errorState:break@@ -158,7 +158,7 @@ class sfp_grayhatwarfare(SpiderFootPlugin):data = self.query(keyword=keyword, start=currentIndex)if not data:- return None+ returnfor row in data.get('buckets'):bucketName = row.get('bucket')diff --git a/modules/sfp_greynoise.py b/modules/sfp_greynoise.pyindex d6e81d36..b3b48e34 100644--- a/modules/sfp_greynoise.py+++ b/modules/sfp_greynoise.py@@ -126,40 +126,40 @@ class sfp_greynoise(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_greynoise 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 == '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 == 'IP_ADDRESS' or eventName.startswith('NETBLOCK_'):evtType = 'MALICIOUS_IPADDR'@@ -169,10 +169,10 @@ class sfp_greynoise(SpiderFootPlugin):ret = self.queryIP(eventData)if not ret:- return None+ returnif "data" not in ret:- return None+ returnif len(ret["data"]) > 0:for rec in ret["data"]:@@ -184,7 +184,7 @@ class sfp_greynoise(SpiderFootPlugin):age_limit_ts = int(time.time()) - (86400 * self.opts['age_limit_days'])if self.opts['age_limit_days'] > 0 and lastseen_ts < age_limit_ts:self.sf.debug("Record found but too old, skipping.")- return None+ return# Only report meta data about the target, not affiliatesif rec.get("metadata") and eventName == "IP_ADDRESS":diff --git a/modules/sfp_hackertarget.py b/modules/sfp_hackertarget.pyindex e3b2cf68..e96a8072 100644--- a/modules/sfp_hackertarget.py+++ b/modules/sfp_hackertarget.py@@ -301,27 +301,27 @@ class sfp_hackertarget(SpiderFootPlugin):if srcModuleName == "sfp_hackertarget" and eventName == "IP_ADDRESS":self.sf.debug(f"Ignoring {eventName}, from self.")- return None+ returnif 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+ returnmax_netblock = self.opts['maxnetblock']net_size = IPNetwork(eventData).prefixlenif net_size < max_netblock:self.sf.debug(f"Network size bigger than permitted: {net_size} > {max_netblock}")- return None+ returnif eventName == 'DOMAIN_NAME_PARENT':records = self.zoneTransfer(eventData)if not records:- return None+ returnevt = SpiderFootEvent('RAW_DNS_RECORDS', "\n".join(records), self.__name__, event)self.notifyListeners(evt)@@ -364,7 +364,7 @@ class sfp_hackertarget(SpiderFootPlugin):evt = SpiderFootEvent('DOMAIN_NAME', host, self.__name__, event)self.notifyListeners(evt)- return None+ returnqrylist = list()if eventName.startswith("NETBLOCK_"):@@ -380,7 +380,7 @@ class sfp_hackertarget(SpiderFootPlugin):for ip in qrylist:if self.checkForStop():- return None+ returnhosts = self.reverseIpLookup(ip)if not hosts:diff --git a/modules/sfp_haveibeenpwned.py b/modules/sfp_haveibeenpwned.pyindex f0c892a9..ce97fb31 100644--- a/modules/sfp_haveibeenpwned.py+++ b/modules/sfp_haveibeenpwned.py@@ -164,18 +164,18 @@ class sfp_haveibeenpwned(SpiderFootPlugin):eventData = event.dataif self.errorState:- return None+ returnif self.opts['api_key'] == "":self.sf.error("You enabled sfp_haveibeenpwned but did not set an API key!")self.errorState = True- return None+ returnself.sf.debug(f"Received event, {eventName}, from {srcModuleName}")if eventData in self.results:self.sf.debug(f"Skipping {eventData}, already checked.")- return None+ returnself.results[eventData] = True@@ -199,10 +199,10 @@ class sfp_haveibeenpwned(SpiderFootPlugin):# This API endpoint doesn't support phone numbersif eventName == "PHONE_NUMBER":- return None+ returnpasteData = self.queryPaste(eventData)if pasteData is None:- return None+ returnsites = {"Pastebin": "https://pastebin.com/",@@ -229,7 +229,7 @@ class sfp_haveibeenpwned(SpiderFootPlugin):self.sf.debug("Found a link: " + link)if self.checkForStop():- return None+ returnres = self.sf.fetchUrl(link, timeout=self.opts['_fetchtimeout'], useragent=self.opts['_useragent'])diff --git a/modules/sfp_honeypot.py b/modules/sfp_honeypot.pyindex f1cbdfb4..0d45bec3 100644--- a/modules/sfp_honeypot.py+++ b/modules/sfp_honeypot.py@@ -141,7 +141,7 @@ class sfp_honeypot(SpiderFootPlugin):self.sf.debug(f"Checking Honeypot: {lookup}")addrs = self.sf.resolveHost(lookup)if not addrs:- return None+ returnself.sf.debug(f"Addresses returned: {addrs}")@@ -166,8 +166,6 @@ class sfp_honeypot(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@@ -176,43 +174,43 @@ class sfp_honeypot(SpiderFootPlugin):parentEvent = eventif self.errorState:- return None+ returnself.sf.debug(f"Received event, {eventName}, from {srcModuleName}")if self.opts['api_key'] == "":self.sf.error("You enabled sfp_honeypot but did not set an API key!")self.errorState = True- return None+ returnif eventData in self.results:- return None+ returnself.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_hunter.py b/modules/sfp_hunter.pyindex 48c89b1b..41a0bdfa 100644--- a/modules/sfp_hunter.py+++ b/modules/sfp_hunter.py@@ -114,27 +114,27 @@ class sfp_hunter(SpiderFootPlugin):eventData = event.dataif self.errorState:- return None+ returnself.sf.debug(f"Received event, {eventName}, from {srcModuleName}")if eventData in self.results:self.sf.debug(f"Skipping {eventData}, already checked.")- return None+ returnself.results[eventData] = Trueif self.opts['api_key'] == "":self.sf.error("You enabled sfp_hunter but did not set an API key!")self.errorState = True- return None+ returndata = self.query(eventData, 0, 10)if not data:- return None+ returnif "data" not in data:- return None+ return# Check if we have more results on further pagesif "meta" in data:@@ -166,13 +166,13 @@ class sfp_hunter(SpiderFootPlugin):self.notifyListeners(e)if rescount >= maxgoal:- return None+ returndata = self.query(eventData, rescount, 10)if data is None:- return None+ returnif "data" not in data:- return None+ returnrescount += len(data['data'].get('emails', list()))diff --git a/modules/sfp_iknowwhatyoudownload.py b/modules/sfp_iknowwhatyoudownload.pyindex 5e489f39..30c19b99 100644--- a/modules/sfp_iknowwhatyoudownload.py+++ b/modules/sfp_iknowwhatyoudownload.py@@ -127,24 +127,24 @@ class sfp_iknowwhatyoudownload(SpiderFootPlugin):self.sf.debug(f"Received event, {eventName}, from {srcModuleName}")if self.errorState:- return None+ returnif self.opts['api_key'] == "":self.sf.error("You enabled sfp_iknowwhatyoudownload 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.query(eventData)if not data:- return None+ returne = SpiderFootEvent("MALICIOUS_IPADDR", data, self.__name__, event)self.notifyListeners(e)diff --git a/modules/sfp_instagram.py b/modules/sfp_instagram.pyindex c58c1336..16b54336 100644--- a/modules/sfp_instagram.py+++ b/modules/sfp_instagram.py@@ -77,7 +77,7 @@ class sfp_instagram(SpiderFootPlugin):eventData = event.dataif eventData in self.results:- return None+ returnself.results[eventData] = True@@ -89,11 +89,11 @@ class sfp_instagram(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 network != 'Instagram':self.sf.debug(f"Skipping social network profile, {url}, as not an Instagram profile")- return None+ return# Retrieve profileres = self.sf.fetchUrl(@@ -104,14 +104,14 @@ class sfp_instagram(SpiderFootPlugin):if res['content'] is None:self.sf.debug('No response from Instagram.com')- return None+ return# Check if the profile is valid and extract profile data as JSONjson_data = self.extractJson(res['content'])if not json_data:self.sf.debug(f"{url} is not a valid Instagram profile")- return None+ returne = SpiderFootEvent('RAW_RIR_DATA', str(json_data), self.__name__, event)self.notifyListeners(e)diff --git a/modules/sfp_intelx.py b/modules/sfp_intelx.pyindex 3cd6d6c3..c862b43e 100644--- a/modules/sfp_intelx.py+++ b/modules/sfp_intelx.py@@ -193,30 +193,30 @@ class sfp_intelx(SpiderFootPlugin):eventData = event.dataif self.errorState:- return None+ returnif self.opts['api_key'] == "" or self.opts['base_url'] == "":self.sf.error("You enabled sfp_intelx but did not set an API key and/or base URL!")self.errorState = True- return None+ returnself.sf.debug(f"Received event, {eventName}, from {srcModuleName}")if 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+ returndata = self.query(eventData, "intelligent")if data is None:- return None+ returnself.sf.info("Found IntelligenceX leak data for " + eventData)agelimit = int(time.time() * 1000) - (86400000 * self.opts['maxage'])@@ -249,11 +249,11 @@ class sfp_intelx(SpiderFootPlugin):self.notifyListeners(e)if "public.intelx.io" in self.opts['base_url'] or eventName != "INTERNET_NAME":- return None+ returndata = self.query(eventData, "phonebook")if data is None:- return None+ returnself.sf.info(f"Found IntelligenceX host and email data for {eventData}")for info in data:diff --git a/modules/sfp_intfiles.py b/modules/sfp_intfiles.pyindex 618d0793..d88d4baa 100644--- a/modules/sfp_intfiles.py+++ b/modules/sfp_intfiles.py@@ -62,7 +62,7 @@ class sfp_intfiles(SpiderFootPlugin):self.sf.debug(f"Received event, {eventName}, from {srcModuleName}")if eventData in self.results:- return None+ returnself.results[eventData] = Truediff --git a/modules/sfp_ipapico.py b/modules/sfp_ipapico.pyindex 6d65c796..c2d7d03b 100644--- a/modules/sfp_ipapico.py+++ b/modules/sfp_ipapico.py@@ -87,7 +87,8 @@ class sfp_ipapico(SpiderFootPlugin):return json.loads(res['content'])except Exception as e:self.sf.debug(f"Error processing JSON response: {e}")- return None++ return None# Handle events sent to this moduledef handleEvent(self, event):@@ -100,7 +101,7 @@ class sfp_ipapico(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@@ -108,7 +109,7 @@ class sfp_ipapico(SpiderFootPlugin):if data is None:self.sf.info("No results returned from ipapi.co")- return None+ returnif data.get('country'):location = ', '.join(filter(None, [data.get('city'), data.get('region'), data.get('region_code'), data.get('country_name'), data.get('country')]))diff --git a/modules/sfp_ipapicom.py b/modules/sfp_ipapicom.pyindex 8ee2103b..cc024553 100644--- a/modules/sfp_ipapicom.py+++ b/modules/sfp_ipapicom.py@@ -111,16 +111,16 @@ class sfp_ipapicom(SpiderFootPlugin):self.sf.debug(f"Received event, {eventName}, from {srcModuleName}")if self.errorState:- return None+ returnif self.opts['api_key'] == "":self.sf.error("You enabled sfp_ipapicom 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] = Truediff --git a/modules/sfp_ipqualityscore.py b/modules/sfp_ipqualityscore.pyindex f89196ed..ea785f96 100644--- a/modules/sfp_ipqualityscore.py+++ b/modules/sfp_ipqualityscore.py@@ -158,7 +158,7 @@ class sfp_ipqualityscore(SpiderFootPlugin):eventData = event.dataif self.errorState:- return None+ returnself.sf.debug(f"Received event, {eventName}, from {srcModuleName}")@@ -167,11 +167,11 @@ class sfp_ipqualityscore(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} as already mapped.")- return None+ returnself.results[eventData] = Truedata = self.query(eventData, eventName)diff --git a/modules/sfp_ipregistry.py b/modules/sfp_ipregistry.pyindex 9cb6e672..c8cfe3ae 100644--- a/modules/sfp_ipregistry.py+++ b/modules/sfp_ipregistry.py@@ -145,18 +145,18 @@ class sfp_ipregistry(SpiderFootPlugin):def handleEvent(self, event):if self.errorState:- return None+ returnself.sf.debug(f"Received event, {event.eventType}, from {event.module}")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 event.data in self.results:self.sf.debug(f"Skipping {event.data}, already checked.")- return None+ returnself.results[event.data] = Trueif event.eventType in ("IP_ADDRESS", "IPV6_ADDRESS"):diff --git a/modules/sfp_ipstack.py b/modules/sfp_ipstack.pyindex 87d60d1a..7a141e5a 100644--- a/modules/sfp_ipstack.py+++ b/modules/sfp_ipstack.py@@ -82,17 +82,17 @@ class sfp_ipstack(SpiderFootPlugin):self.sf.debug(f"Received event, {eventName}, from {srcModuleName}")if self.errorState:- return None+ returnif self.opts['api_key'] == "":self.sf.error("You enabled sfp_ipstack 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] = True@@ -106,10 +106,10 @@ class sfp_ipstack(SpiderFootPlugin):if 'success' in hostip and hostip['success'] is False:self.sf.error("Invalid ipstack.com API key or usage limits exceeded.")self.errorState = True- return None+ returnexcept Exception as e:self.sf.debug(f"Error processing JSON response: {e}")- return None+ returngeoinfo = hostip.get('country_name')if geoinfo:diff --git a/modules/sfp_jsonwhoiscom.py b/modules/sfp_jsonwhoiscom.pyindex 8d34bc8f..79a1146f 100644--- a/modules/sfp_jsonwhoiscom.py+++ b/modules/sfp_jsonwhoiscom.py@@ -153,15 +153,15 @@ class sfp_jsonwhoiscom(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_jsonwhoiscom but did not set an API key!")self.errorState = True- return None+ returnself.results[eventData] = True@@ -171,7 +171,7 @@ class sfp_jsonwhoiscom(SpiderFootPlugin):if res is None:self.sf.debug(f"No information found for domain {eventData}")- return None+ returnevt = SpiderFootEvent('RAW_RIR_DATA', str(res), self.__name__, event)self.notifyListeners(evt)diff --git a/modules/sfp_junkfiles.py b/modules/sfp_junkfiles.pyindex 8681561b..535b3d5c 100644--- a/modules/sfp_junkfiles.py+++ b/modules/sfp_junkfiles.py@@ -91,7 +91,7 @@ class sfp_junkfiles(SpiderFootPlugin):self.sf.debug(f"Received event, {eventName}, from {srcModuleName}")if eventData in self.results:- return None+ returnself.results[eventData] = True@@ -99,20 +99,20 @@ class sfp_junkfiles(SpiderFootPlugin):if host in self.skiphosts:self.sf.debug("Skipping " + host + " because it doesn't return 404s.")- return None+ return# http://www/blah/abc.php -> try http://www/blah/abc.php.[fileexts]for ext in self.opts['urlextstry']:if host in self.skiphosts:self.sf.debug("Skipping " + host + " because it doesn't return 404s.")- return None+ returnif "." + ext + "?" in eventData or "." + ext + "#" in eventData or \eventData.endswith("." + ext):bits = eventData.split("?")for x in self.opts['fileexts']:if self.checkForStop():- return None+ returnself.sf.debug("Trying " + x + " against " + eventData)fetch = bits[0] + "." + x@@ -139,18 +139,18 @@ class sfp_junkfiles(SpiderFootPlugin):base = self.sf.urlBaseDir(eventData)if not base or base in self.bases:- return None+ returnself.bases[base] = True# http://www/blah/abc.html -> try http://www/blah/[files]for f in self.opts['files']:if self.checkForStop():- return None+ returnif host in self.skiphosts:self.sf.debug("Skipping " + host + " because it doesn't return 404s.")- return None+ returnself.sf.debug("Trying " + f + " against " + eventData)fetch = base + f@@ -177,16 +177,16 @@ class sfp_junkfiles(SpiderFootPlugin):# don't do anything with the root directory of a siteself.sf.debug(f"Base: {base}, event: {eventData}")if base in [eventData, eventData + "/"]:- return None+ return# http://www/blah/abc.html -> try http://www/blah.[dirs]for dirfile in self.opts['dirs']:if self.checkForStop():- return None+ returnif host in self.skiphosts:self.sf.debug("Skipping " + host + " because it doesn't return 404s.")- return None+ returnif base.count('/') == 3:self.sf.debug("Skipping base url.")diff --git a/modules/sfp_keybase.py b/modules/sfp_keybase.pyindex 81096c1a..472d5125 100644--- a/modules/sfp_keybase.py+++ b/modules/sfp_keybase.py@@ -118,13 +118,13 @@ class sfp_keybase(SpiderFootPlugin):eventData = event.dataif self.errorState:- return None+ returnself.sf.debug(f"Received event, {eventName}, from {srcModuleName}")if eventData in self.results:self.sf.debug(f"Skipping {eventData}, already checked.")- return None+ returnself.results[eventData] = True@@ -137,13 +137,13 @@ class sfp_keybase(SpiderFootPlugin):if len(links) == 0:self.sf.debug("Not a keybase link")- return None+ returnuserName = links[0].split("/")[3]if userName in self.results:self.sf.debug(f"Skipping {userName}, already checked.")- return None+ returnself.results[userName] = True@@ -151,7 +151,7 @@ class sfp_keybase(SpiderFootPlugin):if content is None:self.sf.debug("No data found for username")- return None+ returnevt = SpiderFootEvent("RAW_RIR_DATA", str(content), self.__name__, event)self.notifyListeners(evt)@@ -169,7 +169,7 @@ class sfp_keybase(SpiderFootPlugin):if them is None:self.sf.debug("No data found for username")- return None+ return# Basic information about the usernamebasics = them.get('basics')@@ -182,7 +182,7 @@ class sfp_keybase(SpiderFootPlugin):responseUserName = basics.get('username')if userName != responseUserName:self.sf.error("Username does not match received response, skipping")- return None+ returnif profile:# Get and report full name of userdiff --git a/modules/sfp_leakix.py b/modules/sfp_leakix.pyindex 086437fb..93e87e11 100644--- a/modules/sfp_leakix.py+++ b/modules/sfp_leakix.py@@ -141,10 +141,10 @@ class sfp_leakix(SpiderFootPlugin):locs = list()if self.errorState:- return None+ returnif eventData in self.results:- return None+ returnself.results[eventData] = True@@ -160,7 +160,7 @@ class sfp_leakix(SpiderFootPlugin):if data is None:self.sf.debug("No information found for host " + eventData)- return None+ returnevt = SpiderFootEvent('RAW_RIR_DATA', str(data), self.__name__, event)self.notifyListeners(evt)diff --git a/modules/sfp_maltiverse.py b/modules/sfp_maltiverse.pyindex 9a491987..17f55d9f 100644--- a/modules/sfp_maltiverse.py+++ b/modules/sfp_maltiverse.py@@ -124,36 +124,36 @@ class sfp_maltiverse(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] = 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_"):@@ -163,13 +163,13 @@ class sfp_maltiverse(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)diff --git a/modules/sfp_malwaredomainlist.py b/modules/sfp_malwaredomainlist.pyindex 58ec8d97..c8352e53 100644--- a/modules/sfp_malwaredomainlist.py+++ b/modules/sfp_malwaredomainlist.py@@ -204,19 +204,19 @@ class sfp_malwaredomainlist(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_malwaredomainlist(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:diff --git a/modules/sfp_metadefender.py b/modules/sfp_metadefender.pyindex 343a8be1..d40e9523 100644--- a/modules/sfp_metadefender.py+++ b/modules/sfp_metadefender.py@@ -144,15 +144,15 @@ class sfp_metadefender(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_metadefender but did not set an API key!")self.errorState = True- return None+ returnself.results[eventData] = True@@ -163,7 +163,7 @@ class sfp_metadefender(SpiderFootPlugin):if data is None:self.sf.debug("No matches found for " + eventData)- return None+ returngeo_info = data.get('geo_info')@@ -176,13 +176,13 @@ class sfp_metadefender(SpiderFootPlugin):if not res:self.sf.debug("No matches found for " + eventData)- return None+ returnsources = res.get('sources')if not sources:self.sf.debug("No matches found for " + eventData)- return None+ returnfor m in sources:if m.get('assessment'):@@ -195,19 +195,19 @@ class sfp_metadefender(SpiderFootPlugin):if data is None:self.sf.debug("No matches found for " + eventData)- return None+ returnres = data.get('lookup_results')if not res:self.sf.debug("No matches found for " + eventData)- return None+ returnsources = res.get('sources')if not sources:self.sf.debug("No matches found for " + eventData)- return None+ returnfor m in sources:if m.get('assessment'):diff --git a/modules/sfp_myspace.py b/modules/sfp_myspace.pyindex 50672a27..791bd315 100644--- a/modules/sfp_myspace.py+++ b/modules/sfp_myspace.py@@ -66,7 +66,7 @@ class sfp_myspace(SpiderFootPlugin):eventData = event.dataif eventData in self.results:- return None+ returnself.results[eventData] = True@@ -81,14 +81,14 @@ class sfp_myspace(SpiderFootPlugin):if res['content'] is None:self.sf.error(f"Could not fetch MySpace content for {email}")- return None+ return# Extract HTML containing potential profile matchesprofiles = re.findall(r'<a href="/[a-zA-Z0-9_]+">[^<]+</a></h6>', res['content'])if not profiles:self.sf.debug(f"No profiles found for e-mail: {email}")- return None+ return# The first result is the closest match, but whether it's an exact match is unknown.profile = profiles[0]@@ -98,11 +98,11 @@ class sfp_myspace(SpiderFootPlugin):matches = re.findall(r'<a href=\"\/([a-zA-Z0-9_]+)\".*[\&; :\"\#\*\(\"\'\;\,\>\.\?\!]+' + email + r'[\&; :\"\#\*\)\"\'\;\,\<\.\?\!]+', profile, re.IGNORECASE)except Exception:self.sf.debug("Malformed e-mail address, skipping.")- return None+ returnif not matches:self.sf.debug("No concrete match for that e-mail.")- return None+ returnname = matches[0]e = SpiderFootEvent(@@ -120,28 +120,28 @@ class sfp_myspace(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 network != "MySpace":self.sf.debug(f"Skipping social network profile, {url}, as not a MySpace profile")- return None+ returnres = self.sf.fetchUrl(url, timeout=self.opts['_fetchtimeout'],useragent=self.opts['_useragent'])if res['content'] is None:- return None+ returndata = re.findall(r'<div class="location_[^"]+" data-display-text="(.+?)"', res['content'])if not data:- return None+ returnlocation = data[0]if len(location) < 5 or len(location) > 100:self.sf.debug("Skipping likely invalid location.")- return None+ returne = SpiderFootEvent("GEOINFO", location, self.__name__, event)self.notifyListeners(e)diff --git a/modules/sfp_nameapi.py b/modules/sfp_nameapi.pyindex 02c89ef8..05b2e344 100644--- a/modules/sfp_nameapi.py+++ b/modules/sfp_nameapi.py@@ -107,7 +107,7 @@ class sfp_nameapi(SpiderFootPlugin):f"You enabled {self.__class__.__name__} but did not set an API key!")self.errorState = True- return None+ returnself.results[eventData] = Truediff --git a/modules/sfp_names.py b/modules/sfp_names.pyindex 12bca702..4542ebab 100644--- a/modules/sfp_names.py+++ b/modules/sfp_names.py@@ -80,20 +80,20 @@ class sfp_names(SpiderFootPlugin):if url is not None:if self.opts['filterjscss'] and (".js" in url or ".css" in url):self.sf.debug("Ignoring web content from CSS/JS.")- return None+ return# Find names in email addresses in "<firstname>.<lastname>@<domain>" formatif eventName == "EMAILADDR" and self.opts['emailtoname']:potential_name = eventData.split("@")[0]if "." not in potential_name:- return None+ returnname = " ".join(map(str.capitalize, potential_name.split(".")))# Names usually do not contain numbersif re.search("[0-9]", name):- return None+ returnevt = SpiderFootEvent("HUMAN_NAME", name, self.__name__, event)if event.moduleDataSource:@@ -101,7 +101,7 @@ class sfp_names(SpiderFootPlugin):else:evt.moduleDataSource = "Unknown"self.notifyListeners(evt)- return None+ return# For RAW_RIR_DATA, there are only specific modules we# expect to see RELEVANT names within.@@ -111,7 +111,7 @@ class sfp_names(SpiderFootPlugin):"sfp_opencorporates", "sfp_slideshare","sfp_twitter", "sfp_venmo", "sfp_instagram"]:self.sf.debug("Ignoring RAW_RIR_DATA from untrusted module.")- return None+ return# Stage 1: Find things that look (very vaguely) like namesrx = re.compile(r"([A-Z][a-z�������������]+)\s+.?.?\s?([A-Z][�������������a-zA-Z\'\-]+)")diff --git a/modules/sfp_networksdb.py b/modules/sfp_networksdb.pyindex d8c7a7d9..e617cc95 100644--- a/modules/sfp_networksdb.py+++ b/modules/sfp_networksdb.py@@ -254,15 +254,15 @@ class sfp_networksdb(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_networksdb but did not set an API key!")self.errorState = True- return None+ returnself.results[eventData] = True@@ -314,7 +314,7 @@ class sfp_networksdb(SpiderFootPlugin):for co in set(cohosts):if self.checkForStop():- return None+ returnif co in self.results:continue@@ -342,13 +342,13 @@ class sfp_networksdb(SpiderFootPlugin):if data is None:self.sf.debug("No forward DNS results for " + eventData)- return None+ returnres = data.get('results')if not res:self.sf.debug("No forward DNS results for " + eventData)- return None+ returnevt = SpiderFootEvent('RAW_RIR_DATA', str(res), self.__name__, event)self.notifyListeners(evt)diff --git a/modules/sfp_onionsearchengine.py b/modules/sfp_onionsearchengine.pyindex bba1d685..c6fdb6a3 100644--- a/modules/sfp_onionsearchengine.py+++ b/modules/sfp_onionsearchengine.py@@ -83,11 +83,11 @@ class sfp_onionsearchengine(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@@ -96,7 +96,7 @@ class sfp_onionsearchengine(SpiderFootPlugin):while keepGoing and page <= int(self.opts['max_pages']):# Check if we've been asked to stopif self.checkForStop():- return None+ returnparams = {'search': '"' + eventData.encode('raw_unicode_escape').decode("ascii", errors='replace') + '"',@@ -111,7 +111,7 @@ class sfp_onionsearchengine(SpiderFootPlugin):if data is None or not data.get('content'):self.sf.info("No results returned from onionsearchengine.com.")- return None+ returnpage += 1@@ -119,7 +119,7 @@ class sfp_onionsearchengine(SpiderFootPlugin):# Work around some kind of bug in the siteif "you didn't submit a keyword" in data['content']:continue- return None+ returnif "forward >" not in data['content']:keepGoing = False@@ -134,7 +134,7 @@ class sfp_onionsearchengine(SpiderFootPlugin):for link in links:if self.checkForStop():- return None+ returnif link in self.results:continuediff --git a/modules/sfp_openbugbounty.py b/modules/sfp_openbugbounty.pyindex edd09a5c..de73c2b2 100644--- a/modules/sfp_openbugbounty.py+++ b/modules/sfp_openbugbounty.py@@ -104,7 +104,7 @@ class sfp_openbugbounty(SpiderFootPlugin):if eventData in self.results:self.sf.debug(f"Skipping {eventData}, already checked.")- return None+ returnself.results[eventData] = Truediff --git a/modules/sfp_opendns.py b/modules/sfp_opendns.pyindex dd3470da..c25a73b8 100644--- a/modules/sfp_opendns.py+++ b/modules/sfp_opendns.py@@ -95,7 +95,7 @@ class sfp_opendns(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@@ -104,7 +104,7 @@ class sfp_opendns(SpiderFootPlugin):if self.sf.resolveHost(eventData):resolved = Trueexcept Exception:- return None+ returnif resolved:found = self.queryAddr(eventData)diff --git a/modules/sfp_phishstats.py b/modules/sfp_phishstats.pyindex 9e56d82d..73d79e5d 100644--- a/modules/sfp_phishstats.py+++ b/modules/sfp_phishstats.py@@ -123,7 +123,7 @@ class sfp_phishstats(SpiderFootPlugin):eventData = event.dataif self.errorState:- return None+ returnself.sf.debug(f"Received event, {eventName}, from {srcModuleName}")diff --git a/modules/sfp_punkspider.py b/modules/sfp_punkspider.pyindex 2258612e..fcc3a7c7 100644--- a/modules/sfp_punkspider.py+++ b/modules/sfp_punkspider.py@@ -89,13 +89,13 @@ class sfp_punkspider(SpiderFootPlugin):if eventData in self.results:self.sf.debug(f"Skipping {eventData}, already checked.")- return None+ returnself.results[eventData] = Trueres = self.query(eventData)if not res:- return None+ returnfor rec in res:if 'vulns' not in res[rec]:diff --git a/modules/sfp_quad9.py b/modules/sfp_quad9.pyindex 61099ddf..53a01364 100644--- a/modules/sfp_quad9.py+++ b/modules/sfp_quad9.py@@ -90,20 +90,20 @@ class sfp_quad9(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 Quad9.if not self.sf.resolveHost(eventData):- return None+ returnfound = self.query(eventData)# Host was found, not blockedif found:- return None+ returntyp = "MALICIOUS_" + eventNamediff --git a/modules/sfp_s3bucket.py b/modules/sfp_s3bucket.pyindex fafc7981..65c3a8e3 100644--- a/modules/sfp_s3bucket.py+++ b/modules/sfp_s3bucket.py@@ -64,8 +64,6 @@ class sfp_s3bucket(SpiderFootPlugin):return ["DOMAIN_NAME", "LINKED_URL_EXTERNAL"]# What events this module produces- # This is to support the end user in selecting modules based on events- # produced.def producedEvents(self):return ["CLOUD_STORAGE_BUCKET", "CLOUD_STORAGE_BUCKET_OPEN"]@@ -73,11 +71,11 @@ class sfp_s3bucket(SpiderFootPlugin):res = self.sf.fetchUrl(url, timeout=10, useragent="SpiderFoot", noLog=True)if not res['content']:- return None+ returnif "NoSuchBucket" in res['content']:self.sf.debug(f"Not a valid bucket: {url}")- return None+ return# Bucket foundif res['code'] in ["301", "302", "200"]:@@ -98,7 +96,7 @@ class sfp_s3bucket(SpiderFootPlugin):for site in siteList:if self.checkForStop():- return None+ return Falseself.sf.info("Spawning thread to check bucket: " + site)tname = str(random.SystemRandom().randint(0, 999999999))diff --git a/modules/sfp_spamcop.py b/modules/sfp_spamcop.pyindex be75f8f2..c6d2620d 100644--- a/modules/sfp_spamcop.py+++ b/modules/sfp_spamcop.py@@ -96,7 +96,7 @@ class sfp_spamcop(SpiderFootPlugin):for domain in self.checks:if self.checkForStop():- return None+ returntry:lookup = self.reverseAddr(qaddr) + "." + domain@@ -112,15 +112,14 @@ class sfp_spamcop(SpiderFootPlugin):if type(self.checks[domain]) is str:text = self.checks[domain] + " (" + qaddr + ")"break- else:- if str(addr) not in list(self.checks[domain].keys()):- self.sf.debug("Return code not found in list: " + str(addr))- continue+ if str(addr) in list(self.checks[domain].keys()):k = str(addr)text = self.checks[domain][k] + " (" + qaddr + ")"break+ self.sf.debug(f"Return code not found in list: {addr}")+if text is not None:if eventName == "AFFILIATE_IPADDR":e = "BLACKLISTED_AFFILIATE_IPADDR"@@ -137,8 +136,6 @@ class sfp_spamcop(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@@ -149,7 +146,7 @@ class sfp_spamcop(SpiderFootPlugin):self.sf.debug(f"Received event, {eventName}, from {srcModuleName}")if eventData in self.results:- return None+ returnself.results[eventData] = Trueif eventName == 'NETBLOCK_OWNER':diff --git a/modules/sfp_spamhaus.py b/modules/sfp_spamhaus.pyindex 84c51963..b39045cd 100644--- a/modules/sfp_spamhaus.py+++ b/modules/sfp_spamhaus.py@@ -120,15 +120,14 @@ class sfp_spamhaus(SpiderFootPlugin):if type(self.checks[domain]) is str:text = self.checks[domain] + " (" + qaddr + ")"break- else:- if str(addr) not in list(self.checks[domain].keys()):- self.sf.debug("Return code not found in list: " + str(addr))- continue+ if str(addr) in list(self.checks[domain].keys()):k = str(addr)text = self.checks[domain][k] + " (" + qaddr + ")"break+ self.sf.debug(f"Return code not found in list: {addr}")+if text is not None:if eventName == "AFFILIATE_IPADDR":e = "BLACKLISTED_AFFILIATE_IPADDR"@@ -145,8 +144,6 @@ class sfp_spamhaus(SpiderFootPlugin):except Exception as e:self.sf.debug("Unable to resolve " + qaddr + " / " + lookup + ": " + str(e))- return None-def handleEvent(self, event):eventName = event.eventTypesrcModuleName = event.modulediff --git a/modules/sfp_viewdns.py b/modules/sfp_viewdns.pyindex ae6049ee..2c9d705d 100644--- a/modules/sfp_viewdns.py+++ b/modules/sfp_viewdns.py@@ -109,33 +109,33 @@ class sfp_viewdns(SpiderFootPlugin):if res['code'] in ["400", "429", "500", "403"]:self.sf.error("ViewDNS.info API key seems to have been rejected or you have exceeded usage limits.")self.errorState = True- return None+ returnif res['content'] is None:self.sf.info(f"No ViewDNS.info data found for {qry}")- return None+ returnif res['content'] == 'Query limit reached for the supplied API key.':self.sf.error("ViewDNS.info API usage limit exceeded.")self.errorState = True- return None+ returntry:info = json.loads(res['content'])except Exception as e:self.sf.error(f"Error processing JSON response from ViewDNS.info: {e}")- return None+ returnif not info.get("query"):self.sf.error("Error querying ViewDNS.info. Could be unavailable right now.")self.errorState = True- return None+ returnresponse = info.get("response")if response:if response.get("error"):self.sf.error(f"Error querying ViewDNS.info: {response.get('error')}")- return None+ returnif len(response.get(responsekey, list())) == pagesize:self.sf.debug(f"Looping at ViewDNS page {page}")diff --git a/setup.cfg b/setup.cfgindex 372e0613..918512b0 100644--- a/setup.cfg+++ b/setup.cfg@@ -14,7 +14,7 @@ per-file-ignores =sflib.py:I,D,SFS101sfwebui.py:A,I,D,SFS101,Q003sfscan.py:I,D,SIM105,SIM109- modules/*:I,D,R501+ modules/*:I,Dmodules/sfp__stor_stdout.py:D,SFS201modules/sfp_bitcoin.py:D,SFS101modules/sfp_reversewhois.py:D,R504