-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathwordlist.py
52 lines (44 loc) · 1.49 KB
/
wordlist.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
#!/usr/bin/env python3
#github.com/intrackeable
#Simple wordlist generator USER:PASSWORD format
import pyfiglet
import os
from colorama import Fore
global green, red, blue
green = Fore.GREEN
red = Fore.RED
blue = Fore.CYAN
def open_file(file_list):
with open (file_list,'r') as file:
credentials = file.read().split('\n')
credentials = [x for x in credentials if x != '']
return credentials
def generate_wordlist(user_list,pass_list,wordlist):
for i in user_list:
for x in pass_list:
generate_file(i,x,wordlist)
def generate_file(user,password,wordlist):
with open(wordlist,'a') as file:
file.write(user + ':' + password + '\n')
def display_banner():
os.system('clear')
draw = pyfiglet.figlet_format('WORDLISTGEN',font='bubble')
print(blue + draw)
print('{}Welcome to WORDLISTGEN, a simply script to make wordlist in USER:PASS format!'.format(green))
def main():
try:
display_banner()
users = input('USERS FILE: ')
passwords = input('PASSWORDS FILE: ')
wordlist = input('WORDLIST NAME: ')
if (users == '' or passwords == '' or wordlist == ''):
print('{}INVALID DATA, TRY IT AGAIN!'.format(red))
exit()
else:
user_list = open_file(users)
pass_list = open_file(passwords)
generate_wordlist(user_list,pass_list,wordlist)
except KeyboardInterrupt:
print('\n{}CLOSING PROGRAM'.format(red))
if __name__ == '__main__':
main()