SpiderFoot automates OSINT for threat intelligence and mapping your attack surface.
Python attacksurfacecticybersecurityfootprintinghackinginformation-gatheringinformation-securityinfosecintelligence-gatheringosintosint-frameworkosint-reconnaissanceosint-toolpentestingpythonreconsecurity-toolsthreat-intelligencethreatintel
Bug fixes and clean-ups.
Steve46c45ea64d56
diff --git a/modules/sfp_errors.py b/modules/sfp_errors.pyindex 52758a4e..c5e32272 100644--- a/modules/sfp_errors.py+++ b/modules/sfp_errors.py@@ -10,7 +10,10 @@# Licence: GPL# --------------------------------------------------------------------------------import re+try:+ import re2 as re+except ImportError:+ import refrom sflib import SpiderFoot, SpiderFootPlugin, SpiderFootEvent# Taken from Google Dorks on exploit-db.com@@ -30,6 +33,8 @@ class sfp_errors(SpiderFootPlugin):"""Errors:Footprint:Content Analysis::Identify common error messages in content like SQL errors, etc."""++# Default optionsopts = {}@@ -46,6 +51,7 @@ class sfp_errors(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]@@ -71,9 +77,7 @@ class sfp_errors(SpiderFootPlugin):if srcModuleName != "sfp_spider":return None- # If you are processing TARGET_WEB_CONTENT, this is how you would get the- # source of that raw data (e.g. a URL.)- eventSource = event.sourceEvent.data+ eventSource = event.actualSourceself.sf.debug("Received event, " + eventName + ", from " + srcModuleName)@@ -96,7 +100,7 @@ class sfp_errors(SpiderFootPlugin):self.sf.info("Matched " + regexpGrp + " in content from " + eventSource)self.results[eventSource].append(regexpGrp)evt = SpiderFootEvent("ERROR_MESSAGE", regexpGrp,- self.__name__, event.sourceEvent)+ self.__name__, event)self.notifyListeners(evt)return Nonediff --git a/modules/sfp_names.py b/modules/sfp_names.pyindex 4ced705d..b1fad056 100644--- a/modules/sfp_names.py+++ b/modules/sfp_names.py@@ -18,6 +18,7 @@ class sfp_names(SpiderFootPlugin):"""Name Extractor:Footprint,Passive:Real World:errorprone:Attempt to identify human names in fetched content."""+# Default optionsopts = {'algotune': 50,@@ -78,6 +79,10 @@ class sfp_names(SpiderFootPlugin):name = unicode(name, 'utf-8', errors='replace')# 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)return None@@ -135,4 +140,5 @@ class sfp_names(SpiderFootPlugin):evt.moduleDataSource = "Unknown"self.notifyListeners(evt)+# End of sfp_names classdiff --git a/modules/sfp_phone.py b/modules/sfp_phone.pyindex 40571df7..72f68f37 100644--- a/modules/sfp_phone.py+++ b/modules/sfp_phone.py@@ -22,6 +22,7 @@ class sfp_phone(SpiderFootPlugin):"""Phone Numbers:Footprint,Investigate:Real World::Identify phone numbers in scraped webpages."""+# Default optionsopts = {}diff --git a/modules/sfp_psbdmp.py b/modules/sfp_psbdmp.pyindex 619316e3..861398ea 100644--- a/modules/sfp_psbdmp.py+++ b/modules/sfp_psbdmp.py@@ -1,6 +1,6 @@#-------------------------------------------------------------------------------# Name: sfp_psbdmp-# Purpose: Query psbdmp.com for potentially hacked e-mail addresses.+# Purpose: Query psbdmp.cc for potentially hacked e-mail addresses.## Author: Steve Micallef <[email protected]>#@@ -15,7 +15,7 @@ import timefrom sflib import SpiderFoot, SpiderFootPlugin, SpiderFootEventclass sfp_psbdmp(SpiderFootPlugin):- """Psbdmp.com:Footprint,Investigate,Passive:Leaks, Dumps and Breaches::Check psbdmp.com (PasteBin Dump) for potentially hacked e-mails and domains."""+ """Psbdmp.com:Footprint,Investigate,Passive:Leaks, Dumps and Breaches::Check psbdmp.cc (PasteBin Dump) for potentially hacked e-mails and domains."""# Default options@@ -57,28 +57,28 @@ class sfp_psbdmp(SpiderFootPlugin):ret = Noneif "@" in qry:- url = "http://psbdmp.com/api/search/email/" + qry+ url = "http://psbdmp.cc/api/search/email/" + qryelse:- url = "http://psbdmp.com/api/search/domain/" + qry+ url = "http://psbdmp.cc/api/search/domain/" + qryres = self.sf.fetchUrl(url, timeout=self.opts['_fetchtimeout'],useragent="SpiderFoot")if res['code'] == "403":- self.sf.info("Unable to fetch data from psbdmp.com right now.")+ self.sf.info("Unable to fetch data from psbdmp.cc right now.")return Nonetry:ret = json.loads(res['content'])except Exception as e:- self.sf.error("Error processing JSON response from psbdmp.com: " + str(e), False)+ self.sf.error("Error processing JSON response from psbdmp.cc: " + str(e), False)return Noneids = list()if 'count' in ret:if ret['count'] > 0:for d in ret['data']:- ids.append("http://psbdmp.com/" + d['id'])+ ids.append("http://psbdmp.cc/" + d['id'])else:return Noneelse:diff --git a/modules/sfp_ripe.py b/modules/sfp_ripe.pyindex 1e4db724..d5986e1e 100644--- a/modules/sfp_ripe.py+++ b/modules/sfp_ripe.py@@ -17,7 +17,7 @@ from sflib import SpiderFoot, SpiderFootPlugin, SpiderFootEventclass sfp_ripe(SpiderFootPlugin):- """RIPE Internet Registry:Footprint,Investigate,Passive:Public Registries::Queries the RIPE registry (includes ARIN data) to identify netblocks and other info."""+ """RIPE:Footprint,Investigate,Passive:Public Registries::Queries the RIPE registry (includes ARIN data) to identify netblocks and other info."""# Default optionsdiff --git a/modules/sfp_robtex.py b/modules/sfp_robtex.pyindex 71503118..17c909ff 100644--- a/modules/sfp_robtex.py+++ b/modules/sfp_robtex.py@@ -18,7 +18,7 @@ from sflib import SpiderFoot, SpiderFootPlugin, SpiderFootEventclass sfp_robtex(SpiderFootPlugin):- """Robtex:Footprint,Investigate,Passive:DNS:errorprone:Search Robtex.com for hosts sharing the same IP."""+ """Robtex:Footprint,Investigate,Passive:Passive DNS:errorprone:Search Robtex.com for hosts sharing the same IP."""# Default options