-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCustom Wordlist Generator
More file actions
136 lines (110 loc) · 4.52 KB
/
Copy pathCustom Wordlist Generator
File metadata and controls
136 lines (110 loc) · 4.52 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
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
import itertools
import string
# Function to generate a custom wordlist based on user input
def generate_wordlist(target_name, target_date, custom_terms=None):
"""
Generate a wordlist based on the target information.
:param target_name: The target's name or domain
:param target_date: Specific year or date related to the target
:param custom_terms: Additional custom terms (e.g., company name, product name)
:return: A list of generated words
"""
wordlist = set()
# Basic wordlist based on target name and date
wordlist.add(target_name.lower())
wordlist.add(target_name.upper())
wordlist.add(target_name.title())
# Add variations using the target's year or date
wordlist.add(target_date)
wordlist.add(target_date.replace('-', '')) # Remove dashes if date is in YYYY-MM-DD format
# Create combinations of target name and date
wordlist.add(f"{target_name}{target_date}")
wordlist.add(f"{target_date}{target_name}")
# Generate wordlist with custom terms (if provided)
if custom_terms:
for term in custom_terms:
wordlist.add(term.lower())
wordlist.add(term.upper())
# Generate common passwords based on the target information
common_passwords = [
target_name.lower(), f"{target_name}{target_date}", f"{target_date}{target_name}",
f"{target_name}123", f"{target_name}2024", f"{target_date}123", "password", "123456", "qwerty"
]
wordlist.update(common_passwords)
# Generate permutations (e.g., target_name + numbers or special characters)
for i in range(1, 5): # You can change the range to generate more combinations
wordlist.update([f"{target_name}{i}", f"{target_name}{i}{string.punctuation[i % len(string.punctuation)]}"])
return wordlist
# Function to save the generated wordlist to a file
def save_wordlist(wordlist, filename="custom_wordlist.txt"):
"""
Save the generated wordlist to a file.
:param wordlist: The set of generated words
:param filename: The name of the file where the wordlist will be saved
"""
with open(filename, "w") as f:
for word in wordlist:
f.write(f"{word}\n")
print(f"Wordlist saved as {filename}")
# Main function to generate and save the wordlist
def main():
print("Custom Wordlist Generator")
# Input from the user
target_name = input("Enter the target name (e.g., company name or domain): ").strip()
target_date = input("Enter a target-related date (e.g., year, or YYYY-MM-DD): ").strip()
custom_terms_input = input("Enter custom terms (comma-separated): ").strip()
# Process custom terms into a list
custom_terms = custom_terms_input.split(',') if custom_terms_input else None
# Generate the wordlist
wordlist = generate_wordlist(target_name, target_date, custom_terms)
# Save the wordlist to a file
save_wordlist(wordlist)
if __name__ == "__main__":
main()
How it Works:
Target Information:
The script asks for the target's name (e.g., a domain or company name) and a relevant date (e.g., a founding year).
It also allows the input of additional custom terms (e.g., product names or project codes).
Wordlist Generation:
The script generates multiple variations based on the target name and date.
It includes common password combinations and variations using numbers and special characters.
Saving Wordlist:
The wordlist is saved to a file named custom_wordlist.txt by default.
Each word in the wordlist is written to a new line in the text file.
Output:
The user can generate a wordlist that incorporates relevant terms and variations, which can be used for brute-forcing login pages, directories, and APIs.
Example Output of Generated Wordlist:
python
Copy code
companyname
Companyname
COMPANYNAME
2024
2024-01-01
companyname2024
2024companyname
companyname123
companyname2024
2024123
companyname2024!
companyname1
companyname2!
password
123456
qwerty
companyname1!
companyname2!
...
Running the Script:
Save this script to a Python file (e.g., custom_wordlist_generator.py).
Run it in the terminal:
bash
Copy code
python custom_wordlist_generator.py
Input the target name, target date, and any custom terms when prompted.
The script will generate a wordlist and save it to custom_wordlist.txt.
How to Add this to Your Portfolio:
Upload the script to your GitHub repository.
In your portfolio project section, link to this repository with a "View Code" button.
Optionally, you can include a screenshot or demo video of the tool in action.
Let me know if you need any further adjustments or clarifications!