lib/rex/post/meterpreter/extensions/stdapi/railgun/util.rb in librex-0.0.70 vs lib/rex/post/meterpreter/extensions/stdapi/railgun/util.rb in librex-0.0.71

- old
+ new

@@ -322,12 +322,12 @@ # # Given a packed pointer, unpacks it according to architecture # def unpack_pointer(packed_pointer) if is_64bit - # XXX: Only works if attacker and victim are like-endianed - packed_pointer.unpack('Q')[0] + # Assume little endian + packed_pointer.unpack('Q<')[0] else packed_pointer.unpack('V')[0] end end @@ -450,12 +450,12 @@ return read_wstring(read_pointer(raw)) when :DWORD # Both on x86 and x64, DWORD is 32 bits return raw.unpack('V').first when :BOOL - return raw.unpack('l').first == 1 + return raw.unpack('V').first == 1 when :LONG - return raw.unpack('l').first + return raw.unpack('V').first end #If nothing worked thus far, return it raw return raw end