Skip to content

Instantly share code, notes, and snippets.

@lorenzodifuccia
Last active November 30, 2022 10:11
Show Gist options
  • Save lorenzodifuccia/8a3bda3d96bcb0864b60f8c7b37049d6 to your computer and use it in GitHub Desktop.
Save lorenzodifuccia/8a3bda3d96bcb0864b60f8c7b37049d6 to your computer and use it in GitHub Desktop.
Wordlist - Italian License Plate - Targa Targhe Italiane
import string
import itertools
with open("wordlist_italian_licenseplate.txt", "w+") as wordlist_file:
for alfa1 in itertools.product(string.ascii_uppercase, string.ascii_uppercase):
alfa1_str = "".join(alfa1)
for digi in itertools.product(string.digits, string.digits, string.digits):
digi_str = "".join(digi)
for alfa2 in itertools.product(string.ascii_uppercase, string.ascii_uppercase):
wordlist_file.write(alfa1_str + digi_str + "".join(alfa2) + "\n")
print("DONE!")
@lorenzodifuccia
Copy link
Author

Generate only license plate "FMXXXXX":

import string
import itertools

with open("wordlist_FM.txt", "w+") as wordlist_file:
  alfa1_str = "FM"
  for digi in itertools.product(string.digits[1:], string.digits[1:], string.digits[1:]):
    digi_str = "".join(digi)
    for alfa2 in itertools.product(string.ascii_uppercase, string.ascii_uppercase):
      wordlist_file.write(alfa1_str + digi_str + "".join(alfa2) + "\n")

print("DONE!")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment