Method: Rex::Post::Meterpreter::Extensions::Stdapi::Railgun::Type::PointerUtil.unpack_pointer

Defined in:
lib/rex/post/meterpreter/extensions/stdapi/railgun/type/pointer_util.rb

.unpack_pointer(packed_pointer, platform) ⇒ Object

Given a packed pointer, unpack it according to architecture



40
41
42
43
44
45
46
47
48
49
50
# File 'lib/rex/post/meterpreter/extensions/stdapi/railgun/type/pointer_util.rb', line 40

def self.unpack_pointer(packed_pointer, platform)
  case platform
  when PlatformUtil::X86_64
    # Assume little endian
    packed_pointer.unpack('Q<').first
  when PlatformUtil::X86_32
    packed_pointer.unpack('V').first
  else
    raise "platform symbol #{platform.to_s} not supported"
  end
end