Skip to content

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

Option to not report the username part of e-mail addresses.

smicalleff28b0b627d8f
diff --git a/modules/sfp_accounts.py b/modules/sfp_accounts.py
index 4934f321..25f88a58 100644
--- a/modules/sfp_accounts.py
+++ b/modules/sfp_accounts.py
@@ -28,6 +28,7 @@ class sfp_accounts(SpiderFootPlugin):
"ignorenamedict": True,
"ignoreworddict": True,
"musthavename": True,
+ "userfromemail": True,
"_maxthreads": 25
}
@@ -36,10 +37,11 @@ class sfp_accounts(SpiderFootPlugin):
"generic": "Generic internal accounts to not bother looking up externally.",
"ignorenamedict": "Don't bother looking up names that are just stand-alone first names (too many false positives).",
"ignoreworddict": "Don't bother looking up names that appear in the dictionary.",
- "musthavename": "The username must be mentioned on the social media page to consider it valid (helps avoid false positives)."
+ "musthavename": "The username must be mentioned on the social media page to consider it valid (helps avoid false positives).",
+ "userfromemail": "Extract usernames from e-mail addresses at all? If disabled this can reduce false positives for common usernames but for highly unique usernames it would result in missed accounts."
}
- results = dict()
+ results = None
reportedUsers = list()
siteResults = dict()
sites = list()
@@ -49,7 +51,7 @@ class sfp_accounts(SpiderFootPlugin):
def setup(self, sfc, userOpts=dict()):
self.sf = sfc
- self.results = dict()
+ self.results = self.tempStorage()
self.commonNames = list()
self.reportedUsers = list()
self.errorState = False
@@ -213,7 +215,6 @@ class sfp_accounts(SpiderFootPlugin):
# Skip events coming from me unless they are USERNAME events
if eventName != "USERNAME" and srcModuleName == "sfp_accounts":
- self.sf.debug("Ignoring " + eventName + ", from self.")
return None
if eventData not in self.results.keys():
@@ -271,6 +272,9 @@ class sfp_accounts(SpiderFootPlugin):
self.sf.debug(name + " is found in our word dictionary, skipping.")
adduser = False
+ if eventName == "EMAILADDR" and not self.opts['userfromemail']:
+ adduser = False
+
if adduser:
users.append(name)