I'd like to find a sequence of values in a 32MB data stream, where the values are all between 0x00 and 0x09 and there are about 20-40 of them in a row.
Maybe this can be done with Hex Workshop, but i have no clue how...
I would be inclined to write a quick python script to do this.
with a few lines of code you should be able to break the binary down (complete or just a section) into an array of bytes and then look through and the array and compare each to see if it falls into your sequence.
Check out this library below.
grep can do what you ask for
:\>f:\usr\bin\ls -lag foo.bin
-rw-r--r-- 1 197121 33554432 Sep 9 13:31 foo.bin
:\>f:\usr\bin\grep -obUaP "\x30\x31\x32\x33\x34\x35\x36\x37\x38\x39" foo.bin
96:0123456789
336:0123456789
832:0123456789
1472:0123456789
2144:0123456789
3328:0123456789
25895568:0123456789
25895579:0123456789
25895590:0123456789
25895601:0123456789
25895612:0123456789
:\>
-obUaP
: stackoverflow.com/a/17168847/4406921
Commented
May 11, 2023 at 10:44