SHARE
TWEET

Untitled

a guest Aug 17th, 2019 84 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!/usr/bin/env python
  2. # -*- coding: UTF-8 -*-
  3.  
  4. from getopt import getopt
  5. from itertools import product
  6. from sys import argv,exit
  7.  
  8. def banner():
  9.     print '''[*] Gerador de wordlist | feito por MMxM
  10. Opçoes: 
  11.     -c <caracteres que serao usados>
  12.     -m <minimo de caracteres>
  13.     -x <maximo de caracteres>
  14.     -o <arquivo de saida>
  15.  
  16. Exemplo:
  17.     %s -c abcdefghijklmnopqrstuvwxyz -m 1 -x 5 -o /tmp/minha-wordlist.txt
  18. '''%argv[0]
  19.  
  20.  
  21. try:
  22.     min = 0
  23.     max = 0
  24.     file = None
  25.     caracteres = None
  26.     opts,args = getopt(argv[1:],"m: x: o: c:")
  27.     for opt, a in opts:
  28.         if opt == "-m": min = a
  29.         if opt == "-x": max = a
  30.         if opt == "-o": file = a
  31.         if opt == "-c": caracteres = a
  32.  
  33.     if min > max: banner();exit(1)
  34.     if caracteres == None: banner();exit(1)
  35.     if file == None: banner();exit(1)
  36.     arq = open(file,"w")
  37.     caracteres = list(str(caracteres))
  38.  
  39.     print '\n[*] Gerando wordlist ...\n'
  40.  
  41.     for n in range(int(min),int(max)+1):
  42.         for w in product(caracteres,repeat=n):
  43.             word = ''.join(w)
  44.             arq.write("%s\n"%word)
  45.  
  46.     print '[+] Wordlist gerada !!!\n[+] Arquivo => %s\n'%file
  47.     arq.close()
  48. except:
  49.     exit(1)
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top