Remove references to OUTPUTPATH options, unless files are created using a different method

git-svn-id: file:///home/svn/framework3/trunk@12892 4d416f70-5f16-0410-b530-b9f4589650da
unstable
David Rude 2011-06-09 19:51:56 +00:00
parent 85f5e5fb98
commit 247251ac07
6 changed files with 6 additions and 3 deletions

View File

@ -15,6 +15,7 @@ class Metasploit3 < Msf::Exploit::Remote
Rank = GoodRanking Rank = GoodRanking
include Msf::Exploit::FILEFORMAT include Msf::Exploit::FILEFORMAT
include Msf::Exploit::Egghunter
def initialize(info = {}) def initialize(info = {})
super(update_info(info, super(update_info(info,

View File

@ -103,6 +103,7 @@ class Metasploit3 < Msf::Exploit::Remote
register_options( register_options(
[ [
OptString.new('FILENAME', [ true, 'The file name.', 'msf.xls']), OptString.new('FILENAME', [ true, 'The file name.', 'msf.xls']),
OptString.new('OUTPUTPATH', [ true, 'The output path to use.', Msf::Config.config_directory + "/data/exploits/"]),
], self.class) ], self.class)
end end

View File

@ -224,7 +224,7 @@ class Metasploit3 < Msf::Exploit::Remote
# Create the output file # Create the output file
out = File.expand_path(File.join(datastore['OUTPUTPATH'], datastore['FILENAME'])) out = datastore['FILENAME']
stg = Rex::OLE::Storage.new(out, Rex::OLE::STGM_WRITE) stg = Rex::OLE::Storage.new(out, Rex::OLE::STGM_WRITE)
if (not stg) if (not stg)
raise RuntimeError, 'Unable to create output file' raise RuntimeError, 'Unable to create output file'

View File

@ -111,6 +111,7 @@ class Metasploit3 < Msf::Exploit::Remote
register_options( register_options(
[ [
OptString.new('FILENAME', [ true, 'The file name.', 'msf.doc']), OptString.new('FILENAME', [ true, 'The file name.', 'msf.doc']),
OptString.new('OUTPUTPATH', [ true, 'The output path to use.', Msf::Config.config_directory + "/data/exploits/"]),
], self.class) ], self.class)
end end

View File

@ -215,7 +215,7 @@ class Metasploit3 < Msf::Exploit::Remote
# create the empty IMG file # create the empty IMG file
imgfn = datastore['FILENAME'].dup imgfn = datastore['FILENAME'].dup
imgfn.gsub!(/\.ccd$/, '.img') imgfn.gsub!(/\.ccd$/, '.img')
out = File.expand_path(File.join(datastore['OUTPUTPATH'], imgfn)) out = imgfn
File.new(out,"wb").close File.new(out,"wb").close
print_status("Created empty output file #{out}") print_status("Created empty output file #{out}")

View File

@ -120,7 +120,7 @@ class Metasploit3 < Msf::Exploit::Remote
# create the empty BIN file # create the empty BIN file
binfn = datastore['FILENAME'].dup binfn = datastore['FILENAME'].dup
binfn.gsub!(/\.cue$/, '.bin') binfn.gsub!(/\.cue$/, '.bin')
out = File.expand_path(File.join(datastore['OUTPUTPATH'], binfn)) out = binfn
File.new(out,"wb").close File.new(out,"wb").close
print_status("Created empty output file #{out}") print_status("Created empty output file #{out}")