I'm not really that interested in cracking passwords, but I like writing code for doing it. Anyway I threw together this short piece:
Code:
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
void Combinate(char const *const pstart,char *const p,
char const *const plast,char const *const alphabet)
{
for (*p = alphabet[0]; *p; *p = strchr(alphabet,*p)[1])
{
if (p == plast)
puts(pstart);
else
Combinate(pstart,p+1,plast,alphabet);
}
}
int main(int argc, char **argv)
{
char str[64 + 1] = {0};
Combinate(str,str,str + strtoul(argv[1],0,10) - 1,argv[2]);
return 0;
}
Copy-paste it into a file called "combinator.c" and then compile it as follows:
Code:
gcc combinator.c -o combinator
Next, if you want to get all the 4-character-long hexadecimal numbers, run it as follows:
Code:
./combinator 4 0123456789abcdef
The first argument to the program is the length of the password (if you specify more than 64 then your computer will explode). The second argument is the characters that make up the alphabet.
Anyway you can pipe the output of this program into your favourite cracking program:
Code:
./combinator 4 0123456789abcdef |my_favourite_cracker --read-from-stdin
Beats creating a 30gig file if you ask me.