Skip to content

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

Remove SEARCH_ENGINE_WEB_CONTENT events since they are redundant.

smicallef47ac54d22e5f
diff --git a/modules/sfp_ahmia.py b/modules/sfp_ahmia.py
index 261e7931..d4be7955 100644
--- a/modules/sfp_ahmia.py
+++ b/modules/sfp_ahmia.py
@@ -76,7 +76,7 @@ class sfp_ahmia(SpiderFootPlugin):
# What events this module produces
def producedEvents(self):
- return ["DARKNET_MENTION_URL", "DARKNET_MENTION_CONTENT", "SEARCH_ENGINE_WEB_CONTENT"]
+ return ["DARKNET_MENTION_URL", "DARKNET_MENTION_CONTENT"]
def handleEvent(self, event):
eventName = event.eventType
@@ -123,7 +123,6 @@ class sfp_ahmia(SpiderFootPlugin):
self.info(f"No results for {eventData} returned from Ahmia.fi.")
return
- reported = False
for link in links:
if self.checkForStop():
return
@@ -141,7 +140,6 @@ class sfp_ahmia(SpiderFootPlugin):
if not self.opts['fetchlinks']:
evt = SpiderFootEvent("DARKNET_MENTION_URL", link, self.__name__, event)
self.notifyListeners(evt)
- reported = True
continue
res = self.sf.fetchUrl(
@@ -161,7 +159,6 @@ class sfp_ahmia(SpiderFootPlugin):
evt = SpiderFootEvent("DARKNET_MENTION_URL", link, self.__name__, event)
self.notifyListeners(evt)
- reported = True
try:
startIndex = res['content'].index(eventData) - 120
@@ -174,14 +171,4 @@ class sfp_ahmia(SpiderFootPlugin):
evt = SpiderFootEvent("DARKNET_MENTION_CONTENT", f"...{wdata}...", self.__name__, evt)
self.notifyListeners(evt)
- if reported:
- # Submit the search results for analysis
- evt = SpiderFootEvent(
- "SEARCH_ENGINE_WEB_CONTENT",
- content,
- self.__name__,
- event
- )
- self.notifyListeners(evt)
-
# End of sfp_ahmia class
diff --git a/modules/sfp_duckduckgo.py b/modules/sfp_duckduckgo.py
index d7730c34..8d4bb60b 100644
--- a/modules/sfp_duckduckgo.py
+++ b/modules/sfp_duckduckgo.py
@@ -103,11 +103,6 @@ class sfp_duckduckgo(SpiderFootPlugin):
self.debug(f"No DuckDuckGo information for {eventData}")
return
- # Submit the DuckDuckGo results for analysis
- evt = SpiderFootEvent("SEARCH_ENGINE_WEB_CONTENT", res['content'],
- self.__name__, event)
- self.notifyListeners(evt)
-
abstract_text = ret.get('AbstractText')
if abstract_text:
event_type = "DESCRIPTION_ABSTRACT"
diff --git a/modules/sfp_email.py b/modules/sfp_email.py
index 5321b636..b0376b47 100644
--- a/modules/sfp_email.py
+++ b/modules/sfp_email.py
@@ -40,7 +40,7 @@ class sfp_email(SpiderFootPlugin):
return ["TARGET_WEB_CONTENT", "BASE64_DATA", "AFFILIATE_DOMAIN_WHOIS",
"CO_HOSTED_SITE_DOMAIN_WHOIS", "DOMAIN_WHOIS", "NETBLOCK_WHOIS",
"LEAKSITE_CONTENT", "RAW_DNS_RECORDS", "RAW_FILE_META_DATA",
- 'RAW_RIR_DATA', "SEARCH_ENGINE_WEB_CONTENT", "SIMILARDOMAIN_WHOIS",
+ 'RAW_RIR_DATA', "SIMILARDOMAIN_WHOIS",
"SSL_CERTIFICATE_RAW", "SSL_CERTIFICATE_ISSUED", "TCP_PORT_OPEN_BANNER",
"WEBSERVER_BANNER", "WEBSERVER_HTTPHEADERS"]
diff --git a/modules/sfp_onionsearchengine.py b/modules/sfp_onionsearchengine.py
index 4708cd7d..cea2a1a5 100644
--- a/modules/sfp_onionsearchengine.py
+++ b/modules/sfp_onionsearchengine.py
@@ -76,7 +76,7 @@ class sfp_onionsearchengine(SpiderFootPlugin):
# This is to support the end user in selecting modules based on events
# produced.
def producedEvents(self):
- return ["DARKNET_MENTION_URL", "DARKNET_MENTION_CONTENT", "SEARCH_ENGINE_WEB_CONTENT"]
+ return ["DARKNET_MENTION_URL", "DARKNET_MENTION_CONTENT"]
def handleEvent(self, event):
eventName = event.eventType
@@ -124,11 +124,6 @@ class sfp_onionsearchengine(SpiderFootPlugin):
if "forward >" not in data['content']:
keepGoing = False
- # Submit the google results for analysis
- evt = SpiderFootEvent("SEARCH_ENGINE_WEB_CONTENT", data['content'],
- self.__name__, event)
- self.notifyListeners(evt)
-
links = re.findall(r"url\.php\?u=(.[^\"\']+)[\"\']",
data['content'], re.IGNORECASE | re.DOTALL)
diff --git a/modules/sfp_torch.py b/modules/sfp_torch.py
index 038ccbfc..53102d8a 100644
--- a/modules/sfp_torch.py
+++ b/modules/sfp_torch.py
@@ -68,8 +68,7 @@ class sfp_torch(SpiderFootPlugin):
def producedEvents(self):
return [
"DARKNET_MENTION_URL",
- "DARKNET_MENTION_CONTENT",
- "SEARCH_ENGINE_WEB_CONTENT"
+ "DARKNET_MENTION_CONTENT"
]
def handleEvent(self, event):
@@ -165,12 +164,7 @@ class sfp_torch(SpiderFootPlugin):
self.notifyListeners(evt)
linkcount += 1
- if linkcount > 0:
- # Submit the search results for analysis elsewhere
- evt = SpiderFootEvent("SEARCH_ENGINE_WEB_CONTENT", data['content'],
- self.__name__, event)
- self.notifyListeners(evt)
- else:
+ if linkcount == 0:
# No more pages
return
diff --git a/modules/sfp_wikileaks.py b/modules/sfp_wikileaks.py
index bb6ce65e..8004b0f8 100644
--- a/modules/sfp_wikileaks.py
+++ b/modules/sfp_wikileaks.py
@@ -67,7 +67,7 @@ class sfp_wikileaks(SpiderFootPlugin):
# This is to support the end user in selecting modules based on events
# produced.
def producedEvents(self):
- return ["LEAKSITE_CONTENT", "LEAKSITE_URL", "SEARCH_ENGINE_WEB_CONTENT"]
+ return ["LEAKSITE_CONTENT", "LEAKSITE_URL"]
# Handle events sent to this module
def handleEvent(self, event):
@@ -122,7 +122,6 @@ class sfp_wikileaks(SpiderFootPlugin):
if "page=" not in res['content']:
keepGoing = False
- valid = False
for link in links:
# We can safely skip search.wikileaks.org and others.
if "search.wikileaks.org/" in link:
@@ -141,12 +140,6 @@ class sfp_wikileaks(SpiderFootPlugin):
if not link.endswith(".js") and not link.endswith(".css"):
evt = SpiderFootEvent("LEAKSITE_URL", link, self.__name__, event)
self.notifyListeners(evt)
- valid = True
-
- if valid:
- evt = SpiderFootEvent("SEARCH_ENGINE_WEB_CONTENT", res['content'],
- self.__name__, event)
- self.notifyListeners(evt)
# Fail-safe to prevent infinite looping
if page > 50: