-
Notifications
You must be signed in to change notification settings - Fork 0
/
PyCrunx.py
84 lines (66 loc) · 2.5 KB
/
PyCrunx.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
#! python3
# remember that changing the name doesn't make you the programmer :)
import random
import os
from optparse import *
import time
import platform
import string
import playsound
if platform.system() == "Linux" :
os.system("clear")
elif platform.system() == "Windows" :
os.system("cls")
def colors():
W = '\033[0m' # white (default)
R = '\033[1;31m' # red
G = '\033[1;32m' # green bold
O = '\033[1;33m' # orange
B = '\033[1;34m' # blue
P = '\033[1;35m' # purple
C = '\033[1;36m' # cyan
GR = '\033[1;37m' # gray
colors()
def banner():
print(""" \033[1;36m
____ ______
/ __ \__ __/ ____/______ ______ _ __
/ /_/ / / / / / / ___/ / / / __ \| |/_/
/ ____/ /_/ / /___/ / / /_/ / / / /> <
/_/ \__, /\____/_/ \__,_/_/ /_/_/|_|
/____/ Author : ZetSu
""")
banner()
print('\033[1;32m'+"\n")
parser = OptionParser("""Usage : PyCrunx.py -c To use Characters -l length of password -o Wordlist name
Example : PyCrunx.py -c abcd1234 -l 8 -o wordlist """)
if platform.system() == "Linux" :
print(text.replace("\w"),("/w"))
parser.add_option('-c','--Characters',dest='characters',metavar=' ',type=str,help='To use characters')
parser.add_option('-l','--Length',dest='length',metavar=' ',type=int,help='Length of passwords')
parser.add_option('-o','--output',dest='output',metavar=' ',type=str,help="Wordlist's name")
options,args = parser.parse_args()
if options.characters == None and options.length == None and options.output == None:
print(parser.usage)
else :
def passwords(length=options.length):
characters = options.characters
return ''.join(random.choice(characters) for i in range(length))
file = open(options.output+".txt", "w")
file.write(options.characters+"\n")
file.write(options.characters[::-1]+"\n")
num = 0
while num < len(options.characters)*options.length :
num += 1
file = open(options.output+".txt", "a")
file.write(passwords()+"\n")
file.close()
lines = options.length*len(options.characters)
filesize = str(os.path.getsize(options.output+".txt"))
time.sleep(0.3)
print("""\033[1;33m
Your wordlist has been successfully saved as """+options.output+".txt"+"""
Number of lines :"""+" "+str(lines)+"""
Wordlist size :"""+" "+str(filesize)+" KB")
print('\033[1;32m')
playsound.playsound('sound.wav')