Skip to content

Commit 50c2b2b

Browse files
authored
Merge pull request Python-World#81 from madhavmehndiratta/wordlistGenerator
Passwords List Generator
2 parents 6fcd3bb + 11902af commit 50c2b2b

File tree

3 files changed

+46813
-0
lines changed

3 files changed

+46813
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Custom Wordlist Generator
2+
3+
As you Know that when you perform a Brute-Force attack you need to have wordlist that has multiple passwords. Most of the wordlist available in the internet is made up of random possible passwords. But think of a situation where you need to exploit a person whose password is related to his pet's name like Schmuserkadser(Famous meme of the crying cat). In that situation, there is a very less chance that you are gonna find a wordlist containing the specific pet's name. So this program will help you to solve this task!
4+
5+
## How to run the script
6+
7+
```
8+
python3 main.py
9+
```
10+
11+
## PoC
12+
13+
[![asciicast](https://asciinema.org/a/pYHj8vu1zQ6t4SYgAVpAaDzT2.png)](https://asciinema.org/a/pYHj8vu1zQ6t4SYgAVpAaDzT2)
14+
15+
16+
## Author name
17+
<a href="https://github.com/madhavmehndiratta">Madhav Mehndiratta</a>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
'''
2+
This program takes keywords as input and then joins them to create a wordlist.
3+
'''
4+
5+
def get_information():
6+
information = []
7+
information.append(input("Enter victim's First name: "))
8+
information.append(input("Enter victim's Second name: "))
9+
information.append(input("Enter victim's Nickname: "))
10+
information.append(input("Enter Birth Year: "))
11+
information.append(input("Enter Birth Month: "))
12+
13+
more = input("Would you like to add more information? [y/N]: ")
14+
if more.lower() == 'y':
15+
more_info = input("Enter related keywords separated by commas: ").replace(" ", "")
16+
info_list = more_info.split(",")
17+
for element in info_list:
18+
information.append(element)
19+
leet_mode = input("Would you like to enable leet mode? (Eg: hacker = h4ck3r) [Y/N]: ")
20+
if leet_mode.lower() == 'y':
21+
leet_mode = "1"
22+
elif leet_mode.lower() == 'n':
23+
leet_mode = "0"
24+
else:
25+
print("[-] Incorrect value. Enabling by default...")
26+
leet_mode = "1"
27+
28+
file_name = input("Enter the name of the output file: ")
29+
return information, leet_mode, file_name
30+
31+
# Code for Leet mode (Example: hacker = h4ck3r) [This replaces all common letters with identical numbers]
32+
def leet_mod(list1):
33+
list2 = []
34+
for element in list1:
35+
list2.append(element.replace('a', '4'))
36+
list2.append(element.replace('i', '1'))
37+
list2.append(element.replace('o', '0'))
38+
list2.append(element.replace('e', '3'))
39+
list2.append(element.replace('t', '7'))
40+
list2.append(element.replace('A', '4'))
41+
list2.append(element.replace('i', '1'))
42+
list2.append(element.replace('E', '3'))
43+
list2.append(element.replace('T', '7'))
44+
list2.append(element.replace('O', '0'))
45+
list3 = list1 + list2
46+
return list3
47+
48+
def make_wordlist(information, file_name,):
49+
with open(file_name, 'w') as wordlist:
50+
for element in information:
51+
wordlist.write(element + '\n')
52+
wordlist.write(element.lower() + '\n')
53+
wordlist.write(element.upper() + '\n')
54+
for element2 in information:
55+
wordlist.write(element.lower() + element2 + '\n')
56+
wordlist.write(element.upper() + element2 + '\n')
57+
wordlist.write(element.upper() + element2.lower() + '\n')
58+
wordlist.write(element.lower() + element2.lower() + '\n')
59+
wordlist.write(element.lower() + element2.upper() + '\n')
60+
wordlist.write(element.upper() + element2.upper() + '\n')
61+
62+
63+
(information, leet_mode, file_name) = get_information()
64+
if leet_mode == "1":
65+
information = leet_mod(information)
66+
make_wordlist(information, file_name)
67+
68+
print("Wordlist Generated Successfully!")

0 commit comments

Comments
 (0)