Skip to content

Instantly share code, notes, and snippets.

@avicoder
Forked from superkojiman/namemash.py
Created August 7, 2017 05:28
Show Gist options
  • Save avicoder/a4bbc59fef3f229ef9d0c0f1d79a3fe5 to your computer and use it in GitHub Desktop.
Save avicoder/a4bbc59fef3f229ef9d0c0f1d79a3fe5 to your computer and use it in GitHub Desktop.
Creating a user name list for brute force attacks.
#!/usr/bin/env python
import sys
if __name__ == "__main__":
if len(sys.argv) != 2:
print "usage: %s names.txt" % (sys.argv[0])
sys.exit(0)
for line in open(sys.argv[1]):
name = ''.join([c for c in line if c == " " or c.isalpha()])
tokens = name.lower().split()
fname = tokens[0]
lname = tokens[-1]
print fname + lname # johndoe
print lname + fname # doejohn
print fname + "." + lname # john.doe
print lname + "." + fname # doe.john
print lname + fname[0] # doej
print fname[0] + lname # jdoe
print lname[0] + fname # djoe
print fname[0] + "." + lname # j.doe
print lname[0] + "." + fname # d.john
print fname # john
print lname # joe
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment