From 6b8b4875068529e7f08c2221dbe816c168ba479e Mon Sep 17 00:00:00 2001 From: HD Moore Date: Tue, 20 Nov 2012 08:54:52 -0800 Subject: [PATCH] Handle the raw byte case as well --- tools/pattern_offset.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/pattern_offset.rb b/tools/pattern_offset.rb index 3854c1da85..1d415f45e0 100755 --- a/tools/pattern_offset.rb +++ b/tools/pattern_offset.rb @@ -27,6 +27,8 @@ len = ARGV.shift || 8192 if (value.length >= 8 and value.hex > 0) value = value.hex +elsif (value.length == 4) + value = value.unpack("V").first else value = value.to_i(16) end