Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env python
- # -*- coding: UTF-8 -*-
- from getopt import getopt
- from itertools import product
- from sys import argv,exit
- def banner():
- print '''[*] Gerador de wordlist | feito por MMxM
- Opçoes:
- -c <caracteres que serao usados>
- -m <minimo de caracteres>
- -x <maximo de caracteres>
- -o <arquivo de saida>
- Exemplo:
- %s -c abcdefghijklmnopqrstuvwxyz -m 1 -x 5 -o /tmp/minha-wordlist.txt
- '''%argv[0]
- try:
- min = 0
- max = 0
- file = None
- caracteres = None
- opts,args = getopt(argv[1:],"m: x: o: c:")
- for opt, a in opts:
- if opt == "-m": min = a
- if opt == "-x": max = a
- if opt == "-o": file = a
- if opt == "-c": caracteres = a
- if min > max: banner();exit(1)
- if caracteres == None: banner();exit(1)
- if file == None: banner();exit(1)
- arq = open(file,"w")
- caracteres = list(str(caracteres))
- print '\n[*] Gerando wordlist ...\n'
- for n in range(int(min),int(max)+1):
- for w in product(caracteres,repeat=n):
- word = ''.join(w)
- arq.write("%s\n"%word)
- print '[+] Wordlist gerada !!!\n[+] Arquivo => %s\n'%file
- arq.close()
- except:
- exit(1)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement