SpiderFoot automates OSINT for threat intelligence and mapping your attack surface.
Python attacksurfacecticybersecurityfootprintinghackinginformation-gatheringinformation-securityinfosecintelligence-gatheringosintosint-frameworkosint-reconnaissanceosint-toolpentestingpythonreconsecurity-toolsthreat-intelligencethreatintel
HaveIBeenPwned - Add phone number (#1164)
Krishnasis Mandal90947fc65ba5
diff --git a/modules/sfp_haveibeenpwned.py b/modules/sfp_haveibeenpwned.pyindex 02ff59b9..9b1d96da 100644--- a/modules/sfp_haveibeenpwned.py+++ b/modules/sfp_haveibeenpwned.py@@ -67,11 +67,11 @@ class sfp_haveibeenpwned(SpiderFootPlugin):# What events is this module interested in for inputdef watchedEvents(self):- return ["EMAILADDR"]+ return ["EMAILADDR", "PHONE_NUMBER"]# What events this module producesdef producedEvents(self):- return ["EMAILADDR_COMPROMISED", "LEAKSITE_CONTENT", "LEAKSITE_URL"]+ return ["EMAILADDR_COMPROMISED", "PHONE_NUMBER_COMPROMISED", "LEAKSITE_CONTENT", "LEAKSITE_URL"]def query(self, qry):ret = None@@ -191,10 +191,17 @@ class sfp_haveibeenpwned(SpiderFootPlugin):continue# Notify other modules of what you've found- e = SpiderFootEvent("EMAILADDR_COMPROMISED", eventData + " [" + site + "]",- self.__name__, event)+ if eventName == 'EMAILADDR':+ e = SpiderFootEvent("EMAILADDR_COMPROMISED", eventData + " [" + site + "]",+ self.__name__, event)+ else:+ e = SpiderFootEvent("PHONE_NUMBER_COMPROMISED", eventData + " [" + site + "]",+ self.__name__, event)self.notifyListeners(e)+ # This API endpoint doesn't support phone numbers+ if eventName == "PHONE_NUMBER":+ return NonepasteData = self.queryPaste(eventData)if pasteData is None:return Nonediff --git a/spiderfoot/db.py b/spiderfoot/db.pyindex a8488421..29fe86db 100644--- a/spiderfoot/db.py+++ b/spiderfoot/db.py@@ -186,6 +186,7 @@ class SpiderFootDb:['LEAKSITE_CONTENT', 'Leak Site Content', 1, 'DATA'],['PASSWORD_COMPROMISED', 'Compromised Password', 0, 'DATA'],['PHONE_NUMBER', 'Phone Number', 0, 'ENTITY'],+ ['PHONE_NUMBER_COMPROMISED', 'Phone Number Compromised', 0, 'DESCRIPTOR'],['PHONE_NUMBER_TYPE', 'Phone Number Type', 0, 'DESCRIPTOR'],['PHYSICAL_ADDRESS', 'Physical Address', 0, 'ENTITY'],['PHYSICAL_COORDINATES', 'Physical Coordinates', 0, 'ENTITY'],