SpiderFoot automates OSINT for threat intelligence and mapping your attack surface.
Python attacksurfacecticybersecurityfootprintinghackinginformation-gatheringinformation-securityinfosecintelligence-gatheringosintosint-frameworkosint-reconnaissanceosint-toolpentestingpythonreconsecurity-toolsthreat-intelligencethreatintel
Filter junk e-mails.
Steve Micallef1909fbb47583
diff --git a/modules/sfp_builtwith.py b/modules/sfp_builtwith.pyindex 46811beb..f6499d50 100644--- a/modules/sfp_builtwith.py+++ b/modules/sfp_builtwith.py@@ -12,6 +12,7 @@import sysimport jsonimport time+import refrom sflib import SpiderFoot, SpiderFootPlugin, SpiderFootEventclass sfp_builtwith(SpiderFootPlugin):@@ -33,7 +34,7 @@ class sfp_builtwith(SpiderFootPlugin):# Be sure to completely clear any class variables in setup()# or you run the risk of data persisting between scan runs.- results = dict()+ results = NoneerrorState = Falsedef setup(self, sfc, userOpts=dict()):@@ -106,21 +107,25 @@ class sfp_builtwith(SpiderFootPlugin):return Noneif "Meta" in data:+ # Verify any email addresses as we sometimes get junk from BuiltWith+ pat = re.compile("([\%a-zA-Z\.0-9_\-\+]+@[a-zA-Z\.0-9\-]+\.[a-zA-Z\.0-9\-]+)")if data['Meta'].get("Names", []):for nb in data['Meta']['Names']:e = SpiderFootEvent("RAW_RIR_DATA", "Possible full name: " + nb['Name'],self.__name__, event)self.notifyListeners(e)if nb.get('Email', None):- e = SpiderFootEvent("EMAILADDR", nb['Email'],- self.__name__, event)- self.notifyListeners(e)+ if (re.match(pat, nb['Email'])):+ e = SpiderFootEvent("EMAILADDR", nb['Email'],+ self.__name__, event)+ self.notifyListeners(e)if data['Meta'].get("Emails", []):for email in data['Meta']['Emails']:- e = SpiderFootEvent("EMAILADDR", email,- self.__name__, event)- self.notifyListeners(e)+ if (re.match(pat, email)):+ e = SpiderFootEvent("EMAILADDR", email,+ self.__name__, event)+ self.notifyListeners(e)if data['Meta'].get("Telephones", []):for phone in data['Meta']['Telephones']:diff --git a/modules/sfp_emailformat.py b/modules/sfp_emailformat.pyindex d4b8efab..99d82deb 100644--- a/modules/sfp_emailformat.py+++ b/modules/sfp_emailformat.py@@ -19,7 +19,7 @@ class sfp_emailformat(SpiderFootPlugin):"""EmailFormat:Footprint,Investigate,Passive:Search Engines::Look up e-mail addresses on email-format.com."""- results = dict()+ results = None# Default optionsopts = {@@ -78,6 +78,10 @@ class sfp_emailformat(SpiderFootPlugin):self.sf.debug("Likely invalid address.")continue+ if "..." in match:+ self.sf.debug("Incomplete e-mail address, skipping.")+ continue+# Handle messed up encodingsif "%" in match:self.sf.debug("Skipped address: " + match)