fix import issue when using powershell

This commit is contained in:
TrustedSec 2016-02-15 09:36:30 -05:00
parent fe7a258c39
commit 0718f45500
2 changed files with 5 additions and 4 deletions

View file

@ -1172,9 +1172,9 @@ and send the QRCode via a mailer.
# Main Menu choice 10: PowerShell Attacks
if main_menu_choice == '9':
try:
import src.powershell.powershell
except:
module_reload(src.powershell.powershell)
except:
import src.powershell.powershell
# Main Menu choice 11: Third Party Modules
if main_menu_choice == '10':
@ -1183,7 +1183,7 @@ and send the QRCode via a mailer.
try:
module_reload(module_handler)
except:
from . import module_handler
import module_handler
# Main Menu choice 99: Exit the Social-Engineer Toolkit
if main_menu_choice == '99':

View file

@ -35,9 +35,10 @@ if powershell_menu_choice != "99":
filewrite.close()
try:
reload(src.payloads.powershell.prep)
module_reload(src.payloads.powershell.prep)
except:
import src.payloads.powershell.prep
# create the directory if it does not exist
if not os.path.isdir(setdir + "/reports/powershell"):
os.makedirs(setdir + "/reports/powershell")