Skip to content

Instantly share code, notes, and snippets.

@xxiz
Last active April 25, 2024 19:01
Show Gist options
  • Save xxiz/7401eadf7bad266d23f14cea5c5d8b31 to your computer and use it in GitHub Desktop.
Save xxiz/7401eadf7bad266d23f14cea5c5d8b31 to your computer and use it in GitHub Desktop.
gmail dot trick generator
def generate_email():
VALID_EMAILS = [
# your list of emails go here
]
GENERATED_EMAILS = []
with open("generated_emails", "r") as f:
for line in f.readlines():
GENERATED_EMAILS.append(line)
for email in VALID_EMAILS:
email = email.split("@")[0]
address = list(email)
rn = random.randint(1, len(address) - 1)
address.insert(rn, ".")
email = "".join(address)
email = email + "@gmail.com"
if email not in GENERATED_EMAILS:
with open("generated_emails", "a") as f:
f.write(email + "@gmail.com\n")
return email
return None
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment