SpiderFoot automates OSINT for threat intelligence and mapping your attack surface.
Python attacksurfacecticybersecurityfootprintinghackinginformation-gatheringinformation-securityinfosecintelligence-gatheringosintosint-frameworkosint-reconnaissanceosint-toolpentestingpythonreconsecurity-toolsthreat-intelligencethreatintel
Data source tracking and rename of sfp_pwned.
Steve5e6a825e670d
diff --git a/modules/sfp_accounts.py b/modules/sfp_accounts.pyindex ec477f0a..ba80fbe7 100644--- a/modules/sfp_accounts.py+++ b/modules/sfp_accounts.py@@ -49,6 +49,7 @@ class sfp_accounts(SpiderFootPlugin):self.results = dict()self.commonNames = list()self.reportedUsers = list()+ self.__dataSource__ = "Social Media"for opt in userOpts.keys():self.opts[opt] = userOpts[opt]diff --git a/modules/sfp_base64.py b/modules/sfp_base64.pyindex abec2bef..1fb524a5 100644--- a/modules/sfp_base64.py+++ b/modules/sfp_base64.py@@ -30,6 +30,7 @@ class sfp_base64(SpiderFootPlugin):def setup(self, sfc, userOpts=dict()):self.sf = sfc+ self.__dataSource__ = "Target Website"for opt in userOpts.keys():self.opts[opt] = userOpts[opt]diff --git a/modules/sfp_bingsharedip.py b/modules/sfp_bingsharedip.pyindex cd2724ba..a25e6ed7 100644--- a/modules/sfp_bingsharedip.py+++ b/modules/sfp_bingsharedip.py@@ -39,6 +39,7 @@ class sfp_bingsharedip(SpiderFootPlugin):def setup(self, sfc, userOpts=dict()):self.sf = sfcself.results = list()+ self.__dataSource__ = "Bing"for opt in userOpts.keys():self.opts[opt] = userOpts[opt]diff --git a/modules/sfp_binstring.py b/modules/sfp_binstring.pyindex fe23db2f..5e8aa111 100644--- a/modules/sfp_binstring.py+++ b/modules/sfp_binstring.py@@ -48,6 +48,7 @@ class sfp_binstring(SpiderFootPlugin):def setup(self, sfc, userOpts=dict()):self.sf = sfcself.results = list()+ self.__dataSource__ = "Target Website"self.d = set(self.sf.dictwords())diff --git a/modules/sfp_crossref.py b/modules/sfp_crossref.pyindex 771640c4..ecbef0a6 100644--- a/modules/sfp_crossref.py+++ b/modules/sfp_crossref.py@@ -122,12 +122,16 @@ class sfp_crossref(SpiderFootPlugin):matched = Trueif matched:+ if not event.moduleDataSource:+ event.moduleDataSource = "Unknown"self.sf.info("Found affiliate: " + url)evt1 = SpiderFootEvent("AFFILIATE_INTERNET_NAME", self.sf.urlFQDN(url),self.__name__, event)+ evt1.moduleDataSource = event.moduleDataSourceself.notifyListeners(evt1)evt2 = SpiderFootEvent("AFFILIATE_WEB_CONTENT", res['content'],self.__name__, evt1)+ evt2.moduleDataSource = event.moduleDataSourceself.notifyListeners(evt2)# End of sfp_crossref classdiff --git a/modules/sfp_dnsbrute.py b/modules/sfp_dnsbrute.pyindex ff02e2fa..b4fcb9f0 100644--- a/modules/sfp_dnsbrute.py+++ b/modules/sfp_dnsbrute.py@@ -47,6 +47,7 @@ class sfp_dnsbrute(SpiderFootPlugin):self.sf = sfcself.events = dict()self.resolveCache = dict()+ self.__dataSource__ = "DNS"for opt in userOpts.keys():self.opts[opt] = userOpts[opt]diff --git a/modules/sfp_dnsneighbor.py b/modules/sfp_dnsneighbor.pyindex 383bab15..d2702ef4 100644--- a/modules/sfp_dnsneighbor.py+++ b/modules/sfp_dnsneighbor.py@@ -46,6 +46,7 @@ class sfp_dnsneighbor(SpiderFootPlugin):self.hostresults = dict()self.resolveCache = dict()self.resolveCache6 = dict()+ self.__dataSource__ = "DNS"for opt in userOpts.keys():self.opts[opt] = userOpts[opt]diff --git a/modules/sfp_dnsraw.py b/modules/sfp_dnsraw.pyindex 271260ef..ba33d640 100644--- a/modules/sfp_dnsraw.py+++ b/modules/sfp_dnsraw.py@@ -33,6 +33,7 @@ class sfp_dnsraw(SpiderFootPlugin):def setup(self, sfc, userOpts=dict()):self.sf = sfcself.events = dict()+ self.__dataSource__ = "DNS"for opt in userOpts.keys():self.opts[opt] = userOpts[opt]diff --git a/modules/sfp_dnsresolve.py b/modules/sfp_dnsresolve.pyindex 1fe5fc0b..35fecbf7 100644--- a/modules/sfp_dnsresolve.py+++ b/modules/sfp_dnsresolve.py@@ -52,6 +52,7 @@ class sfp_dnsresolve(SpiderFootPlugin):self.hostresults = dict()self.resolveCache = dict()self.resolveCache6 = dict()+ self.__dataSource__ = "DNS"for opt in userOpts.keys():self.opts[opt] = userOpts[opt]diff --git a/modules/sfp_email.py b/modules/sfp_email.pyindex 9856032c..dcc2ac23 100644--- a/modules/sfp_email.py+++ b/modules/sfp_email.py@@ -91,6 +91,10 @@ class sfp_email(SpiderFootPlugin):myres.append(mail)evt = SpiderFootEvent("EMAILADDR", mail, self.__name__, event)+ if event.moduleDataSource:+ evt.moduleDataSource = event.moduleDataSource+ else:+ evt.moduleDataSource = "Unknown"self.notifyListeners(evt)return Nonediff --git a/modules/sfp_googlesearch.py b/modules/sfp_googlesearch.pyindex d0367879..adbbe7e4 100644--- a/modules/sfp_googlesearch.py+++ b/modules/sfp_googlesearch.py@@ -14,7 +14,7 @@ from sflib import SpiderFoot, SpiderFootPlugin, SpiderFootEventclass sfp_googlesearch(SpiderFootPlugin):- """Google Search:Footprint,Investigate,Passive:Search Engines:errorprone:Some light Google scraping to identify sub-domains and links."""+ """Google:Footprint,Investigate,Passive:Search Engines:errorprone:Some light Google scraping to identify sub-domains and links."""# Default optionsdiff --git a/modules/sfp_googlesearchdomain.py b/modules/sfp_googlesearchdomain.pyindex b3aa9c21..bc1cfbbc 100644--- a/modules/sfp_googlesearchdomain.py+++ b/modules/sfp_googlesearchdomain.py@@ -36,6 +36,7 @@ class sfp_googlesearchdomain(SpiderFootPlugin):def setup(self, sfc, userOpts=dict()):self.sf = sfcself.results = list()+ self.__dataSource__ = "Google"for opt in userOpts.keys():self.opts[opt] = userOpts[opt]diff --git a/modules/sfp_pwned.py b/modules/sfp_haveibeenpwned.pysimilarity index 94%rename from modules/sfp_pwned.pyrename to modules/sfp_haveibeenpwned.pyindex 79704f85..79238bbe 100644--- a/modules/sfp_pwned.py+++ b/modules/sfp_haveibeenpwned.py@@ -1,5 +1,5 @@#--------------------------------------------------------------------------------# Name: sfp_pwned+# Name: sfp_haveibeenpwned# Purpose: Query haveibeenpwned.com to see if an e-mail account has been hacked.## Author: Steve Micallef <[email protected]>@@ -14,8 +14,8 @@ import jsonimport timefrom sflib import SpiderFoot, SpiderFootPlugin, SpiderFootEvent-class sfp_pwned(SpiderFootPlugin):- """Pwned Password:Footprint,Investigate,Passive:Leaks, Dumps and Breaches:errorprone:Check Have I Been Pwned? for hacked e-mail addresses identified."""+class sfp_haveibeenpwned(SpiderFootPlugin):+ """HaveIBeenPwned:Footprint,Investigate,Passive:Leaks, Dumps and Breaches:errorprone:Check Have I Been Pwned? for hacked e-mail addresses identified."""# Default options@@ -104,4 +104,4 @@ class sfp_pwned(SpiderFootPlugin):self.__name__, event)self.notifyListeners(e)-# End of sfp_pwned class+# End of sfp_haveibeenpwned classdiff --git a/modules/sfp_hosting.py b/modules/sfp_hosting.pyindex 54b3039a..c6681726 100644--- a/modules/sfp_hosting.py+++ b/modules/sfp_hosting.py@@ -34,6 +34,7 @@ class sfp_hosting(SpiderFootPlugin):def setup(self, sfc, userOpts=dict()):self.sf = sfcself.results = dict()+ self.__dataSource__ = "DNS"for opt in userOpts.keys():self.opts[opt] = userOpts[opt]diff --git a/modules/sfp_intfiles.py b/modules/sfp_intfiles.pyindex 402b7798..45fe2a05 100644--- a/modules/sfp_intfiles.py+++ b/modules/sfp_intfiles.py@@ -41,6 +41,7 @@ class sfp_intfiles(SpiderFootPlugin):def setup(self, sfc, userOpts=dict()):self.sf = sfcself.results = list()+ self.__dataSource__ = "Target Website"for opt in userOpts.keys():self.opts[opt] = userOpts[opt]diff --git a/modules/sfp_junkfiles.py b/modules/sfp_junkfiles.pyindex 75ad69bc..b4c9db5a 100644--- a/modules/sfp_junkfiles.py+++ b/modules/sfp_junkfiles.py@@ -47,6 +47,7 @@ class sfp_junkfiles(SpiderFootPlugin):self.hosts = list()self.skiphosts = list()self.bases = list()+ self.__dataSource__ = "Target Website"for opt in userOpts.keys():self.opts[opt] = userOpts[opt]diff --git a/modules/sfp_names.py b/modules/sfp_names.pyindex d6d4a0e8..4ced705d 100644--- a/modules/sfp_names.py+++ b/modules/sfp_names.py@@ -129,6 +129,10 @@ class sfp_names(SpiderFootPlugin):if p > self.opts['algotune']:# Notify other modules of what you've foundevt = SpiderFootEvent("HUMAN_NAME", name, self.__name__, event)+ if event.moduleDataSource:+ evt.moduleDataSource = event.moduleDataSource+ else:+ evt.moduleDataSource = "Unknown"self.notifyListeners(evt)# End of sfp_names classdiff --git a/modules/sfp_pgp.py b/modules/sfp_pgp.pyindex 8d721667..cd7cb9e3 100644--- a/modules/sfp_pgp.py+++ b/modules/sfp_pgp.py@@ -41,7 +41,7 @@ class sfp_pgp(SpiderFootPlugin):def setup(self, sfc, userOpts=dict()):self.sf = sfc-+ self.__dataSource__ = "PGP Key Servers"self.results = list()for opt in userOpts.keys():diff --git a/modules/sfp_phone.py b/modules/sfp_phone.pyindex 5972ad76..40571df7 100644--- a/modules/sfp_phone.py+++ b/modules/sfp_phone.py@@ -64,6 +64,10 @@ class sfp_phone(SpiderFootPlugin):n = phonenumbers.format_number(match.number,phonenumbers.PhoneNumberFormat.E164)evt = SpiderFootEvent("PHONE_NUMBER", n, self.__name__, event)+ if event.moduleDataSource:+ evt.moduleDataSource = event.moduleDataSource+ else:+ evt.moduleDataSource = "Unknown"self.notifyListeners(evt)return Nonediff --git a/modules/sfp_portscan_tcp.py b/modules/sfp_portscan_tcp.pyindex 81af9b85..d7e703bc 100644--- a/modules/sfp_portscan_tcp.py+++ b/modules/sfp_portscan_tcp.py@@ -55,6 +55,7 @@ class sfp_portscan_tcp(SpiderFootPlugin):def setup(self, sfc, userOpts=dict()):self.sf = sfcself.results = dict()+ self.__dataSource__ = "Target Network"for opt in userOpts.keys():self.opts[opt] = userOpts[opt]diff --git a/modules/sfp_similar.py b/modules/sfp_similar.pyindex 9a778a9d..b1aca83d 100644--- a/modules/sfp_similar.py+++ b/modules/sfp_similar.py@@ -78,6 +78,7 @@ class sfp_similar(SpiderFootPlugin):def setup(self, sfc, userOpts=dict()):self.sf = sfcself.results = list()+ self.__dataSource__ = "DNS"for opt in userOpts.keys():self.opts[opt] = userOpts[opt]diff --git a/modules/sfp_social.py b/modules/sfp_social.pyindex 23d11848..3a9b2f2f 100644--- a/modules/sfp_social.py+++ b/modules/sfp_social.py@@ -46,6 +46,7 @@ class sfp_social(SpiderFootPlugin):def setup(self, sfc, userOpts=dict()):self.sf = sfcself.results = dict()+ self.__dataSource__ = "Target Website"for opt in userOpts.keys():self.opts[opt] = userOpts[opt]diff --git a/modules/sfp_socialprofiles.py b/modules/sfp_socialprofiles.pyindex 15823a14..cb370a69 100644--- a/modules/sfp_socialprofiles.py+++ b/modules/sfp_socialprofiles.py@@ -99,16 +99,19 @@ class sfp_socialprofiles(SpiderFootPlugin):results = self.sf.googleIterate(searchStr, dict(limit=self.opts['pages'],useragent=self.opts['_useragent'],timeout=self.opts['_fetchtimeout']))+ self.__dataSource__ = "Google"if self.opts['method'].lower() == "yahoo":results = self.sf.yahooIterate(searchStr, dict(limit=self.opts['pages'],useragent=self.opts['_useragent'],timeout=self.opts['_fetchtimeout']))+ self.__dataSource__ = "Yahoo"if self.opts['method'].lower() == "bing":results = self.sf.bingIterate(searchStr, dict(limit=self.opts['pages'],useragent=self.opts['_useragent'],timeout=self.opts['_fetchtimeout']))+ self.__dataSource__ = "Bing"if results is None:self.sf.info("No data returned from " + self.opts['method'] + ".")diff --git a/modules/sfp_spider.py b/modules/sfp_spider.pyindex 027d9e24..95819254 100644--- a/modules/sfp_spider.py+++ b/modules/sfp_spider.py@@ -69,6 +69,7 @@ class sfp_spider(SpiderFootPlugin):self.fetchedPages = dict()self.urlEvents = dict()self.siteCookies = dict()+ self.__dataSource__ = "Target Website"for opt in userOpts.keys():self.opts[opt] = userOpts[opt]diff --git a/modules/sfp_sslcert.py b/modules/sfp_sslcert.pyindex f24a632d..213722e3 100644--- a/modules/sfp_sslcert.py+++ b/modules/sfp_sslcert.py@@ -19,7 +19,7 @@ from sflib import SpiderFoot, SpiderFootPlugin, SpiderFootEventclass sfp_sslcert(SpiderFootPlugin):- """SSL:Footprint,Investigate:Crawling and Scanning::Gather information about SSL certificates used by the target's HTTPS sites."""+ """SSL Certificates:Footprint,Investigate:Crawling and Scanning::Gather information about SSL certificates used by the target's HTTPS sites."""# Default optionsdiff --git a/modules/sfp_strangeheaders.py b/modules/sfp_strangeheaders.pyindex 8c377dbd..03b15ffa 100644--- a/modules/sfp_strangeheaders.py+++ b/modules/sfp_strangeheaders.py@@ -36,6 +36,7 @@ class sfp_strangeheaders(SpiderFootPlugin):def setup(self, sfc, userOpts=dict()):self.sf = sfcself.results = dict()+ self.__dataSource__ = "Target Website"for opt in userOpts.keys():self.opts[opt] = userOpts[opt]diff --git a/modules/sfp_tldsearch.py b/modules/sfp_tldsearch.pyindex 75881bba..31ae8701 100644--- a/modules/sfp_tldsearch.py+++ b/modules/sfp_tldsearch.py@@ -45,6 +45,7 @@ class sfp_tldsearch(SpiderFootPlugin):def setup(self, sfc, userOpts=dict()):self.sf = sfcself.results = list()+ self.__dataSource__ = "DNS"for opt in userOpts.keys():self.opts[opt] = userOpts[opt]diff --git a/modules/sfp_torexits.py b/modules/sfp_torexits.pyindex 6b310228..a735b72a 100644--- a/modules/sfp_torexits.py+++ b/modules/sfp_torexits.py@@ -54,6 +54,7 @@ class sfp_torexits(SpiderFootPlugin):def setup(self, sfc, userOpts=dict()):self.sf = sfcself.results = list()+ self.__dataSource__ = "torproject.org"# Clear / reset any other class member variables here# or you risk them persisting between threads.diff --git a/modules/sfp_torserver.py b/modules/sfp_torserver.pyindex 60a720a0..9387e7cc 100644--- a/modules/sfp_torserver.py+++ b/modules/sfp_torserver.py@@ -53,6 +53,7 @@ class sfp_torserver(SpiderFootPlugin):def setup(self, sfc, userOpts=dict()):self.sf = sfcself.results = list()+ self.__dataSource__ = "blutmagie.de"# Clear / reset any other class member variables here# or you risk them persisting between threads.diff --git a/modules/sfp_webframework.py b/modules/sfp_webframework.pyindex 7a78b8d1..aff4aa46 100644--- a/modules/sfp_webframework.py+++ b/modules/sfp_webframework.py@@ -46,6 +46,7 @@ class sfp_webframework(SpiderFootPlugin):def setup(self, sfc, userOpts=dict()):self.sf = sfcself.results = dict()+ self.__dataSource__ = "Target Website"for opt in userOpts.keys():self.opts[opt] = userOpts[opt]diff --git a/modules/sfp_websvr.py b/modules/sfp_websvr.pyindex c6d2063c..e6a1ed15 100644--- a/modules/sfp_websvr.py+++ b/modules/sfp_websvr.py@@ -26,6 +26,7 @@ class sfp_websvr(SpiderFootPlugin):def setup(self, sfc, userOpts=dict()):self.sf = sfcself.results = dict()+ self.__dataSource__ = "Target Website"for opt in userOpts.keys():self.opts[opt] = userOpts[opt]diff --git a/sflib.py b/sflib.pyindex f55379c5..994fd4f2 100644--- a/sflib.py+++ b/sflib.py@@ -1406,6 +1406,8 @@ class SpiderFootPlugin(object):__sfdb__ = None# ID of the scan the module is running against__scanId__ = None+ # (Unused) tracking of data sources+ __dataSource__ = None# Not really needed in most cases.def __init__(self):@@ -1683,6 +1685,7 @@ class SpiderFootEvent(object):data = NonesourceEvent = NonesourceEventHash = None+ moduleDataSource = None__id = Nonedef __init__(self, eventType, data, module, sourceEvent,