diff --git a/modules/exploits/windows/fileformat/hhw_hhp_indexfile_bof.rb b/modules/exploits/windows/fileformat/hhw_hhp_indexfile_bof.rb index 337e8684ef..62e245c062 100644 --- a/modules/exploits/windows/fileformat/hhw_hhp_indexfile_bof.rb +++ b/modules/exploits/windows/fileformat/hhw_hhp_indexfile_bof.rb @@ -15,6 +15,7 @@ class Metasploit3 < Msf::Exploit::Remote Rank = GoodRanking include Msf::Exploit::FILEFORMAT + include Msf::Exploit::Egghunter def initialize(info = {}) super(update_info(info, diff --git a/modules/exploits/windows/fileformat/ms09_067_excel_featheader.rb b/modules/exploits/windows/fileformat/ms09_067_excel_featheader.rb index 4acad8fa2d..6f4ef14014 100644 --- a/modules/exploits/windows/fileformat/ms09_067_excel_featheader.rb +++ b/modules/exploits/windows/fileformat/ms09_067_excel_featheader.rb @@ -103,6 +103,7 @@ class Metasploit3 < Msf::Exploit::Remote register_options( [ 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) end diff --git a/modules/exploits/windows/fileformat/ms10_004_textbytesatom.rb b/modules/exploits/windows/fileformat/ms10_004_textbytesatom.rb index 5356d56b43..52293aa7b2 100644 --- a/modules/exploits/windows/fileformat/ms10_004_textbytesatom.rb +++ b/modules/exploits/windows/fileformat/ms10_004_textbytesatom.rb @@ -224,7 +224,7 @@ class Metasploit3 < Msf::Exploit::Remote # 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) if (not stg) raise RuntimeError, 'Unable to create output file' diff --git a/modules/exploits/windows/fileformat/ms11_006_createsizeddibsection.rb b/modules/exploits/windows/fileformat/ms11_006_createsizeddibsection.rb index 1503424629..438edf098c 100644 --- a/modules/exploits/windows/fileformat/ms11_006_createsizeddibsection.rb +++ b/modules/exploits/windows/fileformat/ms11_006_createsizeddibsection.rb @@ -111,6 +111,7 @@ class Metasploit3 < Msf::Exploit::Remote register_options( [ 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) end diff --git a/modules/exploits/windows/fileformat/ultraiso_ccd.rb b/modules/exploits/windows/fileformat/ultraiso_ccd.rb index ffa5ede535..96b64a889a 100644 --- a/modules/exploits/windows/fileformat/ultraiso_ccd.rb +++ b/modules/exploits/windows/fileformat/ultraiso_ccd.rb @@ -215,7 +215,7 @@ class Metasploit3 < Msf::Exploit::Remote # create the empty IMG file imgfn = datastore['FILENAME'].dup imgfn.gsub!(/\.ccd$/, '.img') - out = File.expand_path(File.join(datastore['OUTPUTPATH'], imgfn)) + out = imgfn File.new(out,"wb").close print_status("Created empty output file #{out}") diff --git a/modules/exploits/windows/fileformat/ultraiso_cue.rb b/modules/exploits/windows/fileformat/ultraiso_cue.rb index b3dfc4bdc6..b66f301896 100644 --- a/modules/exploits/windows/fileformat/ultraiso_cue.rb +++ b/modules/exploits/windows/fileformat/ultraiso_cue.rb @@ -120,7 +120,7 @@ class Metasploit3 < Msf::Exploit::Remote # create the empty BIN file binfn = datastore['FILENAME'].dup binfn.gsub!(/\.cue$/, '.bin') - out = File.expand_path(File.join(datastore['OUTPUTPATH'], binfn)) + out = binfn File.new(out,"wb").close print_status("Created empty output file #{out}")