Created
October 14, 2024 14:02
-
-
Save moscowchill/e70747333413e5f0c59913ad567eb6b7 to your computer and use it in GitHub Desktop.
weakpass generator by nyxgeek
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# 2020.02.18 - @nyxgeek - TrustedSec | |
# generate weak passwords based on current date | |
import datetime | |
from datetime import datetime, timedelta | |
import argparse | |
parser = argparse.ArgumentParser(description='Maakt password spraying list en schijft naar latest_passwords.txt (zonder argumenten)') | |
parser.add_argument('-u', '--uitgebreid', dest='uitgebreid', action='store_true', help='Maakt de lijst uitgebreider') | |
parser.add_argument('-l', '--lamer', dest='dolame', action='store_true', help='l33tspeak transmutate output') | |
args = parser.parse_args() | |
monthDictionary = {} | |
if args.uitgebreid: | |
monthDictionary["January"] = ["Januari", "Winter", "Nieuwjaar"] | |
monthDictionary["February"] = ["Februari", "Winter", "Febru", "Carnaval"] | |
monthDictionary["March"] = ["Maart", "Winter", "Lente", "Voorjaar"] | |
monthDictionary["April"] = ["April", "Lente", "Voorjaar", "Spring", "Pasen"] | |
monthDictionary["May"] = ["Mei", "Lente", "Zomer", "Summer", "Hemelvaart", "Pinksteren", "Moederdag"] | |
monthDictionary["June"] = ["Juni", "Lente","Zomer", "Vakantie", "Summer"] | |
monthDictionary["July"] = ["Juli", "Zomer", "Vakantie", "Summer"] | |
monthDictionary["August"] = ["Augustus", "Zomer", "Herfst"] | |
monthDictionary["September"] = ["September", "Herfst", "Najaar", "Septem", "Prinsjesdag"] | |
monthDictionary["October"] = ["Oktober", "Herfst", "Najaar", "Winter"] | |
monthDictionary["November"] = ["November", "Herfst", "Najaar", "Winter", "Novem"] | |
monthDictionary["December"] = ["December", "Winter", "Kerstmis", "Oudjaar", "Sinterklaas"] | |
else: | |
monthDictionary = {} | |
monthDictionary["January"] = ["Januari", "Winter", "Welkom"] | |
monthDictionary["February"] = ["Februari", "Winter"] | |
monthDictionary["March"] = ["Maart", "Winter", "Lente", "Voorjaar"] | |
monthDictionary["April"] = ["April", "Lente", "Voorjaar", "Welkom"] | |
monthDictionary["May"] = ["Mei", "Lente", "Zomer"] | |
monthDictionary["June"] = ["Juni", "Lente","Zomer"] | |
monthDictionary["July"] = ["Juli", "Zomer", "Welkom"] | |
monthDictionary["August"] = ["Augustus", "Zomer", "Herfst"] | |
monthDictionary["September"] = ["September", "Herfst", "Najaar"] | |
monthDictionary["October"] = ["Oktober", "Herfst", "Najaar", "Winter", "Welkom"] | |
monthDictionary["November"] = ["November", "Herfst", "Najaar", "Winter"] | |
monthDictionary["December"] = ["December", "Winter", "Kerstmis"] | |
OUTPUT_LIST = [] | |
l4merdict = {'a':'@', 'e':'3', 'o':'0', 'i':'1'} | |
def transform(c): | |
ret = [] | |
ret.append(c) | |
if c.isalpha(): | |
ret.append(c.upper()) | |
if c in l4merdict: | |
for i in list(l4merdict[c]): | |
ret.append(i) | |
return ret | |
def l4mer(str): | |
if str=="": | |
return [""] | |
else: | |
ret = [] | |
c = str[0] | |
for i in l4mer(str[1:]): | |
for j in transform(c): | |
ret.append(j + i) | |
return ret | |
def create_passwords(tempdate): | |
year_short=tempdate.strftime("%y") | |
year_long=tempdate.strftime("%Y") | |
current_month=tempdate.strftime("%B") | |
SUFFIX_ARRAY = [ year_short , year_long, "@"+year_short, "@"+year_long, year_short+"!", year_long+"!", "1", "123"] | |
for month_prefix in monthDictionary[current_month]: | |
for password_suffix in SUFFIX_ARRAY: | |
#print("%s%s" % (month_prefix, password_suffix) ) | |
global OUTPUT_LIST | |
OUTPUT_LIST.append("%s%s" % (month_prefix, password_suffix)) | |
for numberofdays in range(1,90): | |
tempdate = datetime.now() - timedelta(days=numberofdays) | |
create_passwords(tempdate) | |
print("passwords geschreven naar latest_passwords.txt") | |
print("--lamer > lamer_passwords.txt") | |
OUTPUT_LIST.sort() | |
output_set = sorted(set(OUTPUT_LIST)) | |
#open file to write to | |
outfile = open("latest_passwords.txt", "w") | |
outfile2 = open("lamer_passwords.txt", "w") | |
for candidate_password in output_set: | |
if args.dolame: | |
for i in l4mer(candidate_password): | |
outfile2.write(i+"\n") | |
else: | |
print(candidate_password) | |
outfile.write(candidate_password+"\n") | |
outfile.close() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment