From a1945cc8a8a765a89e37f63c7e6f84bcce61ea2b Mon Sep 17 00:00:00 2001 From: Lee Baird Date: Tue, 8 Jul 2025 12:34:44 -0500 Subject: [PATCH] Fix #2062 * Alphabetize * Apply ruff fixes and formatting * Missed haveibeenpwned. * Alphabetize * Apply ruff fixes and formatting --------- Co-authored-by: github-actions --- theHarvester/lib/core.py | 71 ++++++++++++++++++++-------------------- 1 file changed, 35 insertions(+), 36 deletions(-) diff --git a/theHarvester/lib/core.py b/theHarvester/lib/core.py index c5f1e5b7..117abc10 100644 --- a/theHarvester/lib/core.py +++ b/theHarvester/lib/core.py @@ -63,6 +63,10 @@ class Core: def bufferoverun_key() -> str: return Core.api_keys()['bufferoverun']['key'] + @staticmethod + def builtwith_key() -> str: + return Core.api_keys()['builtwith']['key'] + @staticmethod def censys_key() -> tuple: return Core.api_keys()['censys']['id'], Core.api_keys()['censys']['secret'] @@ -87,6 +91,10 @@ class Core: def github_key() -> str: return Core.api_keys()['github']['key'] + @staticmethod + def haveibeenpwned_key() -> str: + return Core.api_keys()['haveibeenpwned']['key'] + @staticmethod def hunter_key() -> str: return Core.api_keys()['hunter']['key'] @@ -99,18 +107,22 @@ class Core: def intelx_key() -> str: return Core.api_keys()['intelx']['key'] + @staticmethod + def leaklookup_key() -> str: + return Core.api_keys()['leaklookup']['key'] + @staticmethod def netlas_key() -> str: return Core.api_keys()['netlas']['key'] - @staticmethod - def pentest_tools_key() -> str: - return Core.api_keys()['pentestTools']['key'] - @staticmethod def onyphe_key() -> str: return Core.api_keys()['onyphe']['key'] + @staticmethod + def pentest_tools_key() -> str: + return Core.api_keys()['pentestTools']['key'] + @staticmethod def projectdiscovery_key() -> str: return Core.api_keys()['projectDiscovery']['key'] @@ -119,6 +131,10 @@ class Core: def rocketreach_key() -> str: return Core.api_keys()['rocketreach']['key'] + @staticmethod + def securityscorecard_key() -> str: + return Core.api_keys()['securityscorecard']['key'] + @staticmethod def security_trails_key() -> str: return Core.api_keys()['securityTrails']['key'] @@ -127,14 +143,14 @@ class Core: def shodan_key() -> str: return Core.api_keys()['shodan']['key'] - @staticmethod - def zoomeye_key() -> str: - return Core.api_keys()['zoomeye']['key'] - @staticmethod def tomba_key() -> tuple[str, str]: return Core.api_keys()['tomba']['key'], Core.api_keys()['tomba']['secret'] + @staticmethod + def venacus_key() -> str: + return Core.api_keys()['venacus']['key'] + @staticmethod def virustotal_key() -> str: return Core.api_keys()['virustotal']['key'] @@ -144,24 +160,8 @@ class Core: return Core.api_keys()['whoisxml']['key'] @staticmethod - def venacus_key() -> str: - return Core.api_keys()['venacus']['key'] - - @staticmethod - def haveibeenpwned_key() -> str: - return Core.api_keys()['haveibeenpwned']['key'] - - @staticmethod - def leaklookup_key() -> str: - return Core.api_keys()['leaklookup']['key'] - - @staticmethod - def securityscorecard_key() -> str: - return Core.api_keys()['securityscorecard']['key'] - - @staticmethod - def builtwith_key() -> str: - return Core.api_keys()['builtwith']['key'] + def zoomeye_key() -> str: + return Core.api_keys()['zoomeye']['key'] @staticmethod def proxy_list() -> list: @@ -191,38 +191,42 @@ class Core: Returns a list of supported search engines. """ return [ + 'api_endpoints', 'baidu', 'bevigil', 'bing', 'bingapi', 'bufferoverun', + 'builtwith', 'brave', 'censys', 'certspotter', 'criminalip', 'crtsh', - 'dnsdumpster', - 'duckduckgo', 'dehashed', 'dnsdumpster', + 'duckduckgo', 'fullhunt', 'github-code', 'hackertarget', + 'haveibeenpwned', 'hunter', 'hunterhow', 'intelx', - 'netlas', - 'onyphe', + 'leaklookup', 'linkedin', 'linkedin_links', 'netcraft', + 'netlas', 'omnisint', + 'onyphe', 'otx', 'pentesttools', 'projectdiscovery', 'qwant', 'rapiddns', 'rocketreach', + 'securityscorecard', 'securityTrails', 'sitedossier', 'subdomaincenter', @@ -232,17 +236,12 @@ class Core: 'threatminer', 'tomba', 'urlscan', + 'venacus', 'virustotal', 'whoisxml', 'yahoo', 'zoomeye', 'zoomeyeapi', - 'haveibeenpwned', - 'leaklookup', - 'securityscorecard', - 'builtwith', - 'api_endpoints', # Add the new API endpoint scanner - 'venacus', ] @staticmethod