diff --git a/bbot/modules/leakix.py b/bbot/modules/leakix.py index 22be7513d..0d697c4ff 100644 --- a/bbot/modules/leakix.py +++ b/bbot/modules/leakix.py @@ -15,20 +15,12 @@ class leakix(subdomain_enum_apikey): } base_url = "https://leakix.net" - ping_url = f"{base_url}/host/1.2.3.4.5" - - async def setup(self): - ret = await super(subdomain_enum_apikey, self).setup() - self.headers = {"Accept": "application/json"} - self.api_key = self.config.get("api_key", "") - if self.api_key: - self.headers["api-key"] = self.api_key - return await self.require_api_key() - return ret + ping_url = f"{base_url}/host/1.1.1.1" def prepare_api_request(self, url, kwargs): if self.api_key: kwargs["headers"]["api-key"] = self.api_key + kwargs["headers"]["Accept"] = "application/json" return url, kwargs async def request_url(self, query): diff --git a/bbot/test/test_step_2/module_tests/test_module_leakix.py b/bbot/test/test_step_2/module_tests/test_module_leakix.py index aad4a095c..0c7a0a529 100644 --- a/bbot/test/test_step_2/module_tests/test_module_leakix.py +++ b/bbot/test/test_step_2/module_tests/test_module_leakix.py @@ -6,7 +6,7 @@ class TestLeakIX(ModuleTestBase): async def setup_before_prep(self, module_test): module_test.httpx_mock.add_response( - url="https://leakix.net/host/1.2.3.4.5", + url="https://leakix.net/host/1.1.1.1", match_headers={"api-key": "asdf"}, json={"title": "Not Found", "description": "Host not found"}, )