Skip to content

Instantly share code, notes, and snippets.

@hughdbrown
Last active November 26, 2021 17:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hughdbrown/cb558ba7daf98636b4c702f5ad2a31e7 to your computer and use it in GitHub Desktop.
Save hughdbrown/cb558ba7daf98636b4c702f5ad2a31e7 to your computer and use it in GitHub Desktop.
Given a first name and last name and domain, generate probable permutations for email address
#!/usr/bin/env python3
import click
@click.command()
@click.option('--first')
@click.option('--last')
@click.option('--domain')
@click.option('--middle', default=None)
def main(first, last, domain, middle):
first_init = first[0]
middle_init = middle[0] if middle else ''
for sep in ('.', '_', '-', ''):
print(f'{first}{sep}{last}@{domain}')
print(f'{last}{sep}{first}@{domain}')
print(f'{first_init}{sep}{last}@{domain}')
print(f'{last}{sep}{first_init}@{domain}')
if __name__ == '__main__':
main()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment