5.4 Pattern search with distance

Since radare 1.4 there's a /P command that implements a search algorithm that tries to find a block of blocksize bytes matching at least N bytes compared against the current block.

This algorithm is useful for finding similar blocks of code (basic blocks), duplicated and similar strings, etc..

Here's an usage example:

$ cat file
helloworld
this is new
algorithm for
hellpworld
similar blocks
h3llow0rld
$ radare file
[0x00000000]> /P 8 @ 0:10
0x00000025 9/10
0x0000003f 8/10