From 3daf78777be36f49aface93a9aaf03a402459d3d Mon Sep 17 00:00:00 2001 From: Meatballs Date: Sun, 20 Jul 2014 22:57:19 +0100 Subject: [PATCH] Use native unpack for PDWORDs --- lib/rex/post/meterpreter/extensions/stdapi/railgun/dll.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/rex/post/meterpreter/extensions/stdapi/railgun/dll.rb b/lib/rex/post/meterpreter/extensions/stdapi/railgun/dll.rb index a2bce9ea8b..8cef397775 100644 --- a/lib/rex/post/meterpreter/extensions/stdapi/railgun/dll.rb +++ b/lib/rex/post/meterpreter/extensions/stdapi/railgun/dll.rb @@ -318,7 +318,7 @@ class DLL buffer = rec_out_only_buffers[buffer_item.addr, buffer_item.length_in_bytes] case buffer_item.datatype when "PDWORD" - return_hash[param_name] = buffer.unpack('V')[0] + return_hash[param_name] = buffer.unpack(native)[0] when "PCHAR" return_hash[param_name] = asciiz_to_str(buffer) when "PWCHAR" @@ -338,7 +338,7 @@ class DLL buffer = rec_inout_buffers[buffer_item.addr, buffer_item.length_in_bytes] case buffer_item.datatype when "PDWORD" - return_hash[param_name] = buffer.unpack('V')[0] + return_hash[param_name] = buffer.unpack(native)[0] when "PCHAR" return_hash[param_name] = asciiz_to_str(buffer) when "PWCHAR"