Skip to content

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

modules: use f-strings

Brendan Coles8b8bc68952a5
diff --git a/modules/sfp_abusech.py b/modules/sfp_abusech.py
index c2af00f2..fee0fe03 100644
--- a/modules/sfp_abusech.py
+++ b/modules/sfp_abusech.py
@@ -279,7 +279,7 @@ class sfp_abusech(SpiderFootPlugin):
# Notify other modules of what you've found
if url is not None:
- text = check + " [" + eventData + "]\n" + "<SFURL>" + url + "</SFURL>"
+ text = f"{check} [{eventData}]\n<SFURL>{url}</SFURL>"
evt = SpiderFootEvent(evtType, text, self.__name__, event)
self.notifyListeners(evt)
diff --git a/modules/sfp_abuseipdb.py b/modules/sfp_abuseipdb.py
index e1500205..8b36c22f 100644
--- a/modules/sfp_abuseipdb.py
+++ b/modules/sfp_abuseipdb.py
@@ -236,7 +236,7 @@ class sfp_abuseipdb(SpiderFootPlugin):
# Notify other modules of what you've found
if url is not None:
- text = check + " [" + eventData + "]\n" + "<SFURL>" + url + "</SFURL>"
+ text = f"{check} [{eventData}]\n<SFURL>{url}</SFURL>"
evt = SpiderFootEvent(evtType, text, self.__name__, event)
self.notifyListeners(evt)
diff --git a/modules/sfp_alienvaultiprep.py b/modules/sfp_alienvaultiprep.py
index fcf1d2f5..a6195d70 100644
--- a/modules/sfp_alienvaultiprep.py
+++ b/modules/sfp_alienvaultiprep.py
@@ -245,7 +245,7 @@ class sfp_alienvaultiprep(SpiderFootPlugin):
# Notify other modules of what you've found
if url is not None:
- text = check + " [" + eventData + "]\n" + "<SFURL>" + url + "</SFURL>"
+ text = f"{check} [{eventData}]\n<SFURL>{url}</SFURL>"
evt = SpiderFootEvent(evtType, text, self.__name__, event)
self.notifyListeners(evt)
diff --git a/modules/sfp_bambenek.py b/modules/sfp_bambenek.py
index 4cdb1bf8..6befe520 100644
--- a/modules/sfp_bambenek.py
+++ b/modules/sfp_bambenek.py
@@ -255,7 +255,7 @@ class sfp_bambenek(SpiderFootPlugin):
# Notify other modules of what you've found
if url is not None:
- text = check + " [" + eventData + "]\n" + "<SFURL>" + url + "</SFURL>"
+ text = f"{check} [{eventData}]\n<SFURL>{url}</SFURL>"
evt = SpiderFootEvent(evtType, text, self.__name__, event)
self.notifyListeners(evt)
diff --git a/modules/sfp_blocklistde.py b/modules/sfp_blocklistde.py
index d65902cd..fb566458 100644
--- a/modules/sfp_blocklistde.py
+++ b/modules/sfp_blocklistde.py
@@ -244,7 +244,7 @@ class sfp_blocklistde(SpiderFootPlugin):
# Notify other modules of what you've found
if url is not None:
- text = check + " [" + eventData + "]\n" + "<SFURL>" + url + "</SFURL>"
+ text = f"{check} [{eventData}]\n<SFURL>{url}</SFURL>"
evt = SpiderFootEvent(evtType, text, self.__name__, event)
self.notifyListeners(evt)
diff --git a/modules/sfp_botvrij.py b/modules/sfp_botvrij.py
index fb118c22..7c25d616 100644
--- a/modules/sfp_botvrij.py
+++ b/modules/sfp_botvrij.py
@@ -218,7 +218,7 @@ class sfp_botvrij(SpiderFootPlugin):
# Notify other modules of what you've found
if url is not None:
- text = check + " [" + eventData + "]\n" + "<SFURL>" + url + "</SFURL>"
+ text = f"{check} [{eventData}]\n<SFURL>{url}</SFURL>"
evt = SpiderFootEvent(evtType, text, self.__name__, event)
self.notifyListeners(evt)
diff --git a/modules/sfp_callername.py b/modules/sfp_callername.py
index caa91629..a13a8fe6 100644
--- a/modules/sfp_callername.py
+++ b/modules/sfp_callername.py
@@ -96,7 +96,7 @@ class sfp_callername(SpiderFootPlugin):
return None
# Query CallerName.com for the specified phone number
- url = 'https://callername.com/' + number
+ url = f"https://callername.com/{number}"
res = self.sf.fetchUrl(url, timeout=self.opts['_fetchtimeout'], useragent=self.opts['_useragent'])
time.sleep(1)
@@ -128,7 +128,7 @@ class sfp_callername(SpiderFootPlugin):
bad_votes = int(rep_bad_match[0])
if bad_votes > good_votes:
- text = "CallerName [" + eventData + "]\n" + "<SFURL>" + url + "</SFURL>"
+ text = f"CallerName [{eventData}]\n<SFURL>{url}</SFURL>"
evt = SpiderFootEvent('MALICIOUS_PHONE_NUMBER', text, self.__name__, event)
self.notifyListeners(evt)
diff --git a/modules/sfp_coinblocker.py b/modules/sfp_coinblocker.py
index 5648a937..e75a1e6e 100644
--- a/modules/sfp_coinblocker.py
+++ b/modules/sfp_coinblocker.py
@@ -253,7 +253,7 @@ class sfp_coinblocker(SpiderFootPlugin):
# Notify other modules of what you've found
if url is not None:
- text = check + " [" + eventData + "]\n" + "<SFURL>" + url + "</SFURL>"
+ text = f"{check} [{eventData}]\n<SFURL>{url}</SFURL>"
evt = SpiderFootEvent(evtType, text, self.__name__, event)
self.notifyListeners(evt)
diff --git a/modules/sfp_crt.py b/modules/sfp_crt.py
index 1164e8b7..766a1eda 100644
--- a/modules/sfp_crt.py
+++ b/modules/sfp_crt.py
@@ -147,7 +147,7 @@ class sfp_crt(SpiderFootPlugin):
evt_type = 'AFFILIATE_INTERNET_NAME'
if self.opts['verify'] and not self.sf.resolveHost(domain):
- self.sf.debug("Host " + domain + " could not be resolved")
+ self.sf.debug(f"Host {domain} could not be resolved")
evt_type += '_UNRESOLVED'
evt = SpiderFootEvent(evt_type, domain, self.__name__, event)
diff --git a/modules/sfp_customfeed.py b/modules/sfp_customfeed.py
index 4f3287b3..b9d90bfa 100644
--- a/modules/sfp_customfeed.py
+++ b/modules/sfp_customfeed.py
@@ -240,7 +240,7 @@ class sfp_customfeed(SpiderFootPlugin):
# Notify other modules of what you've found
if url is not None:
- text = check + " [" + eventData + "]\n" + "<SFURL>" + url + "</SFURL>"
+ text = f"{check} [{eventData}]\n<SFURL>{url}</SFURL>"
evt = SpiderFootEvent(evtType, text, self.__name__, event)
self.notifyListeners(evt)
diff --git a/modules/sfp_cybercrimetracker.py b/modules/sfp_cybercrimetracker.py
index 8b010227..06e8fb8d 100644
--- a/modules/sfp_cybercrimetracker.py
+++ b/modules/sfp_cybercrimetracker.py
@@ -229,7 +229,7 @@ class sfp_cybercrimetracker(SpiderFootPlugin):
# Notify other modules of what you've found
if url is not None:
- text = check + " [" + eventData + "]\n" + "<SFURL>" + url + "</SFURL>"
+ text = f"{check} [{eventData}]\n<SFURL>{url}</SFURL>"
evt = SpiderFootEvent(evtType, text, self.__name__, event)
self.notifyListeners(evt)
diff --git a/modules/sfp_dnsgrep.py b/modules/sfp_dnsgrep.py
index 2bff9b1b..af0af23e 100644
--- a/modules/sfp_dnsgrep.py
+++ b/modules/sfp_dnsgrep.py
@@ -158,7 +158,7 @@ class sfp_dnsgrep(SpiderFootPlugin):
evt_type = "INTERNET_NAME"
if self.opts["dns_resolve"] and not self.sf.resolveHost(domain):
- self.sf.debug("Host " + domain + " could not be resolved")
+ self.sf.debug(f"Host {domain} could not be resolved")
evt_type += "_UNRESOLVED"
evt = SpiderFootEvent(evt_type, domain, self.__name__, event)
diff --git a/modules/sfp_dnsraw.py b/modules/sfp_dnsraw.py
index d8292580..413746d6 100644
--- a/modules/sfp_dnsraw.py
+++ b/modules/sfp_dnsraw.py
@@ -168,7 +168,7 @@ class sfp_dnsraw(SpiderFootPlugin):
evt_type = 'AFFILIATE_INTERNET_NAME'
if self.opts['verify'] and not self.sf.resolveHost(domain):
- self.sf.debug("Host " + domain + " could not be resolved")
+ self.sf.debug(f"Host {domain} could not be resolved")
evt_type += '_UNRESOLVED'
evt = SpiderFootEvent(evt_type, domain, self.__name__, parentEvent)
diff --git a/modules/sfp_fortinet.py b/modules/sfp_fortinet.py
index d3c18ed4..f372cc31 100644
--- a/modules/sfp_fortinet.py
+++ b/modules/sfp_fortinet.py
@@ -185,7 +185,7 @@ class sfp_fortinet(SpiderFootPlugin):
# Notify other modules of what you've found
if url is not None:
- text = check + " [" + eventData + "]\n" + "<SFURL>" + url + "</SFURL>"
+ text = f"{check} [{eventData}]\n<SFURL>{url}</SFURL>"
evt = SpiderFootEvent(evtType, text, self.__name__, event)
self.notifyListeners(evt)
diff --git a/modules/sfp_fsecure_riddler.py b/modules/sfp_fsecure_riddler.py
index a1aa5421..02be9c4d 100644
--- a/modules/sfp_fsecure_riddler.py
+++ b/modules/sfp_fsecure_riddler.py
@@ -234,7 +234,7 @@ class sfp_fsecure_riddler(SpiderFootPlugin):
evt_type = 'AFFILIATE_INTERNET_NAME'
if self.opts['verify'] and not self.sf.resolveHost(host):
- self.sf.debug("Host " + host + " could not be resolved")
+ self.sf.debug(f"Host {host} could not be resolved")
evt_type += '_UNRESOLVED'
evt = SpiderFootEvent(evt_type, host, self.__name__, event)
diff --git a/modules/sfp_grep_app.py b/modules/sfp_grep_app.py
index c3a150d4..8ffcd5e3 100644
--- a/modules/sfp_grep_app.py
+++ b/modules/sfp_grep_app.py
@@ -222,7 +222,7 @@ class sfp_grep_app(SpiderFootPlugin):
return None
if self.opts['dns_resolve'] and not self.sf.resolveHost(host):
- self.sf.debug("Host " + host + " could not be resolved")
+ self.sf.debug(f"Host {host} could not be resolved")
evt = SpiderFootEvent("INTERNET_NAME_UNRESOLVED", host, self.__name__, event)
self.notifyListeners(evt)
continue
diff --git a/modules/sfp_hackertarget.py b/modules/sfp_hackertarget.py
index 1dcac90b..cf9873dd 100644
--- a/modules/sfp_hackertarget.py
+++ b/modules/sfp_hackertarget.py
@@ -268,7 +268,7 @@ class sfp_hackertarget(SpiderFootPlugin):
evt_type = 'AFFILIATE_INTERNET_NAME'
if self.opts['verify'] and not self.sf.resolveHost(host):
- self.sf.debug("Host " + host + " could not be resolved")
+ self.sf.debug(f"Host {host} could not be resolved")
evt_type += '_UNRESOLVED'
evt = SpiderFootEvent(evt_type, host, self.__name__, event)
diff --git a/modules/sfp_isc.py b/modules/sfp_isc.py
index 13ffcc4a..d66b6e6f 100644
--- a/modules/sfp_isc.py
+++ b/modules/sfp_isc.py
@@ -193,7 +193,7 @@ class sfp_isc(SpiderFootPlugin):
# Notify other modules of what you've found
if url is not None:
- text = check + " [" + eventData + "]\n" + "<SFURL>" + url + "</SFURL>"
+ text = f"{check} [{eventData}]\n<SFURL>{url}</SFURL>"
evt = SpiderFootEvent(evtType, text, self.__name__, event)
self.notifyListeners(evt)
diff --git a/modules/sfp_malwaredomainlist.py b/modules/sfp_malwaredomainlist.py
index 0737e5cc..a527ab1c 100644
--- a/modules/sfp_malwaredomainlist.py
+++ b/modules/sfp_malwaredomainlist.py
@@ -254,7 +254,7 @@ class sfp_malwaredomainlist(SpiderFootPlugin):
# Notify other modules of what you've found
if url is not None:
- text = check + " [" + eventData + "]\n" + "<SFURL>" + url + "</SFURL>"
+ text = f"{check} [{eventData}]\n<SFURL>{url}</SFURL>"
evt = SpiderFootEvent(evtType, text, self.__name__, event)
self.notifyListeners(evt)
diff --git a/modules/sfp_malwaredomains.py b/modules/sfp_malwaredomains.py
index 7c7decab..ddaf46ad 100644
--- a/modules/sfp_malwaredomains.py
+++ b/modules/sfp_malwaredomains.py
@@ -230,7 +230,7 @@ class sfp_malwaredomains(SpiderFootPlugin):
# Notify other modules of what you've found
if url is not None:
- text = check + " [" + eventData + "]\n" + "<SFURL>" + url + "</SFURL>"
+ text = f"{check} [{eventData}]\n<SFURL>{url}</SFURL>"
evt = SpiderFootEvent(evtType, text, self.__name__, event)
self.notifyListeners(evt)
diff --git a/modules/sfp_multiproxy.py b/modules/sfp_multiproxy.py
index c4f36d86..56bab04c 100644
--- a/modules/sfp_multiproxy.py
+++ b/modules/sfp_multiproxy.py
@@ -230,7 +230,7 @@ class sfp_multiproxy(SpiderFootPlugin):
# Notify other modules of what you've found
if url is not None:
- text = check + " [" + eventData + "]\n" + "<SFURL>" + url + "</SFURL>"
+ text = f"{check} [{eventData}]\n<SFURL>{url}</SFURL>"
evt = SpiderFootEvent(evtType, text, self.__name__, event)
self.notifyListeners(evt)
diff --git a/modules/sfp_open_passive_dns_database.py b/modules/sfp_open_passive_dns_database.py
index 81b94888..f4124ec1 100644
--- a/modules/sfp_open_passive_dns_database.py
+++ b/modules/sfp_open_passive_dns_database.py
@@ -231,7 +231,7 @@ class sfp_open_passive_dns_database(SpiderFootPlugin):
continue
if self.opts['verify'] and not self.sf.resolveHost(domain):
- self.sf.debug("Host " + domain + " could not be resolved")
+ self.sf.debug(f"Host {domain} could not be resolved")
evt = SpiderFootEvent("INTERNET_NAME_UNRESOLVED", domain, self.__name__, event)
self.notifyListeners(evt)
else:
diff --git a/modules/sfp_openphish.py b/modules/sfp_openphish.py
index 32e9a16d..7dfccd42 100644
--- a/modules/sfp_openphish.py
+++ b/modules/sfp_openphish.py
@@ -228,7 +228,7 @@ class sfp_openphish(SpiderFootPlugin):
# Notify other modules of what you've found
if url is not None:
- text = check + " [" + eventData + "]\n" + "<SFURL>" + url + "</SFURL>"
+ text = f"{check} [{eventData}]\n<SFURL>{url}</SFURL>"
evt = SpiderFootEvent(evtType, text, self.__name__, event)
self.notifyListeners(evt)
diff --git a/modules/sfp_phishtank.py b/modules/sfp_phishtank.py
index 8494ea34..4b1e10da 100644
--- a/modules/sfp_phishtank.py
+++ b/modules/sfp_phishtank.py
@@ -225,7 +225,7 @@ class sfp_phishtank(SpiderFootPlugin):
# Notify other modules of what you've found
if url is not None:
- text = check + " [" + eventData + "]\n" + "<SFURL>" + url + "</SFURL>"
+ text = f"{check} [{eventData}]\n<SFURL>{url}</SFURL>"
evt = SpiderFootEvent(evtType, text, self.__name__, event)
self.notifyListeners(evt)
diff --git a/modules/sfp_spyse.py b/modules/sfp_spyse.py
index d981002e..0ddc2fc2 100644
--- a/modules/sfp_spyse.py
+++ b/modules/sfp_spyse.py
@@ -421,7 +421,7 @@ class sfp_spyse(SpiderFootPlugin):
continue
if self.opts['verify'] and not self.sf.resolveHost(domain):
- self.sf.debug("Host " + domain + " could not be resolved")
+ self.sf.debug(f"Host {domain} could not be resolved")
evt = SpiderFootEvent("INTERNET_NAME_UNRESOLVED", domain, self.__name__, event)
self.notifyListeners(evt)
else:
diff --git a/modules/sfp_talosintel.py b/modules/sfp_talosintel.py
index 2f9dc5fb..a3eb9f6d 100644
--- a/modules/sfp_talosintel.py
+++ b/modules/sfp_talosintel.py
@@ -244,7 +244,7 @@ class sfp_talosintel(SpiderFootPlugin):
# Notify other modules of what you've found
if url is not None:
- text = check + " [" + eventData + "]\n" + "<SFURL>" + url + "</SFURL>"
+ text = f"{check} [{eventData}]\n<SFURL>{url}</SFURL>"
evt = SpiderFootEvent(evtType, text, self.__name__, event)
self.notifyListeners(evt)
diff --git a/modules/sfp_torexits.py b/modules/sfp_torexits.py
index b3b4420d..bea93056 100644
--- a/modules/sfp_torexits.py
+++ b/modules/sfp_torexits.py
@@ -228,7 +228,7 @@ class sfp_torexits(SpiderFootPlugin):
# Notify other modules of what you've found
if url is not None:
- text = check + " [" + eventData + "]\n" + "<SFURL>" + url + "</SFURL>"
+ text = f"{check} [{eventData}]\n<SFURL>{url}</SFURL>"
evt = SpiderFootEvent(evtType, text, self.__name__, event)
self.notifyListeners(evt)
diff --git a/modules/sfp_totalhash.py b/modules/sfp_totalhash.py
index 736bd6a9..8f97e61c 100644
--- a/modules/sfp_totalhash.py
+++ b/modules/sfp_totalhash.py
@@ -190,7 +190,7 @@ class sfp_totalhash(SpiderFootPlugin):
# Notify other modules of what you've found
if url is not None:
- text = check + " [" + eventData + "]\n" + "<SFURL>" + url + "</SFURL>"
+ text = f"{check} [{eventData}]\n<SFURL>{url}</SFURL>"
evt = SpiderFootEvent(evtType, text, self.__name__, event)
self.notifyListeners(evt)
diff --git a/modules/sfp_voipbl.py b/modules/sfp_voipbl.py
index 6eb7c79f..935ff5da 100644
--- a/modules/sfp_voipbl.py
+++ b/modules/sfp_voipbl.py
@@ -241,7 +241,7 @@ class sfp_voipbl(SpiderFootPlugin):
# Notify other modules of what you've found
if url is not None:
- text = check + " [" + eventData + "]\n" + "<SFURL>" + url + "</SFURL>"
+ text = f"{check} [{eventData}]\n<SFURL>{url}</SFURL>"
evt = SpiderFootEvent(evtType, text, self.__name__, event)
self.notifyListeners(evt)
diff --git a/modules/sfp_vxvault.py b/modules/sfp_vxvault.py
index 6a13bcd7..f8152103 100644
--- a/modules/sfp_vxvault.py
+++ b/modules/sfp_vxvault.py
@@ -231,7 +231,7 @@ class sfp_vxvault(SpiderFootPlugin):
# Notify other modules of what you've found
if url is not None:
- text = check + " [" + eventData + "]\n" + "<SFURL>" + url + "</SFURL>"
+ text = f"{check} [{eventData}]\n<SFURL>{url}</SFURL>"
evt = SpiderFootEvent(evtType, text, self.__name__, event)
self.notifyListeners(evt)
diff --git a/modules/sfp_watchguard.py b/modules/sfp_watchguard.py
index 6bd8c676..34d32a16 100644
--- a/modules/sfp_watchguard.py
+++ b/modules/sfp_watchguard.py
@@ -193,7 +193,7 @@ class sfp_watchguard(SpiderFootPlugin):
# Notify other modules of what you've found
if url is not None:
- text = check + " [" + eventData + "]\n" + "<SFURL>" + url + "</SFURL>"
+ text = f"{check} [{eventData}]\n<SFURL>{url}</SFURL>"
evt = SpiderFootEvent(evtType, text, self.__name__, event)
self.notifyListeners(evt)