From 5fc091ae3f5d5a07e1c15215e783b2a0d28e84cd Mon Sep 17 00:00:00 2001 From: L1ghtn1ng Date: Tue, 8 Jul 2025 02:37:21 +0100 Subject: [PATCH] Fix #2055 --- bin/theHarvester | 2 +- theHarvester.py | 2 +- theHarvester/__main__.py | 4 ++-- theHarvester/discovery/constants.py | 4 ++-- theHarvester/discovery/takeover.py | 4 ++-- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/bin/theHarvester b/bin/theHarvester index 3bd90c7d..b921606f 100755 --- a/bin/theHarvester +++ b/bin/theHarvester @@ -7,7 +7,7 @@ from theHarvester import __main__ if sys.version_info.major < 3 or sys.version_info.minor < 11: print( - "\033[93m[!] Make sure you have Python 3.11+ installed, quitting.\n\n \033[0m" + "[!] Make sure you have Python 3.11+ installed, quitting.\n\n" ) sys.exit(1) diff --git a/theHarvester.py b/theHarvester.py index bc1af5e2..7246dad3 100755 --- a/theHarvester.py +++ b/theHarvester.py @@ -5,7 +5,7 @@ import sys from theHarvester.theHarvester import main if sys.version_info.major < 3 or sys.version_info.minor < 10: - print('\033[93m[!] Make sure you have Python 3.10+ installed, quitting.\n\n \033[0m') + print('[!] Make sure you have Python 3.10+ installed, quitting.\n\n') sys.exit(1) if __name__ == '__main__': diff --git a/theHarvester/__main__.py b/theHarvester/__main__.py index 4395144d..f3efa9bd 100644 --- a/theHarvester/__main__.py +++ b/theHarvester/__main__.py @@ -307,7 +307,7 @@ async def start(rest_args: argparse.Namespace | None = None): db_stash = stash.StashManager() if source: - print(f'\033[94m[*] Searching {source[0].upper() + source[1:]}. ') + print(f'[*] Searching {source[0].upper() + source[1:]}. ') if store_host: host_names = list({host for host in await search_engine.get_hostnames() if f'.{word}' in host}) @@ -1293,7 +1293,7 @@ async def start(rest_args: argparse.Namespace | None = None): # Shodan shodanres = [] if shodan is True: - print('\033[94m[*] Searching Shodan. ') + print('[*] Searching Shodan. ') try: for ip in host_ip: # TODO fix shodan diff --git a/theHarvester/discovery/constants.py b/theHarvester/discovery/constants.py index 6ec47430..e964b0d8 100644 --- a/theHarvester/discovery/constants.py +++ b/theHarvester/discovery/constants.py @@ -115,9 +115,9 @@ class MissingKey(Exception): def __init__(self, source: str | None) -> None: if source: - self.message = f'\n\033[93m[!] Missing API key for {source}. \033[0m' + self.message = f'\n[!] Missing API key for {source}. ' else: - self.message = '\n\033[93m[!] Missing CSE id. \033[0m' + self.message = '\n[!] Missing CSE id. ' def __str__(self) -> str: return self.message diff --git a/theHarvester/discovery/takeover.py b/theHarvester/discovery/takeover.py index a1a0f302..de58a4a7 100644 --- a/theHarvester/discovery/takeover.py +++ b/theHarvester/discovery/takeover.py @@ -66,11 +66,11 @@ class TakeOver: matches = re.findall(regex, resp) matches = list(set(matches)) for match in matches: - print(f'\t\033[91m Takeover detected: {url}\033[1;32;40m') + print(f'\t Takeover detected: {url}') if match in self.fingerprints.keys(): # Validation check as to not error out service = self.fingerprints[match] - print(f'\t\033[91m Type of takeover is: {service} with match: {match}\033[1;32;40m') + print(f'\t Type of takeover is: {service} with match: {match}') self.results[url].append({match: service}) async def do_take(self) -> None: