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