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, OPTIMIZATION_FLAGS, 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.



83
84
85
86
87
88
89
90
91
92
93
94
# File 'lib/metasploit/framework/compiler/mingw.rb', line 83

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

Instance Attribute Details

#compile_optionsObject (readonly)

Returns the value of attribute compile_options.



81
82
83
# File 'lib/metasploit/framework/compiler/mingw.rb', line 81

def compile_options
  @compile_options
end

#file_nameObject (readonly)

Returns the value of attribute file_name.



81
82
83
# File 'lib/metasploit/framework/compiler/mingw.rb', line 81

def file_name
  @file_name
end

#include_dirsObject (readonly)

Returns the value of attribute include_dirs.



81
82
83
# File 'lib/metasploit/framework/compiler/mingw.rb', line 81

def include_dirs
  @include_dirs
end

#keep_exeObject (readonly)

Returns the value of attribute keep_exe.



81
82
83
# File 'lib/metasploit/framework/compiler/mingw.rb', line 81

def keep_exe
  @keep_exe
end

#keep_srcObject (readonly)

Returns the value of attribute keep_src.



81
82
83
# File 'lib/metasploit/framework/compiler/mingw.rb', line 81

def keep_src
  @keep_src
end

Returns the value of attribute link_script.



81
82
83
# File 'lib/metasploit/framework/compiler/mingw.rb', line 81

def link_script
  @link_script
end

#mingw_binObject (readonly)

Returns the value of attribute mingw_bin.



81
82
83
# File 'lib/metasploit/framework/compiler/mingw.rb', line 81

def mingw_bin
  @mingw_bin
end

#opt_lvlObject (readonly)

Returns the value of attribute opt_lvl.



81
82
83
# File 'lib/metasploit/framework/compiler/mingw.rb', line 81

def opt_lvl
  @opt_lvl
end

#show_compile_cmdObject (readonly)

Returns the value of attribute show_compile_cmd.



81
82
83
# File 'lib/metasploit/framework/compiler/mingw.rb', line 81

def show_compile_cmd
  @show_compile_cmd
end

#strip_symsObject (readonly)

Returns the value of attribute strip_syms.



81
82
83
# File 'lib/metasploit/framework/compiler/mingw.rb', line 81

def strip_syms
  @strip_syms
end

Class Method Details

.available?Boolean

Returns:

  • (Boolean)


96
97
98
# File 'lib/metasploit/framework/compiler/mingw.rb', line 96

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