Skip to content

SpiderFoot automates OSINT for threat intelligence and mapping your attack surface.

HaveIBeenPwned - Add phone number (#1164)

Krishnasis Mandal90947fc65ba5
diff --git a/modules/sfp_haveibeenpwned.py b/modules/sfp_haveibeenpwned.py
index 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 input
def watchedEvents(self):
- return ["EMAILADDR"]
+ return ["EMAILADDR", "PHONE_NUMBER"]
# What events this module produces
def 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 None
pasteData = self.queryPaste(eventData)
if pasteData is None:
return None
diff --git a/spiderfoot/db.py b/spiderfoot/db.py
index 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'],