Skip to content

SpiderFoot automates OSINT for threat intelligence and mapping your attack surface.

modules: resolve pep8 violations: E101 E111 E222 E271

Brendan Coles222a0a06a752
diff --git a/modules/sfp_abusech.py b/modules/sfp_abusech.py
index eb390f6a..dbf07e88 100644
--- a/modules/sfp_abusech.py
+++ b/modules/sfp_abusech.py
@@ -271,11 +271,11 @@ class sfp_abusech(SpiderFootPlugin):
cid = malchecks[check]['id']
if eventName in ['IP_ADDRESS', 'AFFILIATE_IPADDR']:
- typeId = 'ip'
- if eventName == 'IP_ADDRESS':
- evtType = 'MALICIOUS_IPADDR'
- else:
- evtType = 'MALICIOUS_AFFILIATE_IPADDR'
+ typeId = 'ip'
+ if eventName == 'IP_ADDRESS':
+ evtType = 'MALICIOUS_IPADDR'
+ else:
+ evtType = 'MALICIOUS_AFFILIATE_IPADDR'
if eventName in ['BGP_AS_OWNER', 'BGP_AS_MEMBER']:
typeId = 'asn'
@@ -285,11 +285,11 @@ class sfp_abusech(SpiderFootPlugin):
'AFFILIATE_INTERNET_NAME']:
typeId = 'domain'
if eventName == "INTERNET_NAME":
- evtType = "MALICIOUS_INTERNET_NAME"
+ evtType = "MALICIOUS_INTERNET_NAME"
if eventName == 'AFFILIATE_INTERNET_NAME':
- evtType = 'MALICIOUS_AFFILIATE_INTERNET_NAME'
+ evtType = 'MALICIOUS_AFFILIATE_INTERNET_NAME'
if eventName == 'CO_HOSTED_SITE':
- evtType = 'MALICIOUS_COHOST'
+ evtType = 'MALICIOUS_COHOST'
if eventName == 'NETBLOCK_OWNER':
typeId = 'netblock'
diff --git a/modules/sfp_api_recon_dev.py b/modules/sfp_api_recon_dev.py
index 5c6a8f85..4c1e3286 100644
--- a/modules/sfp_api_recon_dev.py
+++ b/modules/sfp_api_recon_dev.py
@@ -17,7 +17,7 @@ from sflib import SpiderFoot, SpiderFootPlugin, SpiderFootEvent
class sfp_api_recon_dev(SpiderFootPlugin):
"""api.recon.dev:Footprint,Investigate,Passive:Passive DNS::Search api.recon.dev for subdomains."""
-
+
meta = {
'name': "api.recon.dev",
'summary': "Search api.recon.dev for subdomains.",
@@ -61,7 +61,7 @@ class sfp_api_recon_dev(SpiderFootPlugin):
'domain': qry.encode('raw_unicode_escape').decode("ascii", errors='replace')
}
res = self.sf.fetchUrl(
- 'https://api.recon.dev/search?' + urllib.parse.urlencode(params),
+ 'https://api.recon.dev/search?' + urllib.parse.urlencode(params),
headers=headers,
timeout=30,
useragent=self.opts['_useragent']
diff --git a/modules/sfp_archiveorg.py b/modules/sfp_archiveorg.py
index 2e6e65e0..af3f8263 100644
--- a/modules/sfp_archiveorg.py
+++ b/modules/sfp_archiveorg.py
@@ -18,7 +18,7 @@ from sflib import SpiderFoot, SpiderFootPlugin, SpiderFootEvent
class sfp_archiveorg(SpiderFootPlugin):
"""Archive.org:Footprint,Passive:Search Engines:slow:Identifies historic versions of interesting files/pages from the Wayback Machine."""
-
+
meta = {
'name': "Archive.org",
'summary': "Identifies historic versions of interesting files/pages from the Wayback Machine.",
diff --git a/modules/sfp_badipscom.py b/modules/sfp_badipscom.py
index e254ef1d..a71dc908 100644
--- a/modules/sfp_badipscom.py
+++ b/modules/sfp_badipscom.py
@@ -14,7 +14,7 @@ from sflib import SpiderFoot, SpiderFootPlugin, SpiderFootEvent
class sfp_badipscom(SpiderFootPlugin):
"""badips.com:Investigate,Passive:Reputation Systems::Check if an IP address is malicious according to BadIPs.com."""
-
+
meta = {
'name': "badips.com",
'summary': "Check if an IP address is malicious according to BadIPs.com.",
diff --git a/modules/sfp_binaryedge.py b/modules/sfp_binaryedge.py
index a86e96e4..e3338543 100644
--- a/modules/sfp_binaryedge.py
+++ b/modules/sfp_binaryedge.py
@@ -17,7 +17,7 @@ from sflib import SpiderFoot, SpiderFootPlugin, SpiderFootEvent
class sfp_binaryedge(SpiderFootPlugin):
"""BinaryEdge:Footprint,Investigate,Passive:Search Engines:apikey:Obtain information from BinaryEdge.io's Internet scanning systems about breaches, vulerabilities, torrents and passive DNS."""
-
+
meta = {
'name': "BinaryEdge",
'summary': "Obtain information from BinaryEdge.io's Internet scanning systems about breaches, vulerabilities, torrents and passive DNS.",
diff --git a/modules/sfp_bitcoin.py b/modules/sfp_bitcoin.py
index 3732a91c..4a870efa 100644
--- a/modules/sfp_bitcoin.py
+++ b/modules/sfp_bitcoin.py
@@ -18,7 +18,7 @@ from sflib import SpiderFoot, SpiderFootPlugin, SpiderFootEvent
class sfp_bitcoin(SpiderFootPlugin):
"""Bitcoin Finder:Footprint,Investigate,Passive:Content Analysis::Identify bitcoin addresses in scraped webpages."""
-
+
meta = {
'name': "Bitcoin Finder",
'summary': "Identify bitcoin addresses in scraped webpages.",
diff --git a/modules/sfp_blockchain.py b/modules/sfp_blockchain.py
index 42596c41..90f528ae 100644
--- a/modules/sfp_blockchain.py
+++ b/modules/sfp_blockchain.py
@@ -17,7 +17,7 @@ from sflib import SpiderFoot, SpiderFootPlugin, SpiderFootEvent
class sfp_blockchain(SpiderFootPlugin):
"""Blockchain:Footprint,Investigate,Passive:Public Registries::Queries blockchain.info to find the balance of identified bitcoin wallet addresses."""
-
+
meta = {
'name': "Blockchain",
'summary': "Queries blockchain.info to find the balance of identified bitcoin wallet addresses.",
diff --git a/modules/sfp_countryname.py b/modules/sfp_countryname.py
index 29d86e88..1ba926f2 100644
--- a/modules/sfp_countryname.py
+++ b/modules/sfp_countryname.py
@@ -306,12 +306,12 @@ class sfp_countryname(SpiderFootPlugin):
# Process the event data based on incoming event type
if eventName == "PHONE_NUMBER":
countryNames.append(self.detectCountryFromPhone(eventData))
- elif eventName == "DOMAIN_NAME" or (eventName == "AFFILIATE_DOMAIN_NAME" and self.opts["affiliate"]) or(eventName == "CO_HOSTED_SITE_DOMAIN" and self.opts["cohosted"]) or (eventName == "SIMILARDOMAIN" and self.opts["similardomain"]):
+ elif eventName == "DOMAIN_NAME" or (eventName == "AFFILIATE_DOMAIN_NAME" and self.opts["affiliate"]) or(eventName == "CO_HOSTED_SITE_DOMAIN" and self.opts["cohosted"]) or (eventName == "SIMILARDOMAIN" and self.opts["similardomain"]):
countryNames.append(self.detectCountryFromTLD(eventData))
elif eventName == "IBAN_NUMBER":
countryNames.append(self.detectCountryFromIBAN(eventData))
elif eventName in ["DOMAIN_WHOIS", "GEOINFO", "PHYSICAL_ADDRESS"] or (eventName == "AFFILIATE_DOMAIN_WHOIS" and self.opts["affiliate"]) or (eventName == "CO_HOSTED_SITE_DOMAIN_WHOIS" and self.opts["cohosted"]):
- tempDataList = self.detectCountryFromData(eventData)
+ tempDataList = self.detectCountryFromData(eventData)
if tempDataList is None:
countryNames.append(None)
else:
diff --git a/modules/sfp_crossref.py b/modules/sfp_crossref.py
index af9202db..b7717724 100644
--- a/modules/sfp_crossref.py
+++ b/modules/sfp_crossref.py
@@ -142,3 +142,4 @@ class sfp_crossref(SpiderFootPlugin):
evt2.moduleDataSource = event.moduleDataSource
self.notifyListeners(evt2)
+# End of sfp_crossref class
diff --git a/modules/sfp_emailrep.py b/modules/sfp_emailrep.py
index 108d2d95..594fb71c 100644
--- a/modules/sfp_emailrep.py
+++ b/modules/sfp_emailrep.py
@@ -43,7 +43,6 @@ class sfp_emailrep(SpiderFootPlugin):
"phishing emails, threat actor emails, and more to answer these types of questions.",
}
}
-
opts = {
'api_key': '',
diff --git a/modules/sfp_grep_app.py b/modules/sfp_grep_app.py
index a75e4b71..e7c7c737 100644
--- a/modules/sfp_grep_app.py
+++ b/modules/sfp_grep_app.py
@@ -235,4 +235,3 @@ class sfp_grep_app(SpiderFootPlugin):
self.notifyListeners(evt)
# End of sfp_grep_app class
-
diff --git a/modules/sfp_onyphe.py b/modules/sfp_onyphe.py
index 8dc47e90..11af0371 100644
--- a/modules/sfp_onyphe.py
+++ b/modules/sfp_onyphe.py
@@ -136,11 +136,7 @@ class sfp_onyphe(SpiderFootPlugin):
# Go through other pages if user has paid plan
try:
current_page = int(info["page"])
- if (
- self.opts["paid_plan"]
- and info.get("page")
- and int(info.get("max_page")) > current_page
- ):
+ if (self.opts["paid_plan"] and info.get("page") and int(info.get("max_page")) > current_page):
page = current_page + 1
if page > self.opts["max_page"]:
diff --git a/modules/sfp_talosintel.py b/modules/sfp_talosintel.py
index 8d3303f6..a16ea71e 100644
--- a/modules/sfp_talosintel.py
+++ b/modules/sfp_talosintel.py
@@ -243,13 +243,13 @@ class sfp_talosintel(SpiderFootPlugin):
url = self.lookupItem(cid, typeId, eventData)
if self.checkForStop():
- return None
+ return None
# Notify other modules of what you've found
if url is not None:
- text = check + " [" + eventData + "]\n" + "<SFURL>" + url + "</SFURL>"
- evt = SpiderFootEvent(evtType, text, self.__name__, event)
- self.notifyListeners(evt)
+ text = check + " [" + eventData + "]\n" + "<SFURL>" + url + "</SFURL>"
+ evt = SpiderFootEvent(evtType, text, self.__name__, event)
+ self.notifyListeners(evt)
return None