Module: Msf::Exploit::FILEFORMAT

Includes:
Auxiliary::Report
Defined in:
lib/msf/core/exploit/fileformat.rb

Instance Method Summary collapse

Methods included from Auxiliary::Report

#db, #get_client, #get_host, #inside_workspace_boundary?, #mytask, #myworkspace, #report_auth_info, #report_client, #report_exploit, #report_host, #report_loot, #report_note, #report_service, #report_vuln, #report_web_form, #report_web_page, #report_web_site, #report_web_vuln, #store_cred, #store_local, #store_loot

Instance Method Details

#file_create(data) ⇒ Object


33
34
35
36
37
38
# File 'lib/msf/core/exploit/fileformat.rb', line 33

def file_create(data)
  fname = file_format_filename
  ltype = "exploit.fileformat.#{self.shortname}"
  full_path = store_local(ltype, nil, data, fname)
  print_good "#{fname} stored at #{full_path}"
end

#file_format_filenameObject


29
30
31
# File 'lib/msf/core/exploit/fileformat.rb', line 29

def file_format_filename
  datastore['FILENAME']
end

#initialize(info = {}) ⇒ Object


13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# File 'lib/msf/core/exploit/fileformat.rb', line 13

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