SpiderFoot automates OSINT for threat intelligence and mapping your attack surface.
Python attacksurfacecticybersecurityfootprintinghackinginformation-gatheringinformation-securityinfosecintelligence-gatheringosintosint-frameworkosint-reconnaissanceosint-toolpentestingpythonreconsecurity-toolsthreat-intelligencethreatintel
Add Google AdSense to sfp_webanalytics
Brendan Coles1fa85359c4cb
diff --git a/modules/sfp_webanalytics.py b/modules/sfp_webanalytics.pyindex 8108fe41..937db990 100644--- a/modules/sfp_webanalytics.py+++ b/modules/sfp_webanalytics.py@@ -47,17 +47,35 @@ class sfp_webanalytics(SpiderFootPlugin):if sourceData in self.results:return None- else:- self.results[sourceData] = True++ self.results[sourceData] = Trueself.sf.debug("Received event, " + eventName + ", from " + srcModuleName)- matches = re.findall("ua\-\d{4,10}\-\d{1,4}", eventData, re.IGNORECASE)+ # Google Analytics+ matches = re.findall(r"\bua\-\d{4,10}\-\d{1,4}\b", eventData, re.IGNORECASE)for m in matches:+ if m.lower().startswith('ua-000000-'):+ continue+ if m.lower().startswith('ua-123456-'):+ continue+ if m.lower().startswith('ua-123456789'):+ continue+self.sf.debug("Google Analytics match: " + m)evt = SpiderFootEvent("WEB_ANALYTICS_ID", "Google Analytics: " + m, self.__name__, event)self.notifyListeners(evt)+ # Google AdSense+ matches = re.findall(r"\b(pub-\d{10,20})\b", eventData, re.IGNORECASE)+ for m in matches:+ if m.lower().startswith('pub-123456789'):+ continue++ self.sf.debug("Google AdSense match: " + m)+ evt = SpiderFootEvent("WEB_ANALYTICS_ID", "Google AdSense: " + m, self.__name__, event)+ self.notifyListeners(evt)+return None# End of sfp_webanalytics class