├── commonPhrases.txt
├── birthday.txt
├── default.conf
├── keywords.txt
├── settings_default.conf
├── formats_default.conf
├── functions.txt
├── README.md
└── pwdlogy.py
/commonPhrases.txt:
--------------------------------------------------------------------------------
1 | ilove
--------------------------------------------------------------------------------
/birthday.txt:
--------------------------------------------------------------------------------
1 | # Add the victim's birthday
2 | # You can also add multiple birthdays
3 | # E.g. Family members's birthday/Friend's birthday/Pet's birthday
4 | # Format: DDMMYYYY
5 |
6 | 01022003
--------------------------------------------------------------------------------
/default.conf:
--------------------------------------------------------------------------------
1 | # Defaults, changing this will change the default format and settings put into place
2 | # Feel free to replace it with your own settings file and formats file
3 | # Be aware of erroneous files
4 | format = formats_default.conf
5 | settings = settings_default.conf
--------------------------------------------------------------------------------
/keywords.txt:
--------------------------------------------------------------------------------
1 | # Place your keywords here
2 | # Try to include things that the person likes and his close ones etc.
3 | # This is where social engineering comes in!
4 | # Find out his/her usernames, hobbies, fav. items (games,food,etc), close ones' names
5 | # Good luck!
6 |
7 | a
8 | b
9 | c
--------------------------------------------------------------------------------
/settings_default.conf:
--------------------------------------------------------------------------------
1 | fastMode False
2 | useCommon True
3 | useBirthday True
4 | useLeet True
5 | showAttempts False
6 | genDictName gen.txt
7 | keywordsFileName keywords.txt
8 | formatsFileName formats_default.conf
9 | commonFileName commonPhrases.txt
10 | specialCharList ! ? @ * $ #
11 | numList 0 1 2 3 4 5 6 7 8 9
12 | characterList 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
13 | leetReplacements e 3
14 | leetReplacements o 0
15 | leetReplacements a 4
--------------------------------------------------------------------------------
/formats_default.conf:
--------------------------------------------------------------------------------
1 | # default formats for password generation
2 | # Recommended: if you wish to create new custom formats,
3 | # for full effectiveness, please consider adding on
4 | # instead of replacing the entire list
5 | # =====================================================================
6 | # This list is supposed to be read-only
7 | # If you wish to generate your own list, please use the custom command
8 | # to duplicate this list and you can add on from there.
9 | # after doing so, change the formatsFile via the 'set' command
10 | # refer to README.md or github for more details
11 |
12 | k
13 | K
14 | kn
15 | Kn
16 | ks
17 | Ks
18 | knn
19 | Knn
20 | kns
21 | Kns
22 | ksn
23 | Ksn
24 | kss
25 | Kss
26 | knnn
27 | Knnn
28 | knns
29 | Knns
30 | knsn
31 | Knsn
32 | knss
33 | Knss
34 | ksnn
35 | Ksnn
36 | ksns
37 | Ksns
38 | kssn
39 | Kssn
40 | ksss
41 | Ksss
42 | knnns
43 | Knnns
44 | knnss
45 | Knnss
46 | lk
47 | lK
48 | lkn
49 | lKn
50 | lks
51 | lKs
52 | lknn
53 | lKnn
54 | lkns
55 | lKns
56 | lksn
57 | lKsn
58 | lkss
59 | lKss
60 | lknnn
61 | lKnnn
62 | lknns
63 | lKnns
64 | lknsn
65 | lKnsn
66 | lknss
67 | lKnss
68 | lksnn
69 | lKsnn
70 | lksns
71 | lKsns
72 | lkssn
73 | lKssn
74 | lksss
75 | lKsss
76 | lknnns
77 | lKnnns
78 | lknnss
79 | lKnnss
80 | kB
81 | KB
82 | B
83 | r
84 | R
85 | rn
86 | Rn
87 | rnn
88 | Rnn
89 | rns
90 | Rns
91 | rnnn
92 | Rnnn
93 | fast:break:slow
94 | # This indicates the separation of faster combination from slower combinations
95 | # Enabling Fast-Mode will cause wordlist generation to stop here
96 | kk
97 | Kk
98 | kkn
99 | Kkn
100 | kks
101 | Kks
102 | kknn
103 | Kknn
104 | kkns
105 | Kkns
106 | kksn
107 | Kksn
108 | kkss
109 | Kkss
110 | kknnn
111 | Kknnn
112 | kknns
113 | Kknns
114 | kknsn
115 | Kknsn
116 | kknss
117 | Kknss
118 | kksnn
119 | Kksnn
120 | kksns
121 | Kksns
122 | kkssn
123 | Kkssn
124 | kksss
125 | Kksss
126 | kknnns
127 | Kknnns
128 | kknnss
129 | Kknnss
130 | lkk
131 | lKk
132 | lkkn
133 | lKkn
134 | lkks
135 | lKks
136 | lkknn
137 | lKknn
138 | lkkns
139 | lKkns
140 | lkksn
141 | lKksn
142 | lkkss
143 | lKkss
144 | lkknnn
145 | lKknnn
146 | lkknns
147 | lKknns
148 | lkknsn
149 | lKknsn
150 | lkknss
151 | lKknss
152 | lkksnn
153 | lKksnn
154 | lkksns
155 | lKksns
156 | lkkssn
157 | lKkssn
158 | lkksss
159 | lKksss
160 | lkknnns
161 | lKknnns
162 | lkknnss
163 | lKknnss
164 | kkB
165 | KkB
166 | lkkB
167 | lKkB
--------------------------------------------------------------------------------
/functions.txt:
--------------------------------------------------------------------------------
1 | ++++
2 | 'k' for keyword
3 | Calling this format character will to append all the strings in the keywords list
4 |
5 | Example:
6 | Keywords = ['hello','world','the','quick','brown','fox']
7 |
8 | Generating wordlist with format 'k'
9 | hello
10 | world
11 | the
12 | quick
13 | brown
14 | fox
15 |
16 | ++++
17 | 'K' for keyword (first letter capital)
18 | As most people will capitalise the first letter when told to have capital letters,
19 | this format character will go through all the strings in the keywords list and append them with
20 | the first letter capitalised
21 |
22 | Example:
23 | Keywords = ['hello','world','the','quick','brown','fox']
24 |
25 | Generating wordlist with format 'K'
26 | Hello
27 | World
28 | The
29 | Quick
30 | Brown
31 | Fox
32 |
33 | ++++
34 | 'a' for alternate capitalisation
35 | This format characer capitalises alternate characters throughout the entire wordlist and appends them
36 |
37 |
38 | Example:
39 | Keywords = ['hello','world']
40 |
41 | Generating wordlist with format 'a'
42 | HeLlO
43 | hElLo
44 | WoRlD
45 | wOrLd
46 |
47 | ++++
48 | 'b' for simple birthday
49 | This format character will append all birthdays
50 |
51 | Example:
52 | Birthdays = [['01','02','03,'2003']] #DD,MM,YY,YYYY
53 |
54 | Generating wordlist with format 'b'
55 | 01
56 | 02
57 | 03
58 | 2003
59 |
60 | ++++
61 | 'B' for complex birthday
62 | This format character will append all possible birthday combinations of 1,2,3 and 4 birthdays together
63 | WARNING: This generates a lot of combinations (~340), appending it to any format might cause huge wait time
64 |
65 | Example:
66 | Birthdays = [['01','02','03','2003']]
67 |
68 | Generating wordlist with format 'B'
69 | 01 #start of 1 birthday combo
70 | 02
71 | 03
72 | 2003
73 | 0101 #start of 2 birthday combo
74 | 0102
75 | 0103
76 | ...
77 | 200302
78 | 200303
79 | 20032003
80 | 010101 #start of 3 birthday combo
81 | 010102
82 | 010103
83 | 01012003
84 | 010201
85 | 010202
86 | 010203
87 | 01022003
88 | ...
89 | 2003200301
90 | 2003200302
91 | 2003200303
92 | 200320032003
93 | 01010101 #start of 4 birthday combo
94 | 01010102
95 | 01010103
96 | 0101012003
97 | 01010201
98 | 01010202
99 | 01010203
100 | 0101022003
101 | 01010301
102 | 01010302
103 | 01010303
104 | ...
105 | 200320030302
106 | 200320030303
107 | 20032003032003
108 | 20032003200301
109 | 20032003200302
110 | 20032003200303
111 | 2003200320032003
112 |
113 | ++++
114 | 's' for special character
115 | This format character appends all the characters in the special characters list
116 |
117 | Example:
118 | Special Characters = ['!','?','@','#','$']
119 |
120 | Generating wordlist with format 's'
121 | !
122 | ?
123 | @
124 | #
125 | $
126 |
127 | ++++
128 | 'n' for number
129 | This format character appends all numbers (stored as strings though) in the numbers list
130 |
131 | Example:
132 | Numbers = ['1','2','3']
133 |
134 | Generating wordlist with format 'n'
135 | 1
136 | 2
137 | 3
138 |
139 | ++++
140 | 'r' for reverse word
141 | This format character appends all the words in the keywords list in reverse letter order
142 |
143 | Example:
144 | Keywords = ['hi','bye','cool']
145 |
146 | Generating wordlist with format 'r'
147 | ih
148 | eyb
149 | looc
150 |
151 | ++++
152 | 'R' for reverse word (first letter capitalise)
153 | This format character appends all the words in the keywords list in reverse letter order
154 | With the first character capitalised
155 |
156 | Example:
157 | Keywords = ['hi','bye','cool']
158 |
159 | Generating wordlist with format 'R'
160 | Ih
161 | Eyb
162 | Looc
163 |
164 |
165 | ++++
166 | 'c' for character
167 | This format character appends all the characters in the characters list
168 |
169 | Example:
170 | Keywords = ['a','b','c']
171 |
172 | Generating wordlist with format 'c'
173 | a
174 | b
175 | c
176 |
177 |
178 | ++++
179 | 'C' for capitalised character
180 | This format character appends all the characters in the characters list capitalised
181 |
182 | Example:
183 | Keywords = ['a','b','c']
184 |
185 | Generating wordlist with format 'c'
186 | A
187 | B
188 | C
189 |
190 |
191 | ++++
192 | '_' for underscore
193 | This format character appends an underscore
194 |
195 | Example:
196 | Keywords = ['a','b','c']
197 |
198 | Generating wordlist with format 'k_k'
199 | a_a
200 | a_b
201 | a_c
202 | b_a
203 | b_b
204 | b_c
205 | ...
206 | c_c
207 |
208 | ++++
209 | 'l' for l33t
210 | This format character influences the whole generated word to be l33ted
211 | *Leet Replacements can be changed*
212 |
213 | Example:
214 | Keywords = ['a', 'b', 'o']
215 | Leet Replacements = [(o,0),(e,3)]
216 |
217 | Generating wordlist with format 'lkk'
218 | aa
219 | 44
220 | ab
221 | 4b
222 | ao
223 | 40
224 | ba
225 | b4
226 | bb
227 | bo
228 | b0
229 | oa
230 | 04
231 | ob
232 | 0b
233 | oo
234 | 00
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | #Pwdlogy - Powerful Target Specific Passwords Profiler
2 |
3 | A target specific wordlist generating tool for social engineers and security researchers! You can create wordlists based on keywords about the person's interests, favourite food, games, closed ones' birthday and names, and even combine them with special characters and numbers to create a highly-target-specific wordlist! It is also fully customisable so you can add your own special characters, numbers, keywords, birthdays, create your own settings, and even password formats. Hope you find this tool useful!
4 |
5 | Link to Blog: [tch1001.wordpress.com](https://tch1001.wordpress.com/)
6 | Example Walkthrough: [https://tch1001.wordpress.com/2016/11/23/pwdlogy-example-walkthrough/](https://tch1001.wordpress.com/2016/11/23/pwdlogy-example-walkthrough/)
7 |
8 | **Disclaimer:**
9 | **Please do not use in military or secret service organizations, or for illegal purposes. The tool here is only used for educational purposes only. I will not be held responsible for any illegal activities conducted with this. Enjoy!**
10 | ##Installation
11 | Pwdlogy is based on the programming language python (version 3). As such, Python 3 will need to be installed.
12 | ###Linux/Mac/Windows
13 | To start using pwdlogy, change directory into the project folder.
14 |
15 | cd pwdlogy-master
16 |
17 | Then use the following command to run the python script
18 |
19 |
20 |
21 | python pwdlogy.py
22 |
23 | You will see a console like this
24 |
25 | pwdlogy >
26 |
27 | **Note: When running on windows, built-in commands like `cls` (or `clear` on linux/mac), `dir` (or `ls`), `cd`, do not work.**
28 | ##How to Use
29 | Example Walkthrough: [https://tch1001.wordpress.com/2016/11/23/pwdlogy-example-walkthrough/](https://tch1001.wordpress.com/2016/11/23/pwdlogy-example-walkthrough/)
30 |
31 | 1. Find out the victim's name, username, hobbies, sports team, favourite food, and everything you can find out about him that might appear in his/her password
32 | 2. Find out as much as possible about his pets, family, friends (e.g. their name, birthday, and any keyword that might appear in his/her password
33 | 3. Place all the keywords (not the birthdays) into the `keywords.txt` file, with each keyword separated by a next line.
34 | 4. Place all the birthdays into the `birthday.txt` file, with each password being in the format (DDMMYYYY) and separated by a next line.
35 | 5. If you are fairly new to this tool, enter `start` and navigate to the `gen.txt` file (or whatever file if you have changed the settings) to see the generated wordlist. `Go to 8`
36 | 6. If you wish to use custom settings, use the `custom` command and follow the instructions displayed. Edit the custom formats file and when you are done, run the command `start` to begin generating the wordlist.
37 | 7. Check the `gen.txt` file to see the generated wordlist.
38 | 8. The wordlist generated will contain possible passwords of your victim. Use the wordlist with any password cracker. Good luck!
39 | ##Commands
40 |
41 | ###set -- change settings
42 | The `set` command allows you to change the settings for each list generation session.
43 |
44 | usage: set
45 |
46 | The available settings include:
47 |
48 | #####genDictName -- Generated Dictionary File Name
49 | #####keywordsFile -- Keywords File Name
50 | #####commonPhrases -- Common Phrases File Name
51 | #####formatsFile -- Formats File Name
52 | #####birthdaysFile -- Birthdays File Name
53 | #####useBirthday -- Use birthday
54 | #####showAttempts -- display generated words on console
55 | #####includeCommon -- Use common phrases
56 | #####fastMode -- Use Fast Mode
57 | #####spchar -- Special Characters set
58 | #####numbers -- Numbers set
59 | #####alphabet -- Alphabets set
60 | #####l33t -- L33t set
61 | #####help -- display help menu
62 |
63 | ###start -- generate wordlist
64 | Calling `start` will cause pwdlogy to begin and the wordlist generated will be in the same directory with the name determined by the variable `genDictName`
65 |
66 | ###settings -- display current settings
67 |
68 | usage: settings
69 |
70 | Descriptors
71 |
72 | #####all -- all settings
73 | #####files -- I/O file settings
74 | #####util -- utilities settings
75 | #####fast -- fast mode settings
76 | #####charsets -- all sets settings
77 | #####spchar -- special character set settings
78 | #####num -- number set settings
79 | #####char -- character set settings
80 | #####l33t -- l33t set settings
81 | #####help -- display help menu
82 |
83 | ###save -- save current settings
84 |
85 | usage: save
86 |
87 | `` will be the name of the settings file you want to create
88 |
89 | WARNING: This might override any existing file with the same name
90 | (Choose a filename that does not exist in your directory)
91 | ###load -- load settings from file
92 |
93 | usage: load
94 |
95 | `` will be the name of the settings file you want to load
96 |
97 |
98 | ###functions -- display available functions
99 |
100 | usage: functions
101 |
102 | Descriptors
103 |
104 | #####all -- description of all functions
105 | #####list -- list all functions
106 | #####`` -- description of the function (refer to list to see all functions)
107 | #####help -- display help menu
108 |
109 | ###help -- display help menu
110 | ###credits -- display credits
111 | ###custom -- custom parameters
112 |
113 | usage: custom
114 |
115 | `` will be the name of the file you want to store your custom formats
116 | The file will contain all the default formats, and is for you to add on the formats you wish to use
117 | It is recommended that you leave the 'formats_default.conf' file untouched,
118 | Changing it might result in incomplete formats and will affect the effectiveness of this program
119 |
120 | For more information on adding formats of your own, please visit the README.md or github
121 | Use the command 'set formatsFile ' to change the formats file for a session
122 |
123 | WARNING: This will override any existing file.
124 |
125 | ###Formats
126 | Pwdlogy makes use of formats specifiers to generate wordlists. For example, we have the following sets of info.
127 |
128 | Birthday = [['01','02','03','2003']]
129 | //Format DD,MM,YY,YYY
130 | Keywords = ['hi','bye']
131 |
132 | Then if we have the format as `kk`, we will create this list
133 |
134 | hihi
135 | hibye
136 | byehi
137 | byebye
138 | Note that all of the generated strings have the format
139 | ``, which is abbreviated as `kk`.
140 | Another example: If we have the format `kb`, which stands for simple birthday (there is a complex birthday too! Read more about it with the `functions B` command), then the generated wordlist will be
141 |
142 |
143 | hi01
144 | hi02
145 | hi03
146 | hi2003
147 | bye01
148 | bye02
149 | bye03
150 | bye2003
151 | Basically, the strings above are all the possibilities of the format ``, abbreviated as `kb`.
152 |
153 | The default formats which are in-built are
154 |
155 | k
156 | lk
157 | K
158 | lK
159 | ks
160 | Ks
161 | kb
162 | Kb
163 | kB
164 | KB
165 | b
166 | B
167 | r
168 | R
169 | fast:break:slow
170 | kk
171 | Kk
172 | kks
173 | Kks
174 | kkss
175 | Kkss
176 |
177 | Note: The `fast:break:slow` is a break in the file to show that the section on the bottom runs slower [`O(n^2)`]. When `fastMode` is enabled, the program will exclude the formats on the bottom.
178 |
179 | The list of formats are not proven to be ideal, and please feel free to change it. It is recommended that to do so,
180 |
181 | 1. Use the `custom ` command to create a duplicate of the default formats.
182 | 2. In the new file, append formats you believe will be useful.
183 | 3. Run the program with the `python pwdlogy.py` command.
184 | 4. Change the `formatsFile` to your new custom formats file with the `set formatsFile ` command.
185 | 5. Generate the wordlist with the `start` command.
186 | 6. When you rerun the script, `formatsFile` will be back to the default formats file name. In other words, the `set formatsFile ` command only sets the `formatsFile` for that particular session and will not affect the defaults.
187 | 7. To change the defaults, read the section on **changing defaults**.
188 |
189 |
190 |
191 | ###exit/quit -- exit console
192 |
193 | usage: exit
194 | usage: quit
195 |
196 | ###Changing Defaults
197 | To change defaults (which is not recommended unless you are very sure of what you are doing and have some experience with this tool), follow the steps below:
198 |
199 | 1. Go to the `default.conf` file and open it with a text editor of your choice.
200 | 2. You will see the following:
201 | `format = formats_default.conf`
202 | `settings = settings_default.conf`
203 | 3. To change it, simple replace the existing filename with the filename of your own formats or settings file.
204 | 4. E.g.
205 | `format = my_own_format.conf`
206 | `settings = my_own_settings.conf`
207 | 5. Now just rerun the program with `python pwdlogy.py` and the new settings and formats will be in place!
208 |
209 | ##
210 | **Disclaimer:**
211 | **Please do not use in military or secret service organizations, or for illegal purposes. The tool here is only used for educational purposes only. I will not be held responsible for any illegal activities conducted with this. Enjoy!**
212 | ##Dependencies
213 | - Python 3
214 |
215 |
216 | ####**Happy Social Engineering and Password Cracking!**
217 |
218 |
219 |
--------------------------------------------------------------------------------
/pwdlogy.py:
--------------------------------------------------------------------------------
1 | import os;
2 | import warnings
3 |
4 | print("\n\n");
5 | print("======================================================");
6 | print(" ___ _ _ ");
7 | print("| _ \__ __ __ __| || | ___ __ _ _ _ ");
8 | print("| _/\ V V // _` || |/ _ \/ _` || || |");
9 | print("|_| \_/\_/ \__,_||_|\___/\__, | \_, |");
10 | print(" |___/ |__/ ");
11 | # print(".______ ____ __ ____ _______ __ ______ ___________ ____");
12 | # print("| _ \ \ \ / \ / / | \ | | / __ \ / _____\ \ / /");
13 | # print("| |_) | \ \/ \/ / | .--. || | | | | | | | __ \ \/ / ");
14 | # print("| ___/ \ / | | | || | | | | | | | |_ | \_ _/ ");
15 | # print("| | \ /\ / | '--' || `----.| `--' | | |__| | | | ");
16 | # print("| _| \__/ \__/ |_______/ |_______| \______/ \______| |__| ");
17 | print("======================================================");
18 | print("\n\n");
19 | print("Disclaimer: ")
20 | print("Please do not use in military or secret service organizations, or for illegal purposes.");
21 | print("The tool here is only used for educational purposes only.");
22 | print("I will not be held responsible for any illegal activities conducted with this.");
23 | print("Enjoy! :D\n\n");
24 |
25 |
26 |
27 | fastMode = False
28 | useCommon = True
29 | useBirthday = True
30 | useLeet = True
31 | showAttempts = True
32 | genDictName = "gen.txt"
33 | keywordsFileName = "keywords.txt"
34 | formatsFileName = "formats_default.conf"
35 | birthdayFileName = "birthday.txt"
36 | defaultSettingsFileName = "settings_default.conf"
37 | commonFile = "commonPhrases.txt"
38 | birthday = ''
39 | birthdayList = []
40 |
41 |
42 | specialCharList = ["!","?","@","*","$","#"]
43 | numList = ['0','1','2','3','4','5','6','7','8','9']
44 | characterList = ['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']
45 |
46 | keywordsList = []
47 |
48 | commonFile = "commonPhrases.txt"
49 |
50 | leetReplacements = [
51 | ('a','4'),
52 | ('e','3'),
53 | ('o','0')
54 | ]
55 |
56 | writeFile = open(genDictName, 'w');
57 | keywordsFile = open(keywordsFileName, 'r');
58 | formatsFile = open(formatsFileName, 'r');
59 |
60 |
61 | def leet(raw):
62 | for old,new in leetReplacements:
63 | raw = raw.replace(old,new)
64 |
65 | return raw
66 |
67 |
68 | def attempt(word):
69 | if showAttempts:
70 | print("Attempting '"+word+"'");
71 | writeFile.write(word+"\n");
72 | if(useLeet):
73 | leeted = leet(word)
74 | if leeted == word:
75 | return;
76 | elif showAttempts:
77 | print("Attempting '"+leeted+"'");
78 | writeFile.write(leeted+"\n");
79 |
80 |
81 | def originalWords(pwdFormat,prefix, index):
82 | if(index>=len(pwdFormat)):
83 | attempt(prefix);
84 | return;
85 | elif(pwdFormat[index] == '_'):
86 | originalWords(pwdFormat, prefix+"_", index+1);
87 | elif(pwdFormat[index] == 'k'):
88 | for word in keywordsList:
89 | originalWords(pwdFormat,prefix+word,index+1);
90 | elif(pwdFormat[index] == 'K'):
91 | for word in keywordsList:
92 | originalWords(pwdFormat,prefix+word.title(),index+1);
93 | elif(pwdFormat[index] == 'a'):
94 | for word in keywordsList:
95 | originalWords(pwdFormat,prefix+alternateWord(word,0),index+1);
96 | originalWords(pwdFormat,prefix+alternateWord(word,1),index+1);
97 | elif(pwdFormat[index] == 'b'):
98 | for birthday in birthdayList:
99 | for dates in birthday:
100 | originalWords(pwdFormat,prefix+dates,index+1);
101 | elif(pwdFormat[index] == 'B'):
102 | birthdayComplex(pwdFormat,prefix,index+1);
103 | elif(pwdFormat[index] == 's'):
104 | for specialChar in specialCharList:
105 | originalWords(pwdFormat,prefix+specialChar,index+1);
106 | elif(pwdFormat[index] == 'n'):
107 | for number in numList:
108 | originalWords(pwdFormat,prefix+number,index+1);
109 | elif(pwdFormat[index] == 'r'):
110 | for word in keywordsList:
111 | originalWords(pwdFormat,prefix+word[::-1],index+1);
112 | elif(pwdFormat[index] == 'R'):
113 | for word in keywordsList:
114 | originalWords(pwdFormat,prefix+word[::-1].title(),index+1);
115 | elif(pwdFormat[index] == 'c'):
116 | for character in characterList:
117 | originalWords(pwdFormat,prefix+character,index+1);
118 | elif(pwdFormat[index] == 'C'):
119 | for character in characterList:
120 | originalWords(pwdFormat,prefix+character.title(),index+1);
121 |
122 |
123 |
124 | def birthdayComplex(pwdFormat,prefix, index):
125 | for wholeBirthday in birthdayList:
126 | for birthday in wholeBirthday:
127 | originalWords(pwdFormat,prefix+birthday, index+1);
128 | for birthday in wholeBirthday:
129 | for birthday2 in wholeBirthday:
130 | originalWords(pwdFormat,prefix+birthday+birthday2, index+1);
131 | for birthday in wholeBirthday:
132 | for birthday2 in wholeBirthday:
133 | for birthday3 in wholeBirthday:
134 | originalWords(pwdFormat,prefix+birthday+birthday2+birthday3,index+1);
135 | for birthday in wholeBirthday:
136 | for birthday2 in wholeBirthday:
137 | for birthday3 in wholeBirthday:
138 | for birthday4 in wholeBirthday:
139 | originalWords(pwdFormat,prefix+birthday+birthday2+birthday3+birthday4, index+1);
140 | def alternateWord(word, cap):
141 | index = 0;
142 | temp = "";
143 | for character in word:
144 | if index%2==cap:
145 | temp+=character.upper()
146 | else:
147 | temp+=character.lower()
148 | index+=1;
149 | return temp;
150 |
151 |
152 | def includeCommon():
153 | for line in open(commonFile, 'r'):
154 | keywordsList.append(line.replace("\n",""));
155 | if(useCommon=='y'):
156 | includeCommon()
157 |
158 | def removeDuplicates(l):
159 | cleanlist = []
160 | [cleanlist.append(x) for x in l if x not in cleanlist]
161 | return cleanlist
162 | #====================================================
163 | def help():
164 | print("");
165 | print("Commands:");
166 | print("set -- change settings");
167 | print("start -- generate wordlist");
168 | print("settings -- display current settings");
169 | print("save -- save current settings");
170 | print("load -- load settings from file");
171 | print("functions -- display available functions");
172 | print("help -- display help menu");
173 | print("credits -- display credits");
174 | print("custom -- custom parameters");
175 | print("exit/quit -- exit console");
176 | print("");
177 |
178 | def start():
179 | for line in keywordsFile:
180 | line = line.replace("\n","");
181 | if(line.replace(" ","").replace(" ","") == ''):
182 | continue
183 | if(line[0] == "#"):
184 | continue
185 | keywordsList.append(line);
186 |
187 | if(useCommon):
188 | includeCommon()
189 | if(useBirthday):
190 | birthdayFile = open(birthdayFileName, 'r');
191 | global birthdayList
192 | for birthday in birthdayFile:
193 | birthday = birthday.replace("\n","");
194 | if(birthday.replace(" ","").replace(" ","") == ''):
195 | continue
196 | if birthday[0] == '#':
197 | continue
198 | tempList = []
199 | tempList.append(birthday[0:2])
200 | tempList.append(birthday[2:4])
201 | tempList.append(birthday[6:8])
202 | tempList.append(birthday[4:8])
203 | birthdayList.append(tempList)
204 |
205 | for line in formatsFile:
206 | line = line.replace("\n","");
207 | if(line.replace(" ","").replace(" ","") == ''):
208 | continue
209 | if line[0] == '#':
210 | continue
211 | elif line == 'fast:break:slow' and fastMode:
212 | break;
213 | elif line == 'fast:break:slow':
214 | continue
215 | print("");
216 | global useLeet
217 | if(line.find('l')!=-1 or line.find('L')!=-1):
218 | useLeet = True
219 | print("Generating format ["+line+"]");
220 | line=line.replace("l","");
221 | line=line.replace("L","");
222 | originalWords(line,"",0);
223 | else:
224 | useLeet = False
225 | print("Generating format ["+line+"]");
226 | originalWords(line,"",0);
227 | print("=====DONE=====\n\n");
228 | exit();
229 |
230 | def settings(str):
231 | if(str == 'all'):
232 | settings('files');
233 | settings('util');
234 | settings('fast');
235 | settings('charsets');
236 | elif(str == 'files'):
237 | print("");
238 | print("---Files---");
239 | print('Generated Dictionary Name: '+genDictName);
240 | print('Keywords File: '+keywordsFileName);
241 | print("Common Phrases File: "+commonFile);
242 | print("Formats File: "+formatsFileName);
243 | print("Birthdays File: "+birthdayFileName);
244 | print("");
245 | elif(str == 'util'):
246 | print("");
247 | print("---Utilities---");
248 | print("Use Birthay: %s" % useBirthday);
249 | print("Show Attempts: %s" % showAttempts);
250 | print("Include Common Phrases in Keywords: %s" % useCommon);
251 | print("");
252 | elif(str == 'fast'):
253 | print("");
254 | print("---Fast Mode---");
255 | print("Fast Mode: %s" % fastMode);
256 | print("Fast Mode disables operations that might take long ~ O(n^2)")
257 | print("When using large a list of keywords, enable Fast Mode\n");
258 | print("Note: Password list will also contain less passwords");
259 | print("Tip: Stick to a smaller list of keywords. Don't spam keywords");
260 | print("");
261 | elif(str == 'charsets'):
262 | settings('spchar')
263 | settings('num')
264 | settings('char')
265 | settings('l33t')
266 | elif(str == 'spchar'):
267 | print("");
268 | print("---Special Characters---");
269 | print("Special Characters Set:");
270 | print(specialCharList);
271 | print("");
272 | elif(str == 'num'):
273 | print("");
274 | print("---Numbers---");
275 | print("Numbers Set:");
276 | print(numList);
277 | print("");
278 | elif(str == 'char'):
279 | print("");
280 | print("---Alphabet---");
281 | print("Character Set:");
282 | print(characterList);
283 | print("");
284 | elif(str == 'l33t'):
285 | print("");
286 | print("---L33t---");
287 | print("L33t Replacements:");
288 | for leet in leetReplacements:
289 | print(leet);
290 | print("");
291 | elif(str == 'help'):
292 | print("");
293 | print("usage: settings ");
294 | print("");
295 | print("---Descriptors:---");
296 | print("all -- all settings");
297 | print("files -- I/O file settings");
298 | print("util -- utilities settings");
299 | print("fast -- fast mode settings");
300 | print("charsets -- all sets settings");
301 | print("spchar -- special character set settings");
302 | print("num -- number set settings");
303 | print("char -- character set settings");
304 | print("l33t -- l33t set settings");
305 | print("help -- display help menu");
306 | print("");
307 |
308 | def set(mystr, value):
309 | if mystr == 'help' and value.replace(" ", "") == '':
310 | print("\nusage: set \n");
311 | print("---Settings---");
312 | print("genDictName -- Generated Dictionary File Name");
313 | print("keywordsFile -- Keywords File Name");
314 | print("commonPhrases -- Common Phrases File Name");
315 | print("formatsFile -- Formats File Name");
316 | print("birthdaysFile -- Birthdays File Name");
317 | print("useBirthday -- Use birthday");
318 | print("showAttempts -- display generated words on console");
319 | print("includeCommon -- Use common phrases");
320 | print("fastMode -- Use Fast Mode");
321 | print("spchar -- Special Characters set");
322 | print("numbers -- Numbers set");
323 | print("alphabet -- Alphabets set");
324 | print("l33t -- L33t set");
325 | print("help -- display help menu");
326 | print("");
327 | elif mystr == 'gendictname':
328 | mystr = 'genDictName'
329 | if(value.replace(" ", "") == ''):
330 | print("\nusage: set genDictName \n");
331 | else:
332 | global genDictName
333 | genDictName = value
334 | print("");
335 | print(mystr + " set to '" + str(genDictName)+"'");
336 | print("");
337 | elif mystr == 'keywordsfile':
338 | mystr = 'keywordsFile'
339 | if(value.replace(" ", "") == ''):
340 | print("\nusage: set keywordsFile \n");
341 | else:
342 | global keywordsFile
343 | keywordsFile = value
344 | print("");
345 | print(mystr + " set to '" + str(keywordsFile)+"'");
346 | print("");
347 | elif mystr == 'commonphrases':
348 | mystr = 'commonPhrases'
349 | if(value.replace(" ", "") == ''):
350 | print("\nusage: set commonPhrases \n");
351 | else:
352 | global commonFile
353 | commonFile = value
354 | print("");
355 | print(mystr + " set to '" + str(commonFile)+"'");
356 | print("");
357 | elif mystr == 'formatsfile':
358 | mystr = 'formatsFile'
359 | if(value.replace(" ", "") == ''):
360 | print("\nusage: set formatsFile \n");
361 | else:
362 | global formatsFileName
363 | formatsFileName = value
364 | print("");
365 | print(mystr + " set to '" + str(formatsFileName)+"'");
366 | print("");
367 | elif mystr == 'birthaysfile':
368 | mystr = 'birthdaysFile'
369 | if(value.replace(" ", "") == ''):
370 | print("\nusage: set commonPhrases \n");
371 | else:
372 | global birthdaysFileName
373 | birthdaysFileName = value
374 | print("");
375 | print(mystr + " set to '" + str(birthdaysFileName)+"'");
376 | print("");
377 | elif mystr == 'usebirthday':
378 | mystr = 'useBirthday'
379 | if(value.replace(" ", "") == ''):
380 | print("\nusage: set useBirthday \n");
381 | else:
382 | global useBirthday
383 | useBirthday = string2bool(value)
384 | print("");
385 | print(mystr + " set to '" + str(useBirthday)+"'");
386 | print("");
387 | elif mystr == 'showattempts':
388 | mystr = 'showAttempts'
389 | if(value.replace(" ", "") == ''):
390 | print("\nusage: set showAttempts \n");
391 | else:
392 | global showAttempts
393 | showAttempts = string2bool(value)
394 | print("");
395 | print(mystr + " set to '" + str(showAttempts)+"'");
396 | print("");
397 | elif mystr == 'includecommon':
398 | mystr = 'includeCommon'
399 | if(value.replace(" ", "") == ''):
400 | print("\nusage: set includeCommon \n");
401 | else:
402 | global useCommon
403 | useCommon = string2bool(value)
404 | print("");
405 | print(mystr + " set to '" + str(useCommon)+"'");
406 | print("");
407 | elif mystr == 'fastmode':
408 | mystr = 'fastMode'
409 | if(value.replace(" ", "") == ''):
410 | print("\nusage: set fastMode \n");
411 | else:
412 | global fastMode
413 | fastMode = string2bool(value)
414 | print("");
415 | print(mystr + " set to '" + str(fastMode)+"'");
416 | print("");
417 | elif mystr == 'spchar':
418 | mystr = 'spchar'
419 | global specialCharList
420 | if(value.replace(" ", "") == ''):
421 | print("\nusage: set spchar \n");
422 | print("---Actions---");
423 | print("add -- add a new entries");
424 | print("remove -- remove existing entries");
425 | print("clear -- clear all entries\n");
426 | elif value == 'add':
427 | stringIn = input("\nValues to add (comma-separated): ")
428 | vals = stringIn.split(',')
429 | specialCharList.extend(vals)
430 | specialCharList = removeDuplicates(specialCharList)
431 | print("\nAdded entries successfully\n");
432 | elif value == 'remove':
433 | stringIn = input("\nValues to remove (comma-separated): ")
434 | vals = stringIn.split(',')
435 | print("");
436 | for item in vals:
437 | if(item in specialCharList):
438 | specialCharList.remove(item)
439 | print("Removed '"+item+"' successfully.");
440 | else:
441 | print("'"+item+"' does not exist");
442 | print("");
443 | elif value == 'clear':
444 | specialCharList = []
445 | print("\nAll entries cleared\n");
446 | elif mystr == 'numbers':
447 | global numList
448 | if(value.replace(" ", "") == ''):
449 | print("\nusage: set numbers \n");
450 | print("---Actions---");
451 | print("add -- add a new entries");
452 | print("remove -- remove existing entries");
453 | print("clear -- clear all entries\n");
454 | elif value == 'add':
455 | stringIn = input("\nValues to add (comma-separated): ")
456 | vals = stringIn.split(',')
457 | numList.extend(vals)
458 | numList = removeDuplicates(numList)
459 | print("\nAdded entries successfully\n");
460 | elif value == 'remove':
461 | stringIn = input("\nValues to remove (comma-separated): ")
462 | vals = stringIn.split(',')
463 | print("");
464 | for item in vals:
465 | if(item in numList):
466 | numList.remove(item)
467 | print("Removed '"+item+"' successfully.");
468 | else:
469 | print("'"+item+"' does not exist");
470 | print("");
471 | elif value == 'clear':
472 | numList = []
473 | print("\nAll entries cleared\n");
474 | elif mystr == 'alphabet':
475 | global characterList
476 | if(value.replace(" ", "") == ''):
477 | print("\nusage: set alphabet \n");
478 | print("---Actions---");
479 | print("add -- add a new entries");
480 | print("remove -- remove existing entries");
481 | print("clear -- clear all entries\n");
482 | elif value == 'add':
483 | stringIn = input("\nValues to add (comma-separated): ")
484 | vals = stringIn.split(',')
485 | characterList.extend(vals)
486 | characterList = removeDuplicates(characterList)
487 | print("\nAdded entries successfully\n");
488 | elif value == 'remove':
489 | stringIn = input("\nValues to remove (comma-separated): ")
490 | vals = stringIn.split(',')
491 | print("");
492 | for item in vals:
493 | if(item in characterList):
494 | characterList.remove(item)
495 | print("Removed '"+item+"' successfully.");
496 | else:
497 | print("'"+item+"' does not exist");
498 | print("");
499 | elif value == 'clear':
500 | characterList = []
501 | print("\nAll entries cleared\n");
502 | elif mystr == 'l33t':
503 | global leetReplacements
504 | if(value.replace(" ", "") == ''):
505 | print("\nusage: set l33t \n");
506 | print("---Actions---");
507 | print("add -- add a new entries");
508 | print("remove -- remove existing entries");
509 | print("clear -- clear all entries\n");
510 | elif value == 'add':
511 | stringIn = input("\nSingle Replacement to Add (comma-separated): ")
512 | vals = stringIn.split(',')
513 | leetReplacements.append(tuple(vals))
514 | leetReplacements = removeDuplicates(leetReplacements)
515 | print("\nAdded entries successfully\n");
516 | elif value == 'remove':
517 | stringIn = input("\nSingle Replacement to remove (comma-separated): ")
518 | vals = stringIn.split(',')
519 | print("");
520 | removed = False
521 | for old,new in leetReplacements:
522 | if(old == vals[0] and new == vals[1]):
523 | print("Removed '"+str(vals)+"' successfully.");
524 | leetReplacements.remove(tuple(vals))
525 | removed = True
526 | if(not removed):
527 | print(str(vals) + " does not exist");
528 | print("");
529 | elif value == 'clear':
530 | leetReplacements = []
531 | print("\nAll entries cleared\n");
532 | def save(mystr):
533 | if(mystr == 'help'):
534 | print("");
535 | print("usage: save \n");
536 | print(" will be the name of the settings file you want to create\n");
537 | print("WARNING: THIS MIGHT OVERRIDE ANY EXISTING FILE");
538 | print("(Choose a filename that does not exist in your directory)");
539 | print("");
540 | elif(mystr.replace(' ','') == ''):
541 | print("");
542 | print("Filename cannot be empty");
543 | print("");
544 | else:
545 | saveFile = open(mystr, 'w');
546 | saveFile.write('fastMode '+str(fastMode)); saveFile.write("\n");
547 | saveFile.write('useCommon '+str(useCommon)); saveFile.write("\n");
548 | saveFile.write('useBirthday '+str(useBirthday)); saveFile.write("\n");
549 | saveFile.write('useLeet '+str(useLeet)); saveFile.write("\n");
550 | saveFile.write('showAttempts '+str(showAttempts)); saveFile.write("\n");
551 | saveFile.write('genDictName '+str(genDictName)); saveFile.write("\n");
552 | saveFile.write('keywordsFileName '+str(keywordsFileName)); saveFile.write("\n");
553 | saveFile.write('formatsFileName '+str(formatsFileName)); saveFile.write("\n");
554 | saveFile.write('commonFileName '+str(commonFile)); saveFile.write("\n");
555 | saveFile.write('specialCharList ');
556 | for specialChar in specialCharList:
557 | saveFile.write(specialChar);
558 | saveFile.write(' ');
559 | saveFile.write("\n");
560 | saveFile.write("numList ");
561 | for num in numList:
562 | saveFile.write(num);
563 | saveFile.write(' ');
564 | saveFile.write("\n");
565 | saveFile.write("characterList ");
566 | for charac in characterList:
567 | saveFile.write(charac);
568 | saveFile.write(' ');
569 | saveFile.write('\n');
570 | for old,new in leetReplacements:
571 | saveFile.write("leetReplacements ");
572 | saveFile.write(old + " " + new);
573 | saveFile.write("\n");
574 | def string2bool(mystr):
575 | return mystr.lower() in ('true');
576 | def load(mystr):
577 | if(mystr == 'help'):
578 | print("\nusage: load \n");
579 | print(" will be the name of the settings file you want to load\n");
580 | elif(mystr.replace(' ','') == ''):
581 | print("");
582 | print("Filename cannot be empty");
583 | print("");
584 | else:
585 | loadFile = open(mystr, 'r');
586 | global leetReplacements
587 | leetReplacements = []
588 | for line in loadFile:
589 | line = line.replace("\n", "");
590 | if(line[0] == '#'):
591 | continue
592 | if(line.replace(" ","").replace(" ","") == ''):
593 | continue
594 | elif line.split()[0] == 'fastMode':
595 | global fastMode
596 | if string2bool(line.split()[1]):
597 | fastMode = True
598 | else:
599 | fastMode = False
600 | elif line.split()[0] == 'useCommon':
601 | global useCommon
602 | if string2bool(line.split()[1]):
603 | useCommon = True
604 | else:
605 | useCommon = False
606 | elif line.split()[0] == 'useBirthday':
607 | global useBirthday
608 | if string2bool(line.split()[1]):
609 | useBirthday = True
610 | else:
611 | useBirthday = False
612 | elif line.split()[0] == 'useLeet':
613 | global useLeet
614 | if string2bool(line.split()[1]):
615 | useLeet = True
616 | else:
617 | useLeet = False
618 | elif line.split()[0] == 'showAttempts':
619 | global showAttempts
620 | if string2bool(line.split()[1]):
621 | showAttempts = True
622 | else:
623 | showAttempts = False
624 | elif line.split()[0] == 'genDictName':
625 | global genDictName
626 | genDictName = line.split()[1];
627 | global writeFile
628 | writeFile = open(genDictName, 'w');
629 | elif line.split()[0] == 'keywordsFileName':
630 | global keywordsFileName
631 | keywordsFileName = line.split()[1];
632 | global keywordsFile
633 | keywordsFile = open(keywordsFileName, 'r');
634 | elif line.split()[0] == 'formatsFileName':
635 | global formatsFileName
636 | formatsFileName = line.split()[1];
637 | global formatsFile
638 | formatsFile = open(formatsFileName, 'r');
639 | elif line.split()[0] == 'commonFileName':
640 | global commonFile
641 | commonFile = line.split()[1];
642 | elif line.split()[0] == 'specialCharList':
643 | line = line.split()[1:]
644 | global specialCharList
645 | specialCharList = line
646 | elif line.split()[0] == 'numList':
647 | line = line.split()[1:]
648 | global numList
649 | numList = line
650 | elif line.split()[0] == 'characterList':
651 | line = line.split()[1:]
652 | global characterList
653 | characterList = line
654 | elif line.split()[0] == 'leetReplacements':
655 | line = line.split()[1:]
656 | leetReplacements.append(tuple(line))
657 |
658 | def displayFunction(page):
659 | counter = 0;
660 | startPrinting = False
661 | functionsFile = open('functions.txt','r');
662 | for line in functionsFile:
663 | line = line.replace('\n','')
664 | if line == '++++':
665 | if not startPrinting:
666 | counter+=1
667 | if(counter == page):
668 | startPrinting = True
669 | print('');
670 | continue
671 | else:
672 | startPrinting = False
673 | if(startPrinting):
674 | print(line)
675 |
676 | def functions(mystr):
677 | if(mystr == 'help'):
678 | print("");
679 | print("usage: functions ");
680 | print("");
681 | print("---Descriptors:---");
682 | print("all -- description of all functions");
683 | print("list -- list all functions");
684 | print(" -- description of the function");
685 | print(" (refer to list to see all functions)");
686 | print("help -- display help menu");
687 | print("");
688 | elif(mystr == 'list'):
689 | print("\n'k' for keywords");
690 | print("'K' for keywords w/ first letter cap");
691 | print("'a' for alternate cap");
692 | print("'b' for simple birthday");
693 | print("'B' for complex birthday");
694 | print("'s' for special character");
695 | print("'n' for number");
696 | print("'r' for reversed keyword");
697 | print("'R' for reversed keyword w/ first letter cap");
698 | print("'c' for single letter");
699 | print("'C' for single capital letter");
700 | print("'_' for underscore (between strings)");
701 | print("'l' for l33t (the whole word)\n");
702 | print("To find out more about each function and their examples,\nuse the following command:");
703 | print("\nfunctions \n\n");
704 | elif(mystr == 'help'):
705 | functions('help')
706 | elif mystr == 'all':
707 | functions('k')
708 | functions('K')
709 | functions('a')
710 | functions('b')
711 | functions('B')
712 | functions('s')
713 | functions('n')
714 | functions('r')
715 | functions('R')
716 | functions('c')
717 | functions('C')
718 | functions('_')
719 | functions('l')
720 | elif mystr == 'k':
721 | displayFunction(1)
722 | elif mystr == 'K':
723 | displayFunction(2)
724 | elif mystr == 'a':
725 | displayFunction(3)
726 | elif mystr == 'b':
727 | displayFunction(4)
728 | elif mystr == 'B':
729 | displayFunction(5)
730 | elif mystr == 's':
731 | displayFunction(6)
732 | elif mystr == 'n':
733 | displayFunction(7)
734 | elif mystr == 'r':
735 | displayFunction(8)
736 | elif mystr == 'R':
737 | displayFunction(9)
738 | elif mystr == 'c':
739 | displayFunction(10)
740 | elif mystr == 'C':
741 | displayFunction(11)
742 | elif mystr == '_':
743 | displayFunction(12)
744 | elif mystr == 'l':
745 | displayFunction(13)
746 | def credits():
747 | print("\n\n");
748 | print("======================================================");
749 | print(" ___ _ _ ");
750 | print("| _ \__ __ __ __| || | ___ __ _ _ _ ");
751 | print("| _/\ V V // _` || |/ _ \/ _` || || |");
752 | print("|_| \_/\_/ \__,_||_|\___/\__, | \_, |");
753 | print(" |___/ |__/ ");
754 |
755 | # print(".______ ____ __ ____ _______ __ ______ ___________ ____");
756 | # print("| _ \ \ \ / \ / / | \ | | / __ \ / _____\ \ / /");
757 | # print("| |_) | \ \/ \/ / | .--. || | | | | | | | __ \ \/ / ");
758 | # print("| ___/ \ / | | | || | | | | | | | |_ | \_ _/ ");
759 | # print("| | \ /\ / | '--' || `----.| `--' | | |__| | | | ");
760 | # print("| _| \__/ \__/ |_______/ |_______| \______/ \______| |__| ");
761 | print("======================================================");
762 | print("Created by: ");
763 | print(" _ _ __ _____ _____ __ ");
764 | print("| | | | / || _ || _ |/ | ");
765 | print("| |_ ___| |__ `| || |/' || |/' |`| | ");
766 | print("| __/ __| '_ \ | || /| || /| | | | ");
767 | print("| || (__| | | || |\ |_/ /\ |_/ /_| |_");
768 | print(" \__\___|_| |_\___/\___/ \___/ \___/");
769 | print("\n\n");
770 | def custom(mystr):
771 | if mystr=='help':
772 | print("");
773 | print("usage: custom ");
774 | print("\n will be the name of the file you want to store your custom formats");
775 | print("The file will contain all the default formats, and is for you to add on the formats you wish to use");
776 | print("It is recommended that you leave the 'formats_default.conf' file untouched,");
777 | print("Changing it might result in incomplete formats and will affect the effectiveness of this program");
778 | print("\nFor more information on adding formats of your own, please visit the README.md or github");
779 | print("Use the command 'set formatsFile ' to change the formats file for a session");
780 |
781 | print("\nWARNING: This will override any existing file.");
782 | print("");
783 | else:
784 | print("\nWARNING: This will override any existing file.");
785 | customFile = open(mystr,'w');
786 | customFile.write("# default formats for password generation"); customFile.write("\n");
787 | customFile.write("# This is a custom formats file for you to edit"); customFile.write("\n");
788 | customFile.write("# for full effectiveness, please consider adding on"); customFile.write("\n");
789 | customFile.write("# instead of replacing the any existing formats"); customFile.write("\n");
790 | customFile.write("# ====================================================================="); customFile.write("\n");
791 | customFile.write("# To use this list as the formatsFile"); customFile.write("\n");
792 | customFile.write("# Use the 'set formatsFile ' to change the formatsFile"); customFile.write("\n");
793 | customFile.write("# refer to README.md or github for more details"); customFile.write("\n"); customFile.write("\n");
794 | customFile.write("k"); customFile.write("\n");
795 | customFile.write("K"); customFile.write("\n");
796 | customFile.write("kn"); customFile.write("\n");
797 | customFile.write("Kn"); customFile.write("\n");
798 | customFile.write("ks"); customFile.write("\n");
799 | customFile.write("Ks"); customFile.write("\n");
800 | customFile.write("knn"); customFile.write("\n");
801 | customFile.write("Knn"); customFile.write("\n");
802 | customFile.write("kns"); customFile.write("\n");
803 | customFile.write("Kns"); customFile.write("\n");
804 | customFile.write("ksn"); customFile.write("\n");
805 | customFile.write("Ksn"); customFile.write("\n");
806 | customFile.write("kss"); customFile.write("\n");
807 | customFile.write("Kss"); customFile.write("\n");
808 | customFile.write("knnn"); customFile.write("\n");
809 | customFile.write("Knnn"); customFile.write("\n");
810 | customFile.write("knns"); customFile.write("\n");
811 | customFile.write("Knns"); customFile.write("\n");
812 | customFile.write("knsn"); customFile.write("\n");
813 | customFile.write("Knsn"); customFile.write("\n");
814 | customFile.write("knss"); customFile.write("\n");
815 | customFile.write("Knss"); customFile.write("\n");
816 | customFile.write("ksnn"); customFile.write("\n");
817 | customFile.write("Ksnn"); customFile.write("\n");
818 | customFile.write("ksns"); customFile.write("\n");
819 | customFile.write("Ksns"); customFile.write("\n");
820 | customFile.write("kssn"); customFile.write("\n");
821 | customFile.write("Kssn"); customFile.write("\n");
822 | customFile.write("ksss"); customFile.write("\n");
823 | customFile.write("Ksss"); customFile.write("\n");
824 | customFile.write("knnns"); customFile.write("\n");
825 | customFile.write("Knnns"); customFile.write("\n");
826 | customFile.write("knnss"); customFile.write("\n");
827 | customFile.write("Knnss"); customFile.write("\n");
828 | customFile.write("lk"); customFile.write("\n");
829 | customFile.write("lK"); customFile.write("\n");
830 | customFile.write("lkn"); customFile.write("\n");
831 | customFile.write("lKn"); customFile.write("\n");
832 | customFile.write("lks"); customFile.write("\n");
833 | customFile.write("lKs"); customFile.write("\n");
834 | customFile.write("lknn"); customFile.write("\n");
835 | customFile.write("lKnn"); customFile.write("\n");
836 | customFile.write("lkns"); customFile.write("\n");
837 | customFile.write("lKns"); customFile.write("\n");
838 | customFile.write("lksn"); customFile.write("\n");
839 | customFile.write("lKsn"); customFile.write("\n");
840 | customFile.write("lkss"); customFile.write("\n");
841 | customFile.write("lKss"); customFile.write("\n");
842 | customFile.write("lknnn"); customFile.write("\n");
843 | customFile.write("lKnnn"); customFile.write("\n");
844 | customFile.write("lknns"); customFile.write("\n");
845 | customFile.write("lKnns"); customFile.write("\n");
846 | customFile.write("lknsn"); customFile.write("\n");
847 | customFile.write("lKnsn"); customFile.write("\n");
848 | customFile.write("lknss"); customFile.write("\n");
849 | customFile.write("lKnss"); customFile.write("\n");
850 | customFile.write("lksnn"); customFile.write("\n");
851 | customFile.write("lKsnn"); customFile.write("\n");
852 | customFile.write("lksns"); customFile.write("\n");
853 | customFile.write("lKsns"); customFile.write("\n");
854 | customFile.write("lkssn"); customFile.write("\n");
855 | customFile.write("lKssn"); customFile.write("\n");
856 | customFile.write("lksss"); customFile.write("\n");
857 | customFile.write("lKsss"); customFile.write("\n");
858 | customFile.write("lknnns"); customFile.write("\n");
859 | customFile.write("lKnnns"); customFile.write("\n");
860 | customFile.write("lknnss"); customFile.write("\n");
861 | customFile.write("lKnnss"); customFile.write("\n");
862 | customFile.write("kB "); customFile.write("\n");
863 | customFile.write("KB"); customFile.write("\n");
864 | customFile.write("B"); customFile.write("\n");
865 | customFile.write("r"); customFile.write("\n");
866 | customFile.write("R"); customFile.write("\n");
867 | customFile.write("rn"); customFile.write("\n");
868 | customFile.write("Rn"); customFile.write("\n");
869 | customFile.write("rnn"); customFile.write("\n");
870 | customFile.write("Rnn"); customFile.write("\n");
871 | customFile.write("rns"); customFile.write("\n");
872 | customFile.write("Rns"); customFile.write("\n");
873 | customFile.write("rnnn"); customFile.write("\n");
874 | customFile.write("Rnnn"); customFile.write("\n");
875 | customFile.write("fast:break:slow"); customFile.write("\n");
876 | customFile.write("# This indicates the separation of faster combination from slower combinations"); customFile.write("\n");
877 | customFile.write("# Enabling Fast-Mode will cause wordlist generation to stop here"); customFile.write("\n");
878 | customFile.write("kk"); customFile.write("\n");
879 | customFile.write("Kk"); customFile.write("\n");
880 | customFile.write("kkn"); customFile.write("\n");
881 | customFile.write("Kkn"); customFile.write("\n");
882 | customFile.write("kks"); customFile.write("\n");
883 | customFile.write("Kks"); customFile.write("\n");
884 | customFile.write("kknn"); customFile.write("\n");
885 | customFile.write("Kknn"); customFile.write("\n");
886 | customFile.write("kkns"); customFile.write("\n");
887 | customFile.write("Kkns"); customFile.write("\n");
888 | customFile.write("kksn"); customFile.write("\n");
889 | customFile.write("Kksn"); customFile.write("\n");
890 | customFile.write("kkss"); customFile.write("\n");
891 | customFile.write("Kkss"); customFile.write("\n");
892 | customFile.write("kknnn"); customFile.write("\n");
893 | customFile.write("Kknnn"); customFile.write("\n");
894 | customFile.write("kknns"); customFile.write("\n");
895 | customFile.write("Kknns"); customFile.write("\n");
896 | customFile.write("kknsn"); customFile.write("\n");
897 | customFile.write("Kknsn"); customFile.write("\n");
898 | customFile.write("kknss"); customFile.write("\n");
899 | customFile.write("Kknss"); customFile.write("\n");
900 | customFile.write("kksnn"); customFile.write("\n");
901 | customFile.write("Kksnn"); customFile.write("\n");
902 | customFile.write("kksns"); customFile.write("\n");
903 | customFile.write("Kksns"); customFile.write("\n");
904 | customFile.write("kkssn"); customFile.write("\n");
905 | customFile.write("Kkssn"); customFile.write("\n");
906 | customFile.write("kksss"); customFile.write("\n");
907 | customFile.write("Kksss"); customFile.write("\n");
908 | customFile.write("kknnns"); customFile.write("\n");
909 | customFile.write("Kknnns"); customFile.write("\n");
910 | customFile.write("kknnss"); customFile.write("\n");
911 | customFile.write("Kknnss"); customFile.write("\n");
912 | customFile.write("lkk"); customFile.write("\n");
913 | customFile.write("lKk"); customFile.write("\n");
914 | customFile.write("lkkn"); customFile.write("\n");
915 | customFile.write("lKkn"); customFile.write("\n");
916 | customFile.write("lkks"); customFile.write("\n");
917 | customFile.write("lKks"); customFile.write("\n");
918 | customFile.write("lkknn"); customFile.write("\n");
919 | customFile.write("lKknn"); customFile.write("\n");
920 | customFile.write("lkkns"); customFile.write("\n");
921 | customFile.write("lKkns"); customFile.write("\n");
922 | customFile.write("lkksn"); customFile.write("\n");
923 | customFile.write("lKksn"); customFile.write("\n");
924 | customFile.write("lkkss"); customFile.write("\n");
925 | customFile.write("lKkss"); customFile.write("\n");
926 | customFile.write("lkknnn"); customFile.write("\n");
927 | customFile.write("lKknnn"); customFile.write("\n");
928 | customFile.write("lkknns"); customFile.write("\n");
929 | customFile.write("lKknns"); customFile.write("\n");
930 | customFile.write("lkknsn"); customFile.write("\n");
931 | customFile.write("lKknsn"); customFile.write("\n");
932 | customFile.write("lkknss"); customFile.write("\n");
933 | customFile.write("lKknss"); customFile.write("\n");
934 | customFile.write("lkksnn"); customFile.write("\n");
935 | customFile.write("lKksnn"); customFile.write("\n");
936 | customFile.write("lkksns"); customFile.write("\n");
937 | customFile.write("lKksns"); customFile.write("\n");
938 | customFile.write("lkkssn"); customFile.write("\n");
939 | customFile.write("lKkssn"); customFile.write("\n");
940 | customFile.write("lkksss"); customFile.write("\n");
941 | customFile.write("lKksss"); customFile.write("\n");
942 | customFile.write("lkknnns"); customFile.write("\n");
943 | customFile.write("lKknnns"); customFile.write("\n");
944 | customFile.write("lkknnss"); customFile.write("\n");
945 | customFile.write("lKknnss"); customFile.write("\n");
946 | customFile.write("kkB"); customFile.write("\n");
947 | customFile.write("KkB"); customFile.write("\n");
948 | customFile.write("lkkB"); customFile.write("\n");
949 | customFile.write("lKkB"); customFile.write("\n");
950 | print("\n'"+mystr+"' formats file created successfully.\n")
951 |
952 | defaultFile = open('default.conf', 'r')
953 | for line in defaultFile:
954 | if line[0] == '#':
955 | continue
956 | if line.split("=")[0].replace(" ","") == 'settings':
957 | defaultSettingsFileName = line.split("=")[1].replace(" ","")
958 | elif line.split("=")[0].replace(" ","") == 'format':
959 | formatsFileName = line.split("=")[1].replace(" ","")
960 |
961 | usrInput = ""
962 | load(defaultSettingsFileName)
963 | while(True):
964 | usrInput = input("pwdlogy > ").lower()
965 | if(len(usrInput.split())==1):
966 | usrInput = usrInput.replace(' ','').replace(' ','')
967 | if(usrInput == '' or usrInput.replace(' ','') == '' or usrInput.replace(' ','') == ''):
968 | pass
969 | elif(usrInput == 'set'):
970 | set('help','')
971 | elif(usrInput == 'start'):
972 | start()
973 | elif(usrInput == 'settings'):
974 | settings("help")
975 | elif(usrInput == 'save'):
976 | save('help')
977 | elif(usrInput == 'load'):
978 | load('help')
979 | elif(usrInput.replace(' ','') == 'functions'):
980 | functions('help')
981 | elif(usrInput == 'help'):
982 | help()
983 | elif(usrInput == 'credits'):
984 | credits()
985 | elif(usrInput == 'custom'):
986 | custom('help')
987 | elif(usrInput == 'exit' or usrInput == 'quit'):
988 | exit()
989 |
990 | elif(usrInput == 'cd'):
991 | print("");
992 | print("Sorry, unable to change directory while program is running");
993 | print("");
994 | elif(usrInput.split()[0] == 'clear' or usrInput.split()[0] == 'ls'
995 | or usrInput.split()[0] == 'pwd' or usrInput.split()[0] == 'whoami' or usrInput.split()[0] == 'cat'
996 | or usrInput.split()[0] == 'vi' or usrInput.split()[0] == 'cp' or usrInput.split()[0] == 'mv'
997 | or usrInput.split()[0] == 'rm' or usrInput.split()[0] == 'more' or usrInput.split()[0] == 'man'
998 | or usrInput.split()[0] == 'find' or usrInput.split()[0] == 'grep' or usrInput.split()[0] == 'rmdir'
999 | or usrInput.split()[0] == 'mkdir' or usrInput.split()[0] == 'vim' or usrInput.split()[0] == 'nano'):
1000 | os.system(usrInput);
1001 |
1002 | elif(usrInput == 'settings all'):
1003 | settings('all')
1004 | elif(usrInput == 'settings files'):
1005 | settings('files')
1006 | elif(usrInput == 'settings util'):
1007 | settings('util')
1008 | elif(usrInput == 'settings fast'):
1009 | settings('fast')
1010 | elif(usrInput == 'settings charsets'):
1011 | settings('charsets')
1012 | elif(usrInput == 'settings spchar'):
1013 | settings('spchar')
1014 | elif(usrInput == 'settings num'):
1015 | settings('num')
1016 | elif(usrInput == 'settings char'):
1017 | settings('char')
1018 | elif(usrInput == 'settings l33t'):
1019 | settings('l33t')
1020 | elif(usrInput == 'settings help'):
1021 | settings('help')
1022 |
1023 | elif(usrInput.split()[0] == 'functions'):
1024 | functions(usrInput.split()[1])
1025 |
1026 | elif(usrInput.split()[0] == 'save'):
1027 | save(usrInput.split()[1]);
1028 | print("Saved "+usrInput.split()[1]+" successfully.\n");
1029 | elif(usrInput.split()[0] == 'load'):
1030 | load(usrInput.split()[1]);
1031 | print("Loaded "+usrInput.split()[1]+" successfully.\n");
1032 | elif(usrInput.split()[0] == 'custom'):
1033 | custom(usrInput.split()[1]);
1034 | elif(usrInput.split()[0] == 'set' and len(usrInput.split())==2):
1035 | set(usrInput.split()[1], "");
1036 | elif(usrInput.split()[0] == 'set' and len(usrInput.split())==3):
1037 | set(usrInput.split()[1], usrInput.split()[2]);
1038 |
1039 |
1040 |
--------------------------------------------------------------------------------