mirror of
https://github.com/trustedsec/social-engineer-toolkit
synced 2025-02-22 00:08:38 +00:00
fix payload generation loop when metasploit not run on system
This commit is contained in:
parent
ac81fed32b
commit
b8c19f5596
3 changed files with 21 additions and 4 deletions
|
@ -1,3 +1,9 @@
|
|||
~~~~~~~~~~~~~~~~
|
||||
version 7.1.2
|
||||
~~~~~~~~~~~~~~~~
|
||||
|
||||
* fixed an issue on pdf generation payloads when metasploit had never been run before on a system - now forces directory creation
|
||||
|
||||
~~~~~~~~~~~~~~~~
|
||||
version 7.1.1
|
||||
~~~~~~~~~~~~~~~~
|
||||
|
|
|
@ -174,12 +174,23 @@ if exploit_counter == 0:
|
|||
msfpath = (users_home + "/.msf4/")
|
||||
|
||||
if os.path.isdir(users_home + "/.msf5/"):
|
||||
msfpath = (users_home + "/.msf5/")
|
||||
# then we know its actually created
|
||||
if os.path.isdir(users_home + "/.msf5/loot"):
|
||||
msfpath = (users_home + "/.msf5/")
|
||||
|
||||
# if we have never run msf before
|
||||
if msfpath == "":
|
||||
os.makedirs(users_home + "/.msf5/")
|
||||
msfpath = (users_home + "/.msf5")
|
||||
print_warning("Metasploit has not been previously run on the system. This means that the msf directories haven't been created yet. Running Metasploit for you.")
|
||||
child = pexpect.spawn("msfconsole")
|
||||
print_status("Waiting 10 seconds for the directories to be created...")
|
||||
time.sleep(10)
|
||||
child.close()
|
||||
if os.path.isdir(users_home + "/.msf4"):
|
||||
print_status("All good! The directories were created.")
|
||||
msfpath = (users_home + "/.msf4/")
|
||||
else:
|
||||
print_error("Please exit out of SET and type 'msfconsole' from the command prompt and launch SET again. Can't find the msf4 directory.")
|
||||
sys.exit()
|
||||
|
||||
outpath = (msfpath + "local/" + outfile)
|
||||
print_info("Generating fileformat exploit...")
|
||||
|
|
|
@ -260,7 +260,7 @@ def print_error(message):
|
|||
|
||||
|
||||
def get_version():
|
||||
define_version = '7.1.1'
|
||||
define_version = '7.1.2'
|
||||
return define_version
|
||||
|
||||
class create_menu:
|
||||
|
|
Loading…
Add table
Reference in a new issue