File tree Expand file tree Collapse file tree 1 file changed +36
-0
lines changed Expand file tree Collapse file tree 1 file changed +36
-0
lines changed Original file line number Diff line number Diff line change 25
25
value = ARGV . shift
26
26
len = ARGV . shift || 8192
27
27
28
+ =begin
29
+
30
+ Examples:
31
+
32
+ $ ./tools/pattern_create.rb 128
33
+ Aa0Aa1Aa2Aa3Aa4Aa5Aa6Aa7Aa8Aa9Ab0Ab1Ab2Ab3Ab4Ab5Ab6Ab7Ab8Ab9Ac0Ac1Ac2Ac3Ac4Ac5Ac6Ac7Ac8Ac9Ad0Ad1Ad2Ad3Ad4Ad5Ad6Ad7Ad8Ad9Ae0Ae1Ae
34
+
35
+ $ ./tools/pattern_offset.rb 8Ac9
36
+ [*] Exact match at offset 86
37
+
38
+ $ ./tools/pattern_offset.rb 39634138
39
+ [*] Exact match at offset 86
40
+
41
+ $ ./tools/pattern_offset.rb 0x39634138
42
+ [*] Exact match at offset 86
43
+
44
+ $ ./tools/pattern_offset.rb 0x396341FF
45
+ [*] No exact matches, looking for likely candidates...
46
+ [+] Possible match at offset 86 (adjusted [ little-endian: 199 | big-endian: 18996934 ] ) byte offset 0
47
+
48
+ $ ./tools/pattern_offset.rb 0x3963FFFF
49
+ [*] No exact matches, looking for likely candidates...
50
+ [+] Possible match at offset 86 (adjusted [ little-endian: 48839 | big-endian: 19045574 ] )
51
+ [ snip ]
52
+
53
+ $ ./tools/pattern_offset.rb 0xFFFF4138
54
+ [*] No exact matches, looking for likely candidates...
55
+ [+] Possible match at offset 26 (adjusted [ little-endian: 3332243456 | big-endian: 3351109631 ] )
56
+ [+] Possible match at offset 56 (adjusted [ little-endian: 3332177920 | big-endian: 3351109375 ] )
57
+ [+] Possible match at offset 86 (adjusted [ little-endian: 3332112384 | big-endian: 3351109119 ] )
58
+ [ snip ]
59
+
60
+ =end
61
+
62
+
63
+
28
64
# The normal format is a full hexadecimal value: 0x41424344
29
65
if ( value . length >= 8 and value . hex > 0 )
30
66
value = value . hex
You can’t perform that action at this time.
0 commit comments