Last active
September 17, 2021 20:36
-
-
Save hc0d3r/6045071 to your computer and use it in GitHub Desktop.
Gerador de Wordlist
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment