Skip to content

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

Handle cases of e-mail addresses breaking the regexp.

smicallef6fdfba21c1f3
diff --git a/modules/sfp_myspace.py b/modules/sfp_myspace.py
index 1098c8f7..384355f8 100644
--- a/modules/sfp_myspace.py
+++ b/modules/sfp_myspace.py
@@ -76,7 +76,11 @@ class sfp_myspace(SpiderFootPlugin):
profile = profiles[0]
# Check for email address as name, at the risk of missed results.
- matches = re.findall('<a href=\"\/([a-zA-Z0-9_]+)\".*[\&; :\"\#\*\(\"\'\;\,\>\.\?\!]+' + email + '[\&; :\"\#\*\)\"\'\;\,\<\.\?\!]+', profile, re.IGNORECASE)
+ try:
+ matches = re.findall('<a href=\"\/([a-zA-Z0-9_]+)\".*[\&; :\"\#\*\(\"\'\;\,\>\.\?\!]+' + email + '[\&; :\"\#\*\)\"\'\;\,\<\.\?\!]+', profile, re.IGNORECASE)
+ except BaseException as e:
+ self.sf.debug("Malformed e-mail address, skipping.")
+ return None
if not matches:
self.sf.debug("No concrete match for that e-mail.")