Python Script - Generate Possible Set of Corporate Usernames
This code is not a big deal, however useful. You pass a name like "Navtej Singh" to the function and it will churn out a list of possible usernames. This list can then be used for various tasks including bruteforcing, in bots etc. The generated list of usernames is such that it fits in the corporate email id model better than for public email id's. So for sites like yahoo etc, avoid it. On yahoo, Gmail, Hotmail etc "Jonny Walker" can be high_on_alcohol, however this is (with approx) not true for corporate email IDs.
The output for "Navtej Singh" is :
navtejsingh, navtejs, navtej, navtej.singh, nsingh, navtej.s, singh, ns, n.singh
and for "Navtej Singh Buttar" is:
navtej.singh.buttar, navtejsinghb, navtej.buttar, n.s.buttar, navtejbuttar, navtejsingh, nsb, nbuttar, navtejs, navtej.b, navtej, navtej.singh, nsingh, buttar, navtejsinghbuttar, navtej.s, nsbuttar, n.singh, navtejb, n.buttar
Enjoy it...BTW if you find certain ids not given by the script and those ids are very logically deduced from the given name, inform me .
#!/usr/bin/env python
from sets import Set
import string
def GenUserNames(name):
possibleusernames=list()
name=(name.strip()).lower()
if " " in name:
parts=name.split()
possibleusernames.append(parts[0])
possibleusernames.append(parts[0]+"."+parts[1])
possibleusernames.append(parts[0]+parts[1])
possibleusernames.append(parts[0]+"."+parts[1][0])
possibleusernames.append(parts[0][0]+"."+parts[1])
possibleusernames.append(parts[0]+parts[1][0])
possibleusernames.append(parts[0][0]+parts[1])
str1=""
str2=""
str3=""
str4=""
for i in range(0,len(parts)-1):
str1=str1+parts[i]+"."
str2=str2+parts[i]
str3=str3+parts[i][0]+"."
str4=str4+parts[i][0]
str5=str1+parts[-1]
str6=str2+parts[-1]
str7=str4+parts[-1]
str8=str3+parts[-1]
str9=str2+parts[-1][0]
str10=str4+parts[-1][0]
possibleusernames.append(str5)
possibleusernames.append(str6)
possibleusernames.append(str7)
possibleusernames.append(str8)
possibleusernames.append(str9)
possibleusernames.append(str10)
possibleusernames.append(parts[-1])
possibleusernames.append(parts[0]+"."+parts[-1])
possibleusernames.append(parts[0]+parts[-1])
possibleusernames.append(parts[0]+"."+parts[-1][0])
possibleusernames.append(parts[0][0]+"."+parts[-1])
possibleusernames.append(parts[0]+parts[-1][0])
possibleusernames.append(parts[0][0]+parts[-1])
return Set(possibleusernames)
else: # only one name..nuthing much to try
possibleusernames.append(name)
return possibleusernames
if __name__=="__main__":
for ids in GenUserNames("Navtej Singh"):
print "%s " % ids,
print "\n\n"

Could be used for spamming
Could be used for spamming corporate users ;-)
For pentesting purposes, simple reconnaissance generally gives the email format of the corporate. You can dig it from any corp-email sent to you or in public forum/ message boards etc...
same idea for random credit
same idea for random credit card no. generation
Post new comment