Class: Metasploit::Framework::Compiler::Mingw::X64

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 = {}) ⇒ X64

Returns a new instance of X64.



106
107
108
109
110
111
112
113
114
115
116
117
# File 'lib/metasploit/framework/compiler/mingw.rb', line 106

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_X64
end

Instance Attribute Details

#compile_optionsObject (readonly)

Returns the value of attribute compile_options.



104
105
106
# File 'lib/metasploit/framework/compiler/mingw.rb', line 104

def compile_options
  @compile_options
end

#file_nameObject (readonly)

Returns the value of attribute file_name.



104
105
106
# File 'lib/metasploit/framework/compiler/mingw.rb', line 104

def file_name
  @file_name
end

#include_dirsObject (readonly)

Returns the value of attribute include_dirs.



104
105
106
# File 'lib/metasploit/framework/compiler/mingw.rb', line 104

def include_dirs
  @include_dirs
end

#keep_exeObject (readonly)

Returns the value of attribute keep_exe.



104
105
106
# File 'lib/metasploit/framework/compiler/mingw.rb', line 104

def keep_exe
  @keep_exe
end

#keep_srcObject (readonly)

Returns the value of attribute keep_src.



104
105
106
# File 'lib/metasploit/framework/compiler/mingw.rb', line 104

def keep_src
  @keep_src
end

Returns the value of attribute link_script.



104
105
106
# File 'lib/metasploit/framework/compiler/mingw.rb', line 104

def link_script
  @link_script
end

#mingw_binObject (readonly)

Returns the value of attribute mingw_bin.



104
105
106
# File 'lib/metasploit/framework/compiler/mingw.rb', line 104

def mingw_bin
  @mingw_bin
end

#opt_lvlObject (readonly)

Returns the value of attribute opt_lvl.



104
105
106
# File 'lib/metasploit/framework/compiler/mingw.rb', line 104

def opt_lvl
  @opt_lvl
end

#show_compile_cmdObject (readonly)

Returns the value of attribute show_compile_cmd.



104
105
106
# File 'lib/metasploit/framework/compiler/mingw.rb', line 104

def show_compile_cmd
  @show_compile_cmd
end

#strip_symsObject (readonly)

Returns the value of attribute strip_syms.



104
105
106
# File 'lib/metasploit/framework/compiler/mingw.rb', line 104

def strip_syms
  @strip_syms
end

Class Method Details

.available?Boolean

Returns:

  • (Boolean)


119
120
121
# File 'lib/metasploit/framework/compiler/mingw.rb', line 119

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