adding files to git

This commit is contained in:
icaema 2022-12-20 19:54:19 -05:00
commit d34b872ca4
5 changed files with 15634 additions and 0 deletions

Binary file not shown.

7776
diceware.txt Normal file

File diff suppressed because it is too large Load Diff

24
dictionaries.py Normal file
View File

@ -0,0 +1,24 @@
# The leetspeak dictionary, containing common substitutions
leetspeak = {
"a": "4",
"b": "8",
"c": "(",
"e": "3",
"g": "6",
"i": "1",
"l": "1",
"o": "0",
"s": "5",
"t": "7",
"z": "2",
"h": "#",
"s": "$",
"a": "&",
"j": ")",
"v": "^",
"w": "^",
"a": "@",
"l": "!",
"i": "!",
"x": "%"
}

7776
eff_large_wordlist.txt Normal file

File diff suppressed because it is too large Load Diff

58
generate.py Normal file
View File

@ -0,0 +1,58 @@
import random
from dictionaries import *
options = {
"minimum_length": 18,
"capitalize_first_letter": True,
"leet_it": True,
"add_number_to_end": False,
"add_special_to_end": False,
}
def leetspeak_substitutions(string, num_substitutions):
for i in range(num_substitutions):
while True:
index = random.randint(0, len(string)-1)
letter = string[index]
if letter.lower() in leetspeak:
string = string[:index] + leetspeak[letter.lower()] + string[index + 1:]
break
return string
def add_random_number(string):
rand_num = random.randint(0, 9)
return string + str(rand_num)
def add_random_special_char(string):
special_chars = ["~", "!", "@", "#", "$", "%", "^", "&", "*", "(", ")", "_", "+"]
rand_index = random.randint(0, len(special_chars) - 1)
return string + special_chars[rand_index]
password = ""
# ENTRY
with open("diceware.txt") as f:
diceware = [x[:-1] for x in f.readlines()]
while len(password) <= options["minimum_length"]:
index = random.randint(0, len(diceware))
chosen_word = diceware[index]
if(options["capitalize_first_letter"] == True):
chosen_word = chosen_word.capitalize()
password += chosen_word
print("Standard Password:\t" + password)
if options["leet_it"]:
password = leetspeak_substitutions(password, 3)
if options["add_number_to_end"]:
password = add_random_number(password)
if options["add_special_to_end"]:
password = add_random_special_char(password)
# Print the generated password
print("Funky Password: \t"+password)