NASM Forum > Example Code

byte sequence search

(1/1)

greco558:
Hi All,
 Here is a program to search a file for byte sequences from 1 byte to 128 bytes in length, I don't
think anyone would search a file with a sequence 128 bytes long.

To run program from command line > ./bytesq -f filename -s 0a845f67ff

As you can see from above you enter hex byte sequence you are searching for after -s option.
program will return the starting byte location or locations the sequence appears in file.


Best Regards
John Endler

 

Navigation

[0] Message Index

Go to full version