Advertisement
Guest User

Create a Wordlist with Python

a guest
Aug 28th, 2015
2,972
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.63 KB | None | 0 0
  1. import itertools
  2. import argparse
  3.  
  4. parser = argparse.ArgumentParser()
  5. parser.add_argument("password", help="Filename where permutations will be saved!!")
  6. args = parser.parse_args()
  7. f = open(args.password, "w")
  8.  
  9. saved = []
  10.  
  11. print "Press Ctrl + C to end!!\n"
  12. while True:
  13.     try:
  14.                         passes = raw_input(">")
  15.           saved.append(passes)
  16.     except KeyboardInterrupt:
  17.         break
  18.  
  19. for i in range(1,20): #you can change the range to vary the minimum and maximum combinations
  20.     res = itertools.permutations(saved, i)
  21.     for j in res:
  22.         f.write(''.join(j) + "\n")
  23.  
  24.  
  25. f.close()
  26.  
  27. raw_input("Press any key to exit....")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement