Created
May 17, 2013 23:38
-
-
Save hc0d3r/5602634 to your computer and use it in GitHub Desktop.
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 | |
# By MMxM | |
from itertools import product | |
from sys import argv,exit | |
print '[+] Programa para gerar todas as combinacoes possiveis\nCom elementos de uma lista\n' | |
if(len(argv) != 4): | |
print '[*] Modo de uso: %s <caracteres> <minimo> <maximo>'%argv[0] | |
print '[*] Exemplo: %s abc 1 3'%argv[0] | |
exit(1) | |
l = list(argv[1]) | |
mi = int(argv[2]) | |
ma = int(argv[3]) | |
for n in range(mi,ma+1): | |
for c in product(l,repeat=n): | |
s = ''.join(c) | |
print s |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment