Class: Metasploit::Framework::Compiler::Mingw::X86

Inherits:
Object
  • Object
show all
Includes:
Metasploit::Framework::Compiler::Mingw
Defined in:
lib/metasploit/framework/compiler/mingw.rb

Constant Summary

Constants included from Metasploit::Framework::Compiler::Mingw

INCLUDE_DIR, MINGW_X64, MINGW_X86, UTILITY_DIR

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Metasploit::Framework::Compiler::Mingw

#build_cmd, #cleanup_files, #compile_c

Constructor Details

#initialize(opts = {}) ⇒ X86

Returns a new instance of X86.


73
74
75
76
77
78
79
80
81
# File 'lib/metasploit/framework/compiler/mingw.rb', line 73

def initialize(opts={})
  @file_name = opts[:f_name]
  @keep_exe = opts[:keep_exe]
  @keep_src = opts[:keep_src]
  @strip_syms = opts[:strip_symbols]
  @link_script = opts[:linker_script]
  @opt_lvl = opts[:opt_lvl]
  @mingw_bin = MINGW_X86
end

Instance Attribute Details

#file_nameObject (readonly)

Returns the value of attribute file_name


71
72
73
# File 'lib/metasploit/framework/compiler/mingw.rb', line 71

def file_name
  @file_name
end

#keep_exeObject (readonly)

Returns the value of attribute keep_exe


71
72
73
# File 'lib/metasploit/framework/compiler/mingw.rb', line 71

def keep_exe
  @keep_exe
end

#keep_srcObject (readonly)

Returns the value of attribute keep_src


71
72
73
# File 'lib/metasploit/framework/compiler/mingw.rb', line 71

def keep_src
  @keep_src
end

Returns the value of attribute link_script


71
72
73
# File 'lib/metasploit/framework/compiler/mingw.rb', line 71

def link_script
  @link_script
end

#mingw_binObject (readonly)

Returns the value of attribute mingw_bin


71
72
73
# File 'lib/metasploit/framework/compiler/mingw.rb', line 71

def mingw_bin
  @mingw_bin
end

#opt_lvlObject (readonly)

Returns the value of attribute opt_lvl


71
72
73
# File 'lib/metasploit/framework/compiler/mingw.rb', line 71

def opt_lvl
  @opt_lvl
end

#strip_symsObject (readonly)

Returns the value of attribute strip_syms


71
72
73
# File 'lib/metasploit/framework/compiler/mingw.rb', line 71

def strip_syms
  @strip_syms
end

Class Method Details

.available?Boolean

Returns:

  • (Boolean)

83
84
85
# File 'lib/metasploit/framework/compiler/mingw.rb', line 83

def self.available?
  !!(Msf::Util::Helper.which(MINGW_X86))
end