Files
metasploit-gs/lib/msf/core/exploit/fileformat.rb
T
Tod Beardsley 4b4ef45e33 Fixes #3538, adds store_local, changes the dest directory of all fileformat exploits, allows "save" to be passed to db_nmap to save scan results.
git-svn-id: file:///home/svn/framework3/trunk@14091 4d416f70-5f16-0410-b530-b9f4589650da
2011-10-27 17:01:51 +00:00

37 lines
706 B
Ruby

###
#
# This module exposes a simple method to create a file.
#
###
module Msf
module Exploit::FILEFORMAT
include Msf::Auxiliary::Report
def initialize(info = {})
super
register_options(
[
OptString.new('FILENAME', [ false, 'The file name.', nil]),
], 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)
fname = datastore['FILENAME']
ltype = "exploit.fileformat.#{self.shortname}"
full_path = store_local(ltype, nil, data, fname)
print_good "#{fname} stored at #{full_path}"
end
end
end