add De Bruijn patterns

adds command "D[go]" to generate cyclical patterns of length provided in next arg, or to find offset in the pattern of a number. Works for both big and little endian hosts with big or little endian guests.

closes #900 
what about adding a config var to choose the charset/alphabet used for 
encoding it?


On 09/02/2014 07:16 PM, jvoisin wrote:
>
> In libr/core/cmd_debruijn.c:
>
> > @@ -0,0 +1,164 @@
> > +/* radare - LGPL - Copyright 2014 - crowell */
> > +
> > +// For information about the algorithm, see Joe Sawada and Frank Ruskey, "An
> > +// Efficient Algorithm for Generating Necklaces with Fixed Density"
> > +
> > +char* peda_charset =
> > +    "A%sB$nC-(D;)Ea0Fb1Gc2Hd3Ie4Jf5Kg6Lh7Mi8Nj9OkPlQmRnSoTpUqVrWsXtYuZvwxyz";
>
> Fair enough.
>
> Feel free to comment the current charset and to leave it in the code, 
> with a comment explaining that it can be used for tests purposes.
>
> —
> Reply to this email directly or view it on GitHub 
> <https://github.com/radare/radare2/pull/1272/files#r17000935>.
>