Method: Rex::Compat.is_wow64

Defined in:
lib/rex/compat.rb

.is_wow64Object



84
85
86
87
88
89
90
91
92
93
94
# File 'lib/rex/compat.rb', line 84

def self.is_wow64
  return false if not is_windows
  is64 = false
  begin
    buff = "\x00" * 4
    Win32API.new("kernel32","IsWow64Process",['L','P'],'L').call(-1, buff)
    is64 = (buff.unpack("V")[0]) == 1 ? true : false
  rescue ::Exception
  end
  is64
end