Land #1932 - Actually support OUTPUTPATH datastore option

unstable
sinn3r 2013-06-10 11:22:28 -05:00
commit 0895184e1f
1 changed files with 2 additions and 1 deletions

View File

@ -107,6 +107,7 @@ class Metasploit3 < Msf::Exploit::Remote
register_options(
[
OptString.new('FILENAME', [ true, 'The file name.', 'msf.ppt']),
OptString.new('OUTPUTPATH', [ true, 'Path to output the file', Msf::Config.local_directory ])
], self.class)
end
@ -219,7 +220,7 @@ class Metasploit3 < Msf::Exploit::Remote
# Create the output file
out = datastore['FILENAME']
out = File.join(datastore['OUTPUTPATH'], datastore['FILENAME'])
stg = Rex::OLE::Storage.new(out, Rex::OLE::STGM_WRITE)
if (not stg)
fail_with(Exploit::Failure::Unknown, 'Unable to create output file')