Method: Rex::OLE::Util.pack64

Defined in:
lib/rex/ole/util.rb

.pack64(value) ⇒ Object



51
52
53
54
55
56
57
58
59
60
61
# File 'lib/rex/ole/util.rb', line 51

def self.pack64(value)
  @endian = LITTLE_ENDIAN if not @endian
  arr = []
  arr << (value & 0xffffffff)
  arr << (value >> 32)
  if (@endian == LITTLE_ENDIAN)
    arr.pack('VV')
  else
    arr.reverse.pack('NN')
  end
end