1 //BruteForCer - A combination sequence generator
4 * I hope, that this can show you that BF is the most suxing idea.
5 * You can use GREP pipe, if you know part of password.
6 * Brutforcing is the only way to be the real hacker. (Please don't pwn me ;)
12 void inc(char *comb
, int i
, int maxno
) {
13 if(comb
[i
]==-1) { comb
[i
]=0; return; }
14 comb
[i
]=(comb
[i
]+1)%maxno
;
15 if(comb
[i
]==0) inc(comb
, i
+1, maxno
);
21 int maxlen
= 10; //Lenght of string
22 //char full = 0; //0=Alphabet, 1=All possibilities
23 //char alpha[] = "01";
24 char alpha
[] = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890 "; //Alphabet
25 int alphmax
= sizeof(alpha
)-1; //printf("%d\n", alphmax);
28 for(i
=0;i
<=maxlen
;i
++) {
30 if(i
<minlen
) comb
[i
] = 0;
32 while(comb
[maxlen
]==-1) {
33 for(i
=maxlen
-1;i
>=0;i
--) if(comb
[i
]!=-1) putchar(alpha
[comb
[i
]]); putchar('\n');
This page took 0.353895 seconds and 4 git commands to generate.