SpiderFoot automates OSINT for threat intelligence and mapping your attack surface.
Python attacksurfacecticybersecurityfootprintinghackinginformation-gatheringinformation-securityinfosecintelligence-gatheringosintosint-frameworkosint-reconnaissanceosint-toolpentestingpythonreconsecurity-toolsthreat-intelligencethreatintel
sfp_pastebin / sfp_psbdmp : check for false positives
Brendan Coles74505ce4a0dd
diff --git a/modules/sfp_pastebin.py b/modules/sfp_pastebin.pyindex 5533ef55..25bcd2da 100644--- a/modules/sfp_pastebin.py+++ b/modules/sfp_pastebin.py@@ -144,16 +144,16 @@ class sfp_pastebin(SpiderFootPlugin):continue# Sometimes pastes search results false positives- if re.search(r"[^a-zA-Z\-\_0-9]" + re.escape(eventData)- + r"[^a-zA-Z\-\_0-9]", res['content'], re.IGNORECASE) is None:+ if eventData.lower() not in str(res['content']).lower():+ self.sf.debug("String not found in pastes content.")continue- # TODO: review why this is now unused- # try:- # startIndex = res['content'].index(eventData)- # except BaseException:- # self.sf.debug("String not found in pastes content.")- # continue+ if re.search(+ r"[^a-zA-Z\-\_0-9]" + re.escape(eventData) + r"[^a-zA-Z\-\_0-9]",+ res['content'],+ re.IGNORECASE+ ) is None:+ continueevt1 = SpiderFootEvent("LEAKSITE_URL", link, self.__name__, event)self.notifyListeners(evt1)diff --git a/modules/sfp_psbdmp.py b/modules/sfp_psbdmp.pyindex cf5a7752..53cea2b1 100644--- a/modules/sfp_psbdmp.py+++ b/modules/sfp_psbdmp.py@@ -123,6 +123,10 @@ class sfp_psbdmp(SpiderFootPlugin):continue# Sometimes pastes search results false positives+ if eventData.lower() not in str(res['content']).lower():+ self.sf.debug(f"{eventData} not found in pastes content.")+ continue+if re.search(r"[^a-zA-Z\-\_0-9]" + re.escape(eventData) + r"[^a-zA-Z\-\_0-9]",res['content'],@@ -130,13 +134,6 @@ class sfp_psbdmp(SpiderFootPlugin):) is None:continue- # TODO: review why this is now unused- # try:- # startIndex = res['content'].index(eventData)- # except BaseException:- # self.sf.debug(f"{eventData} not found in pastes content.")- # continue-evt = SpiderFootEvent("LEAKSITE_CONTENT", res['content'], self.__name__, e)self.notifyListeners(evt)