turn off payload handler by default for fileformat modules
git-svn-id: file:///home/svn/framework3/trunk@10486 4d416f70-5f16-0410-b530-b9f4589650daunstable
parent
14cabd2611
commit
e4bef2ce51
|
@ -5,8 +5,8 @@
|
|||
###
|
||||
|
||||
module Msf
|
||||
module Exploit::FILEFORMAT
|
||||
|
||||
module Exploit::FILEFORMAT
|
||||
|
||||
def initialize(info = {})
|
||||
super
|
||||
|
||||
|
@ -16,15 +16,21 @@ module Exploit::FILEFORMAT
|
|||
OptString.new('OUTPUTPATH', [ true, 'The location of the file.', File.join(Msf::Config.install_root, 'data', 'exploits')]),
|
||||
], Msf::Exploit::FILEFORMAT
|
||||
)
|
||||
|
||||
register_advanced_options(
|
||||
[
|
||||
OptBool.new('DisablePayloadHandler', [ false, "Disable the handler code for the selected payload", true ])
|
||||
], Msf::Exploit::FILEFORMAT
|
||||
)
|
||||
end
|
||||
|
||||
def file_create(data)
|
||||
def file_create(data)
|
||||
out = File.expand_path(File.join(datastore['OUTPUTPATH'], datastore['FILENAME']))
|
||||
fd = File.new(out,"wb")
|
||||
fd.write(data)
|
||||
fd.close
|
||||
print_status("Generated output file #{out}")
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue