Skip to content

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

Less error-prone pastebin check.

smicallef3a30134396c8
diff --git a/modules/sfp_pastebin.py b/modules/sfp_pastebin.py
index 12fd7c61..62454633 100644
--- a/modules/sfp_pastebin.py
+++ b/modules/sfp_pastebin.py
@@ -112,8 +112,13 @@ class sfp_pastebin(SpiderFootPlugin):
"[^a-zA-Z\-\_]", res['content'], re.IGNORECASE) == None:
continue
- startIndex = res['content'].index(self.baseDomain)-120
- endIndex = startIndex+len(self.baseDomain)+240
+ try:
+ startIndex = res['content'].index(self.baseDomain)-120
+ endIndex = startIndex+len(self.baseDomain)+240
+ except BaseException as e:
+ sf.debug("String not found in pastebin content.")
+ continue
+
data = res['content'][startIndex:endIndex]
evt = SpiderFootEvent("PASTEBIN_CONTENT",