Skip to content

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

Updates

Leo Trubach5e8970ded458
diff --git a/modules/sfp_zonecruncher.py b/modules/sfp_zetalytics.py
similarity index 94%
rename from modules/sfp_zonecruncher.py
rename to modules/sfp_zetalytics.py
index a4ca3a37..c41ebcda 100644
--- a/modules/sfp_zonecruncher.py
+++ b/modules/sfp_zetalytics.py
@@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-
# -------------------------------------------------------------------------------
-# Name: sfp_zonecruncher
-# Purpose: Query ZoneCruncher database for hostname & subdomain information
+# Name: sfp_zetalytics
+# Purpose: Query Zetalytics database for hostname & subdomain information
#
# Author: Leo Trubach <[email protected]>
#
@@ -16,7 +16,7 @@ from urllib.parse import urlencode
from spiderfoot import SpiderFootEvent, SpiderFootPlugin
-class sfp_zonecruncher(SpiderFootPlugin):
+class sfp_zetalytics(SpiderFootPlugin):
BASE_URL = "https://zonecruncher.com/api/v1"
meta = {
"name": "ZoneCruncher",
@@ -43,7 +43,7 @@ class sfp_zonecruncher(SpiderFootPlugin):
}
optdescs = {
- "api_key": "ZoneCruncher API Key.",
+ "api_key": "Zetalytics API Key.",
}
results = None
@@ -160,10 +160,10 @@ class sfp_zonecruncher(SpiderFootPlugin):
self.errorState = True
return None
- if (eventName, eventData) in self.results:
+ if "{}:{}".format(eventName, eventData) in self.results:
self.sf.debug(f"Skipping {eventName}:{eventData}, already checked.")
return None
- self.results[eventName, eventData] = True
+ self.results["{}:{}".format(eventName, eventData)] = True
if eventName == "INTERNET_NAME":
data = self.query_subdomains(eventData)
diff --git a/test/unit/modules/test_sfp_zonecruncher.py b/test/unit/modules/test_sfp_zetalytics.py
similarity index 90%
rename from test/unit/modules/test_sfp_zonecruncher.py
rename to test/unit/modules/test_sfp_zetalytics.py
index 80d9f40b..d62e1b2d 100644
--- a/test/unit/modules/test_sfp_zonecruncher.py
+++ b/test/unit/modules/test_sfp_zetalytics.py
@@ -1,12 +1,12 @@
-# test_sfp_zonecruncher.py
+# test_sfp_zetalytics.py
import unittest
-from modules.sfp_zonecruncher import sfp_zonecruncher
+from modules.sfp_zetalytics import sfp_zetalytics
from sflib import SpiderFoot
from spiderfoot import SpiderFootEvent, SpiderFootTarget
-class TestModuleBitcoinAbuse(unittest.TestCase):
+class TestModuleZetalytics(unittest.TestCase):
"""
Test modules.sfp_bitcoinabuse
"""
@@ -40,7 +40,7 @@ class TestModuleBitcoinAbuse(unittest.TestCase):
}
def test_opts(self):
- module = sfp_zonecruncher()
+ module = sfp_zetalytics()
self.assertEqual(len(module.opts), len(module.optdescs))
def test_setup(self):
@@ -49,15 +49,15 @@ class TestModuleBitcoinAbuse(unittest.TestCase):
"""
sf = SpiderFoot(self.default_options)
- module = sfp_zonecruncher()
+ module = sfp_zetalytics()
module.setup(sf, dict())
def test_watchedEvents_should_return_list(self):
- module = sfp_zonecruncher()
+ module = sfp_zetalytics()
self.assertIsInstance(module.watchedEvents(), list)
def test_producedEvents_should_return_list(self):
- module = sfp_zonecruncher()
+ module = sfp_zetalytics()
self.assertIsInstance(module.producedEvents(), list)
def test_handleEvent(self):
@@ -66,7 +66,7 @@ class TestModuleBitcoinAbuse(unittest.TestCase):
"""
sf = SpiderFoot(self.default_options)
- module = sfp_zonecruncher()
+ module = sfp_zetalytics()
module.setup(sf, dict())
target_value = 'example target value'