I have looked into jack the ripper and crunch but haven't found a way to do this.
And before I start thinking on coding this myself (which will take me a lot more than I foresee), maybe there is already something out there.
I know that I've used some words in my forgotten password, the problem is I don't know which ones.
So what I need is a program which I can define the maximum length for a valid/possible password and a file with a bag of words.
So consider this:
You have 3 spaces, 2 underscores and words separated by a #.
$ cat bag_of_words.txt
The # symbolizes a XOR. That means you will either use "today" or "Today" but never both in the same possible password.
Also note that this is a combinatorial exercise without repetitions, that is why I put 3 spaces, because I know that at most I have used 3 spaces. This is necessary to avoid passwords like "today Today" (which would result from 2 draws).
Possible passwords would be:
$ cat possible_passwords.txt
fineToday is_A DAY
So it should allow:
- setting a maximum length,
- defining alternatives between words (the XOR), and
- setting a password prefix or suffix.
I have finished implementing my own dictionary generator but I'm having 2 serious problems in regard to some aspects.
Before I continue I'll leave a similar version of my custom dictionary:
Here you have 37 words (5 are spaces) and 15 lines. And keep in mind that the # represents a XOR (that is you can only pick one word from a single line) and that after you chose a word from a line it becomes blacklist for the rest of that password generation cycle.
pinguim#Pinguim#pinguim10#pinguim 10#Pinguim10#Pinguim 10
elephant#elephantXX#elephant XX#Elephant#ElephantXX#Elephant XX
scorpion#scorpionRED#scorpion RED#Scorpion#ScorpionRED#Scorpion RED
That means that you could have a passphrase with 15 words, from those possible 37.
Now the good news is that at most I know that I've used 5 words!
So the first problem is: how do I calculate the number of possible combinations?
Is it: 37*36*35*34*33 = 52,307,640 ?
The second problem... *eek*
Is how do I make an incremental generation of passwords, since if this number is correct, I can try all possible combinations.
I'm really having a hard time visualizing this...
sorry, not sure if I was clear in the post above...
I was able to implement a random method for generating possible passwords.
But I'm just blocked at doing the incremental method.
I was able to code the incremental passphrase generator, but I'm still having some troubles calculating the number of possible combinations.