Is there a Linux tool out there that locates a bit sequence given in hexadecimal representation in a binary file no matter how those bits are aligned in the file?
Example: I want to locate the two byte long sequence f2 40 in a binary file. The perfectly aligned representation f2 40 can easily be found using hd and grep. But I also want to find 01 e4 80, d3 e4 81 or ff e4 80 (which all include f2 40 shifted by one bit to the left).