Skip to content

Commit 7d2d641

Browse files
author
HD Moore
committed
Treat non-8byte values as hex
1 parent 5274a13 commit 7d2d641

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

tools/pattern_offset.rb

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,10 @@
2828
if (value.length >= 8 and value.hex > 0)
2929
value = value.hex
3030
else
31-
value = value[0,4].unpack("V").first
31+
value = value.to_i(16)
3232
end
3333

3434
buffer = Rex::Text.pattern_create(len.to_i)
35-
3635
offset = Rex::Text.pattern_offset(buffer, value)
3736

3837
# Handle cases where there is no match by looking for "close" matches

0 commit comments

Comments
 (0)