├── .gitignore ├── GmailDotEmailGenerator ├── GmailDotEmailGenerator.py └── __init__.py └── setup.py /.gitignore: -------------------------------------------------------------------------------- 1 | # Byte-compiled / optimized / DLL files 2 | __pycache__/ 3 | *.py[cod] 4 | *$py.class 5 | 6 | # C extensions 7 | *.so 8 | 9 | # Distribution / packaging 10 | .Python 11 | env/ 12 | build/ 13 | develop-eggs/ 14 | dist/ 15 | downloads/ 16 | eggs/ 17 | .eggs/ 18 | lib/ 19 | lib64/ 20 | parts/ 21 | sdist/ 22 | var/ 23 | *.egg-info/ 24 | .installed.cfg 25 | *.egg 26 | 27 | # PyInstaller 28 | # Usually these files are written by a python script from a template 29 | # before PyInstaller builds the exe, so as to inject date/other infos 30 | # into it. 31 | *.manifest 32 | *.spec 33 | 34 | # Installer logs 35 | pip-log.txt 36 | pip-delete-this-directory.txt 37 | 38 | # Unit test / coverage reports 39 | htmlcov/ 40 | .tox/ 41 | .coverage 42 | .coverage.* 43 | .cache 44 | nosetests.xml 45 | coverage.xml 46 | *,cover 47 | .hypothesis/ 48 | 49 | # Translations 50 | *.mo 51 | *.pot 52 | 53 | # Django stuff: 54 | *.log 55 | local_settings.py 56 | 57 | # Flask stuff: 58 | instance/ 59 | .webassets-cache 60 | 61 | # Scrapy stuff: 62 | .scrapy 63 | 64 | # Sphinx documentation 65 | docs/_build/ 66 | 67 | # PyBuilder 68 | target/ 69 | 70 | # IPython Notebook 71 | .ipynb_checkpoints 72 | 73 | # pyenv 74 | .python-version 75 | 76 | # celery beat schedule file 77 | celerybeat-schedule 78 | 79 | # dotenv 80 | .env 81 | 82 | # virtualenv 83 | venv/ 84 | ENV/ 85 | 86 | # Spyder project settings 87 | .spyderproject 88 | 89 | # Rope project settings 90 | .ropeproject 91 | -------------------------------------------------------------------------------- /GmailDotEmailGenerator/GmailDotEmailGenerator.py: -------------------------------------------------------------------------------- 1 | class GmailDotEmailGenerator: 2 | def __init__(self, email): 3 | self.__username__, self.__domain__ = email.split('@') 4 | def generate(self): 5 | return self.__generate__(self.__username__, self.__domain__) 6 | def __generate__(self, username, domain): 7 | emails = list() 8 | username_length = len(username) 9 | combinations = pow(2, username_length - 1) 10 | padding = "{0:0" + str(username_length - 1) + "b}" 11 | for i in range(0, combinations): 12 | bin = padding.format(i) 13 | full_email = "" 14 | 15 | for j in range(0, username_length - 1): 16 | full_email += (username[j]); 17 | if bin[j] == "1": 18 | full_email += "." 19 | full_email += (username[j + 1]) 20 | emails.append(full_email + "@" + domain) 21 | return emails 22 | 23 | -------------------------------------------------------------------------------- /GmailDotEmailGenerator/__init__.py: -------------------------------------------------------------------------------- 1 | from .GmailDotEmailGenerator import GmailDotEmailGenerator 2 | -------------------------------------------------------------------------------- /setup.py: -------------------------------------------------------------------------------- 1 | from distutils.core import setup 2 | 3 | setup(name='GmailDotEmailGenerator', 4 | version='1.0.0', 5 | description='Generates gmail dot emails', 6 | url='https://github.com/doprdele/GmailDotEmailGenerator', 7 | author='Evan Sarmiento', 8 | packages=['GmailDotEmailGenerator'], 9 | author_email='evansarm@gmail.com', 10 | license='MIT') 11 | --------------------------------------------------------------------------------