Skip to content

Instantly share code, notes, and snippets.

@ratnadip1998
Created August 6, 2024 06:52
Show Gist options
  • Save ratnadip1998/45374f2b25b793a6a40ba676169e6cb5 to your computer and use it in GitHub Desktop.
Save ratnadip1998/45374f2b25b793a6a40ba676169e6cb5 to your computer and use it in GitHub Desktop.
import itertools
import random
special_chars = "!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~"
words = ["example", "password", "security", "test", "random"]
years = [str(year) for year in range(2000, 2031)]
with open("wordlist.txt", "w") as f:
for _ in range(1000): # Change 1000 to however many combinations you want
specials = ''.join(random.choices(special_chars, k=4))
word1 = random.choice(words)
word2 = random.choice(words)
year = random.choice(years)
password = specials + word1 + word2 + year
if 10 <= len(password) <= 20:
f.write(password + "\n")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment