-
Notifications
You must be signed in to change notification settings - Fork 0
/
wlistgen.py
173 lines (153 loc) · 6.05 KB
/
wlistgen.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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
import sys
def home_logo():
print("""
#### ## ## ### ##### ####### #######
## ## ## ## ## ## ## ## ## ## ##
## ## ## ## ## ## ## ## ## ## ##
## ######### ## ## ## ## ####### ########
## ## ## ######### ## ## ## ## ##
## ## ## ## ## ## ## ## ## ## ##
#### ## ## ## ## ##### ####### #######
IHA089: Navigating the Digital Realm with Code and Security - Where Programming Insights Meet Cyber Vigilance.
""")
def single_combo(name, characters, file, total, flag):
for char in characters:
cpass1=name+char
if flag == True:
cpass2=char+name
file.write(cpass1+"\n"+cpass2+"\n")
total+1
else:
file.write(cpass1+"\n")
total=total+1
return total
def double_combo(name, characters, file, total, flag):
for char1 in characters:
for char2 in characters:
cpass1=name+char1+char2
if flag == True:
cpass2=char1+char2+name
file.write(cpass1+"\n"+cpass2+"\n")
total = total+1
else:
file.write(cpass1+"\n")
total=total+1
return total
def triple_combo(name, characters, file, total, flag):
for char1 in characters:
for char2 in characters:
for char3 in characters:
cpass1=name+char1+char2+char3
if flag == True:
cpass2=char1+char2+char3+name
file.write(cpass1+"\n"+cpass2+"\n")
total=total+1
else:
file.write(cpass1+"\n")
total=total+1
return total
def fourth_combo(name, characters, file, total, flag):
for char1 in characters:
for char2 in characters:
for char3 in characters:
for char4 in characters:
cpass1=name+char1+char2+char3+char4
if flag == True:
cpass2=char1+char2+char3+char4+name
file.write(cpass1+"\n"+cpass2+"\n")
total=total+1
else:
file.write(cpass1+"\n")
total=total+1
return total
def fifth_combo(name, characters, file, total, flag):
for char1 in characters:
for char2 in characters:
for char3 in characters:
for char4 in characters:
for char5 in characters:
cpass1=name+char1+char2+char3+char4+char5
if flag == True:
cpass2=char1+char2+char3+char4+char5+name
file.write(cpass1+"\n"+cpass2+"\n")
total=total+1
else:
file.write(cpass1+"\n")
total=total+1
return total
def Main():
try:
name = input("Enter target name(Ex. john) :::")
name = name[0].lower() + name[1:]
try:
name = int(name)
print("Please enter string not integer")
sys.exit()
except ValueError:
pass
wordlist_name = input("Enter wordlist name ::: ")
Name=name.capitalize()
characters = ['1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '!', '@', '#', '$']
print("Char List ::: ", end="")
for c in characters:
print("{} ".format(c), end="")
print()
check = input("Do you want to add more characters in char List[y/n] ::: ")
if check == "y" or check == "Y":
more_char = input("Enter characters by commas(Ex. : ^,&,*,) ::: ")
if "," not in more_char and len(more_char) > 1:
print("Please enter comma between each character")
sys.exit()
else:
chars = more_char.split(",")
for cc in chars:
if cc not in characters:
characters.append(cc)
print("New Char List ::: ", end="")
for c in characters:
print("{} ".format(c), end="")
print()
else:
pass
check = input("Do you want to remove characters from char list[y/n] ::: ")
if check == "y" or check == "Y":
rm_char = input("Enter characters by commas(Ex. : 1,2,@,#) ::: ")
if "," not in rm_char and len(rm_char) > 1:
print("Please enter comma between each character")
sys.exit()
else:
chars = rm_char.split(",")
for cc in chars:
if cc in characters:
characters.remove(cc)
print("New Char List ::: ", end="")
for c in characters:
print("{} ".format(c), end="")
print()
else:
pass
check = input("Do you want to use special characters before target name[y/n] ::: ")
if check == "y" or check == "Y":
flag = True
else:
flag = False
except KeyboardInterrupt:
print("\nExit by user....")
sys.exit()
file = open(wordlist_name, 'w')
i=0
i=single_combo(name, characters, file, i, flag)
i=single_combo(Name, characters, file, i, flag)
i=double_combo(name, characters, file, i, flag)
i=double_combo(Name, characters, file, i, flag)
i=triple_combo(name, characters, file, i, flag)
i=triple_combo(Name, characters, file, i, flag)
i=fourth_combo(name, characters, file, i, flag)
i=fourth_combo(Name, characters, file, i, flag)
i=fifth_combo(name, characters, file, i, flag)
i=fifth_combo(Name, characters, file, i, flag)
file.close()
print("Total Password generated ::: {}".format(i))
if __name__ == "__main__":
home_logo()
Main()