SpiderFoot automates OSINT for threat intelligence and mapping your attack surface.
Python attacksurfacecticybersecurityfootprintinghackinginformation-gatheringinformation-securityinfosecintelligence-gatheringosintosint-frameworkosint-reconnaissanceosint-toolpentestingpythonreconsecurity-toolsthreat-intelligencethreatintel
Distinguish between affiliate and connected e-mail addresses.
smicallef1ffdeaa96f0c
diff --git a/modules/sfp_numinfo.py b/modules/sfp_numinfo.pyindex f6331445..a84e58ed 100644--- a/modules/sfp_numinfo.py+++ b/modules/sfp_numinfo.py@@ -27,13 +27,11 @@ class sfp_numinfo(SpiderFootPlugin):}results = dict()- errorState = Falsedef setup(self, sfc, userOpts=dict()):self.sf = sfcself.__dataSource__ = 'numinfo'self.results = dict()- self.errorState = Falsefor opt in userOpts.keys():self.opts[opt] = userOpts[opt]@@ -44,7 +42,7 @@ class sfp_numinfo(SpiderFootPlugin):# What events this module producesdef producedEvents(self):- return ['RAW_RIR_DATA', 'EMAILADDR']+ return ['RAW_RIR_DATA', 'EMAILADDR', 'AFFILIATE_EMAILADDR']# Query numinfo for the specified phone numberdef query(self, qry):@@ -87,9 +85,6 @@ class sfp_numinfo(SpiderFootPlugin):srcModuleName = event.moduleeventData = event.data- if self.errorState:- return None-if eventData in self.results:return None@@ -109,7 +104,13 @@ class sfp_numinfo(SpiderFootPlugin):if data.get('email'):email_match = re.findall(r'^mailto:([a-zA-Z\.0-9_\-]+@[a-zA-Z\.0-9\-]+\.[a-zA-Z\.0-9\-]+)$', data.get('email'))if email_match is not None:- evt = SpiderFootEvent('EMAILADDR', email_match[0], self.__name__, event)+ mailDom = email_match[0].lower().split('@')[1]+ if not self.getTarget().matches(mailDom):+ evttype = "AFFILIATE_EMAILADDR"+ else:+ evttype = "EMAILADDR"++ evt = SpiderFootEvent(evttype, email_match[0], self.__name__, event)self.notifyListeners(evt)# End of sfp_numinfo classdiff --git a/sflib.py b/sflib.pyindex 7bcf8932..c277cb67 100644--- a/sflib.py+++ b/sflib.py@@ -1639,8 +1639,8 @@ class SpiderFootTarget(object):if value is None or value == "":return False- # We can't really say anything about names, so everything matches- if self.targetType == "HUMAN_NAME":+ # We can't really say anything about names or phone numbers, so everything matches+ if self.targetType == "HUMAN_NAME" or self.targetType == "PHONE_NUMBER":return Trueif netaddr.valid_ipv4(value):