SpiderFoot automates OSINT for threat intelligence and mapping your attack surface.
Python attacksurfacecticybersecurityfootprintinghackinginformation-gatheringinformation-securityinfosecintelligence-gatheringosintosint-frameworkosint-reconnaissanceosint-toolpentestingpythonreconsecurity-toolsthreat-intelligencethreatintel
Catch string split errors
Brendan Coles24870257de97
diff --git a/modules/sfp_github.py b/modules/sfp_github.pyindex d098507e..596761e6 100644--- a/modules/sfp_github.py+++ b/modules/sfp_github.py@@ -81,8 +81,13 @@ class sfp_github(SpiderFootPlugin):# Extract name and location from profileif eventName == "SOCIAL_MEDIA":- network = eventData.split(": ")[0]- name = eventData.split(": ")[1]+ try:+ network = eventData.split(": ")[0]+ name = eventData.split(": ")[1]+ except BaseException as e:+ self.sf.error("Unable to parse SOCIAL_MEDIA: " ++ eventData + " (" + str(e) + ")", False)+ return Noneif not network == "Github":self.sf.debug("Skipping social network profile, " + name + ", as not a Github profile")diff --git a/modules/sfp_myspace.py b/modules/sfp_myspace.pyindex 58441f70..1098c8f7 100644--- a/modules/sfp_myspace.py+++ b/modules/sfp_myspace.py@@ -89,8 +89,13 @@ class sfp_myspace(SpiderFootPlugin):# Retrieve location from MySpace profileif eventName == "SOCIAL_MEDIA":- network = eventData.split(": ")[0]- name = eventData.split(": ")[1]+ try:+ network = eventData.split(": ")[0]+ name = eventData.split(": ")[1]+ except BaseException as e:+ self.sf.error("Unable to parse SOCIAL_MEDIA: " ++ eventData + " (" + str(e) + ")", False)+ return Noneif network != "MySpace":self.sf.debug("Skipping social network profile, " + name + ", as not a MySpace profile")diff --git a/modules/sfp_slideshare.py b/modules/sfp_slideshare.pyindex 6956d12a..162493c3 100644--- a/modules/sfp_slideshare.py+++ b/modules/sfp_slideshare.py@@ -57,8 +57,13 @@ class sfp_slideshare(SpiderFootPlugin):self.sf.debug("Received event, " + eventName + ", from " + srcModuleName)# Retrieve profile- network = eventData.split(": ")[0]- name = eventData.split(": ")[1]+ try:+ network = eventData.split(": ")[0]+ name = eventData.split(": ")[1]+ except BaseException as e:+ self.sf.error("Unable to parse SOCIAL_MEDIA: " ++ eventData + " (" + str(e) + ")", False)+ return Noneif not network == "SlideShare":self.sf.debug("Skipping social network profile, " + name + ", as not a SlideShare profile")diff --git a/modules/sfp_spyonweb.py b/modules/sfp_spyonweb.pyindex 57852a4e..95cc9030 100644--- a/modules/sfp_spyonweb.py+++ b/modules/sfp_spyonweb.py@@ -228,8 +228,13 @@ class sfp_spyonweb(SpiderFootPlugin):# Find affiliate domains for the specified Google AdSense ID or Google Analytics IDif eventName in [ 'WEB_ANALYTICS_ID' ]:- network = eventData.split(": ")[0]- analytics_id = eventData.split(": ")[1]+ try:+ network = eventData.split(": ")[0]+ analytics_id = eventData.split(": ")[1]+ except BaseException as e:+ self.sf.error("Unable to parse WEB_ANALYTICS_ID: " ++ eventData + " (" + str(e) + ")", False)+ return Nonedata = dict()if network == 'Google AdSense':diff --git a/modules/sfp_twitter.py b/modules/sfp_twitter.pyindex 75788547..cea5f174 100644--- a/modules/sfp_twitter.py+++ b/modules/sfp_twitter.py@@ -53,8 +53,13 @@ class sfp_twitter(SpiderFootPlugin):self.sf.debug("Received event, " + eventName + ", from " + srcModuleName)# Retrieve profile- network = eventData.split(": ")[0]- name = eventData.split(": ")[1]+ try:+ network = eventData.split(": ")[0]+ name = eventData.split(": ")[1]+ except BaseException as e:+ self.sf.error("Unable to parse SOCIAL_MEDIA: " ++ eventData + " (" + str(e) + ")", False)+ return Noneif not network == "Twitter":self.sf.debug("Skipping social network profile, " + name + ", as not a Twitter profile")