use different wordlist
This commit is contained in:
parent
aaa04dc5cd
commit
61e665f646
File diff suppressed because it is too large
Load Diff
14
generate.py
14
generate.py
|
|
@ -2,11 +2,12 @@ import random
|
|||
from dictionaries import *
|
||||
|
||||
options = {
|
||||
"minimum_length": 18,
|
||||
"minimum_length": 21,
|
||||
"capitalize_first_letter": True,
|
||||
"leet_it": True,
|
||||
"add_number_to_end": False,
|
||||
"add_special_to_end": False,
|
||||
"dictionary": "eff",
|
||||
}
|
||||
|
||||
def leetspeak_substitutions(string, num_substitutions):
|
||||
|
|
@ -32,12 +33,17 @@ def add_random_special_char(string):
|
|||
password = ""
|
||||
|
||||
# ENTRY
|
||||
if options["dictionary"] == "eff":
|
||||
with open("eff_large_wordlist_dict.txt") as f:
|
||||
wordlist = [x[:-1] for x in f.readlines()]
|
||||
else:
|
||||
with open("diceware.txt") as f:
|
||||
diceware = [x[:-1] for x in f.readlines()]
|
||||
wordlist = [x[:-1] for x in f.readlines()]
|
||||
|
||||
|
||||
while len(password) <= options["minimum_length"]:
|
||||
index = random.randint(0, len(diceware))
|
||||
chosen_word = diceware[index]
|
||||
index = random.randint(0, len(wordlist))
|
||||
chosen_word = wordlist[index]
|
||||
if(options["capitalize_first_letter"] == True):
|
||||
chosen_word = chosen_word.capitalize()
|
||||
password += chosen_word
|
||||
|
|
|
|||
Loading…
Reference in New Issue