-
Notifications
You must be signed in to change notification settings - Fork 13
/
generator.py
57 lines (42 loc) · 1.51 KB
/
generator.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
import itertools
"""
This code is licensed under QPL-1.0.
You CAN:
- Distribute
- Modify
You CANNOT:
- Commercial Use
You MUST:
- Include copyright
- Include license
- Disclose source
Source code can be found here:
https://git.landon.pw/r/social-checker
"""
# Character set (Modify to meet your website's requirements)
# 0-9, a-z
alphabet0 = ["1", "2", "3", "4", "5", "6", "7", "8", "9", "0", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j",
"k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z"]
# a-z
alphabet1 = ["a", "b", "c", "d", "e", "f", "g", "h", "i", "j",
"k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z"]
# 0,9, a-z, _
alphabet2 = ["_", "1", "2", "3", "4", "5", "6", "7", "8", "9", "0", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j",
"k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z"]
# a-z, _
alphabet3 = ["_", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j",
"k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z"]
# Which alphabet should the generator use?
alphabet = alphabet1
# How many character combinations should you generate?
# ie; 3 would be every 3 character combination.
repeat = 4
# The filename to output to.
filename = "generated.txt"
keywords = [''.join(i) for i in itertools.product(alphabet, repeat=repeat)]
file = open(filename, "w+")
file.close()
for word in keywords:
file = open(filename, "a")
file.write(word + "\n")
file.close()