Skip to content

Identify Github accounts associated with email addresses

License

Notifications You must be signed in to change notification settings

h51un6/email2github

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

email2github

Identify Github accounts associated with email addresses

Requisites

Important : email2github requires python >=3.8.

Your personal repository on github will need two elements :

  • An authentication token :

This tool uses the Github API. Please create a personal access token by following this documentation. The scope of the token must include "repo" and "delete_repo", as the tool will create and delete fake private repositories.

Important : the token is asked at the first start and then saved as a json file inside a tmp directory in the repo. If you need to remove the token from the cache, simply edit or delete this file.

  • a ssh public key :

Generate a ssh key on your machine :

ssh-keygen -f github -C github

Here the key will be named github and the domain will also be github. But feel free to change these values.

Export the public key to your github account.

Installation

# Clone the repo
$ git clone https://github.com/h51un6/email2github.git

# Change the working directory
$ cd email2github

# Create and activate a virtual environment (optional step)
$ python3 -m venv venv
$ . venv/bin/activate

# Install the requirements
$ pip install -r requirements.txt

Usage

$ python email2github search --help
Usage: python -m email2github search [OPTIONS] EMAILS

  Search email addresses on Github

  This command try to resolve email addresses to Github accounts with various
  techniques, from the most simple to the most intrusive.

  Email addresses could be set from a file or from a comma-separated list.

Options:
  -o, --output PATH  Save the results as CSV in a file
  -q, --quiet        Suppress helping messages
  --help             Show this message and exit.

Examples

Description Command
Search a single email python email2github search EMAIL
Search from a file python email2github search FILEPATH
Search a list of emails python email2github search EMAIL1,EMAIL2

Techniques

Technique Description Scope
Search in emails Use the Github's users search endpoint to search account by email Public email
Create fake commits Create fake commits with arbitrary email. GitHub automatically resolves the emails to a GitHub accounts associated with them. Public, private, primary and secondary email

Inspiration

Thanks to the antnks' enumerate Github users POC.

About

Identify Github accounts associated with email addresses

Topics

Resources

License

Stars

Watchers

Forks

Languages