Monday, August 26, 2013

shell script: generate usernames from information found

Almost in every penetration test auditor encounter some of this information - company worker names and e-mail addresses. And after use them to launch Brute-Force or other attacks. Of course this information needs to be somehow translated to valid username format

Here is my basic script, which generates "usernames" from text file, that contains user data in following formats:
1) Name Surname
2) Surname Name
3) username@domain
4) name.surname@domain

It generates usernames using this formats:
1) first letter of name + surname
2) first letter of surname + name
3) last letter of username + rest of username
4) rest of username + first letter of username
5) All of this trimmed to 8 characters

I have plan to add to this script functionality to add number at the end of username like ajons01 or ajons1, ehich are used when there are two workers with same letter combination.

Syntaxis for this script is:
 ./create_username.sh input.txt output.txt

And here is link to this script:

Here sample output from how it works:



No comments:

Post a Comment