mirror of
https://github.com/laramies/theHarvester.git
synced 2026-08-17 19:35:40 +02:00
Fix #2055
This commit is contained in:
+1
-1
@@ -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)
|
||||
|
||||
|
||||
+1
-1
@@ -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__':
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user