Generating a passwordlist based on rules


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Generating a passwordlist based on rules
# 1  
Old 09-26-2012
Generating a passwordlist based on rules

Hy there!

Some time ago I encrypted the harddrive of my notebook.
Now, I can't remember it correctly.

I want to create a list with all possible combinations of the words I used (I still remember all the words....).


The password was created like this:

The.Peanutbutter.Tastes.goodbanana

But maybe like this:

the.peanutbutter.tastes.Good
banana

or:

the peanutbutter Tastes Good banana

or:

ThePeanutbutterTastesGoodBanana




How could this be done in a small script to create this wordlist?



regards
# 2  
Old 10-28-2012
For sur there may be some more elegant answer but until you get one ...

Code:
awk 'BEGIN{
split(" .",a,z)
split("tT",b,z)
split("pP",c,z)
split("gG",d,z)
split("bB",e,z)
for (j=0;j++<3;)
for (l=0;l++<3;)
for (m=0;m++<3;)
for (n=0;n++<3;)
for (i in b)
for (k in c)
for (o in b)
for (p in d)
for (q in e)
print b[i] "he" a[j] c[k] "eanutbutter" a[l] b[o] "astes" a[m] d[p] "ood" a[n] e[q] "anana"
}'

By the way this will generate a list of 3*3*3*3*2*2*2*2*2=2592 possible passwd... note that i assumed that the "eanutbutter" sequence remains unchanged otherwise you have to adapt the code...

I also assumed that the separator could either be dot space or nothing and that each separators are independant from eachother, if not, you can reduce the number of possibilities, depending the rules you use. (I just based those assumptions on the example you provided).

Last edited by ctsgnb; 10-29-2012 at 04:46 AM..
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Perl to change value based on set of rules

In the perl there is a default rule that sets f to VUS, and then a seris of rules that will change f based on the result that is obtained from the rule. The code below is a rule that is supposed to be applicable to lines 2-4 because this rule just looks at the digit in f. So in line 2 f is 27... (4 Replies)
Discussion started by: cmccabe
4 Replies

2. Shell Programming and Scripting

Perl to update field based on a specific set of rules

In the perl below, which does execute, I am having trouble with the else in Rule 3. The digit in f{8} is extracted and used to update f accordinly along with the value in f. There can be either - * or + before the number that is extracted but the same logic applies, that is if the value is greater... (5 Replies)
Discussion started by: cmccabe
5 Replies

3. Shell Programming and Scripting

Filtering duplicates based on lookup table and rules

please help solving the following. I have access to redhat linux cluster having 32gigs of ram. I have duplicate ids for variable names, in the file 1,2 are duplicates;3,4 and 5 are duplicates;6 and 7 are duplicates. My objective is to use only the first occurrence of these duplicates. Lookup... (4 Replies)
Discussion started by: ritakadm
4 Replies

4. Shell Programming and Scripting

Delete lines based on Rules

Hi My requirement is very simple . I juts need to delte some lines from a file. here comes theactual scenario I have some data in file like say srinivasa prabhu kumar antony srinivas king prabhu antony srinivas prabhu king yar venkata venkata kingson srinivas... (6 Replies)
Discussion started by: ptappeta
6 Replies

5. Shell Programming and Scripting

Help with allocated text content based on specific rules...

Input file format: /tag="ABL" /note="abl homolog 2 /tag="ABLIM1" /note="actin binding LIM 1 /tag="ABP1" /note="amiloride binding protein 1 (amine oxidase (copper- containing)) /tag="ABR" /note="active BCR-related /tag="AC003042.1" /note="SDR family member 11 precursor . . . (4 Replies)
Discussion started by: perl_beginner
4 Replies

6. Shell Programming and Scripting

Matching string on two files based on match rules.

Hi, How to check if a string on file2 exactly matches with a part or complete string on file1, and return a match indicator based on some match rules. 1) only records on file1 with category A should be matched. for other category, the output match indicator should default to 'N' 2) on file2... (13 Replies)
Discussion started by: effay
13 Replies

7. Shell Programming and Scripting

Generating a file based on another file

I am trying to generate a file like this one Based on this other file The first part at the very top ( ;1.0) is a constant so it does not change from file to file -that part is not a problem. My problems start with the second line, as you can see those are consecutive numbers (1;2;3; etc)... (6 Replies)
Discussion started by: Xterra
6 Replies

8. Shell Programming and Scripting

generating reports based on time field of network data

hi i have data extracted in the following format ranging around 300000 to 800000 records in a text file , the format is of network data . No. Time Source Destination Protocol 1 1998-06-05 17:20:23.569905 HP_61:aa:c9 HP_61:aa:c9 ... (1 Reply)
Discussion started by: renukaprasadb
1 Replies

9. Programming

generating timer

I'm trying generate an interrupt every 1 seconds using itimer and My clock is not running. This is what i did : printf("about to sleep for 1 second \n"); signal(SIGALRM, wakeup); //myTimer.it_interval.tv_sec=0; //myTimer.it_interval.tv_usec =0; ... (5 Replies)
Discussion started by: Confuse
5 Replies
Login or Register to Ask a Question