Module: Msf::Exploit::FILEFORMAT

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

Instance Method Summary collapse

Methods included from Auxiliary::Report

#active_db?, #create_cracked_credential, #create_credential, #create_credential_and_login, #create_credential_login, #db, #db_warning_given?, #get_client, #get_host, #inside_workspace_boundary?, #invalidate_login, #mytask, #myworkspace, #myworkspace_id, #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

Methods included from Metasploit::Framework::Require

optionally, optionally_active_record_railtie, optionally_include_metasploit_credential_creation, #optionally_include_metasploit_credential_creation, optionally_require_metasploit_db_gem_engines

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