-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathword.py
More file actions
68 lines (57 loc) · 1.95 KB
/
Copy pathword.py
File metadata and controls
68 lines (57 loc) · 1.95 KB
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
import itertools
import hashlib
import string
import sys
def generate_wordlist():
# --- Branding & Header ---
banner = """
======================================
🚀 NAME: WORDLIST GENERATOR
👤 AUTHOR: whitedevil21 (Amit Devi)
======================================
"""
print(banner)
# 1. Choose Character Set
print("[1] Numeric (0-9)")
print("[2] Alphabetic (a-z, A-Z)")
print("[3] Alphanumeric (a-z, 0-9)")
print("[4] Full (Special Characters)")
choice = input("\n➥ Select character set: ")
if choice == '1':
chars = string.digits
elif choice == '2':
chars = string.ascii_letters
elif choice == '3':
chars = string.ascii_lowercase + string.digits
else:
chars = string.ascii_letters + string.digits + string.punctuation
# 2. Set Length
try:
length = int(input("➥ Enter word length (e.g., 4): "))
except ValueError:
print("Invalid length. Defaulting to 3.")
length = 3
# 3. Hashing Option
print("\n[0] Plaintext")
print("[1] MD5")
print("[2] SHA-256")
hash_choice = input("➥ Select hashing option: ")
filename = input("➥ Enter output filename: ")
# 4. Generation Logic
print(f"\n[*] Amit Devi's script is working... please wait.")
try:
with open(filename, 'w') as f:
for combo in itertools.product(chars, repeat=length):
word = "".join(combo)
if hash_choice == '1':
res = hashlib.md5(word.encode()).hexdigest()
elif hash_choice == '2':
res = hashlib.sha256(word.encode()).hexdigest()
else:
res = word
f.write(res + '\n')
print(f"\n[+] Success! saved to {filename}")
except Exception as e:
print(f"\n[!] Error: {e}")
if __name__ == "__main__":
generate_wordlist()