GitDorker Documentation

repository·master·Indexed 25 days ago

https://github.com/obheda12/gitdorker

A tool that uses the GitHub Search API and compiled GitHub dorks to identify sensitive information based on specific search queries. It supports Python 3 and Docker, requiring GitHub Personal Access Tokens to manage API rate limits.

Tokens
620
Snippets
3
Records
5
Agent score
33%

What's inside GitDorker

  1. Configure GitHub tokens to avoid rate limits

    master

    GitDorker uses the GitHub Search API, which is limited to 30 requests per minute. While the tool has a built-in sleep function to prevent failures, you can optimize performance by providing multiple tokens.

    Recommendation: Provide at least two GitHub personal access tokens in your token file. GitDorker will alternate between them during the dorking process, reducing the likelihood of hitting rate limits. Using tokens from separate GitHub accounts provides the best results.

  2. Install and set up GitDorker

    master

    GitDorker requires Python 3 and a GitHub Personal Access Token to function. To set up the environment locally:

    1. Ensure Python 3 is installed.
    2. Obtain a GitHub Personal Access Token (refer to GitHub's guide if needed).
    3. Install the necessary dependencies using pip:
    pip3 install -r requirements.txt
  3. Run GitDorker using Docker

    master

    If you prefer using Docker, you can build and run the tool in a containerized environment.

    Build the image:

    docker build -t gitdorker .

    Basic run (interactive):

    docker run -it gitdorker

    Full run with volume mapping: To ensure your tokens and dorks are accessible inside the container, map your local directory to /tf inside the container:

    docker run -it -v $(pwd)/tf:/tf gitdorker -tf tf/TOKENSFILE -q tesla.com -d dorks/DORKFILE -o tesla
  4. Reference: GitDorker CLI arguments

    master

    The following arguments are used by the GitDorker.py script:

    FlagDescription
    -tfPath to the file containing GitHub Personal Access Tokens
    -qThe search query (e.g., domain name)
    -dPath to the dorks file (e.g., alldorks.txt)
    -oOutput name/prefix for the results
  5. Run GitDorker via Python CLI

    master

    You can run GitDorker directly using the GitDorker.py script. Use the following flags to specify your tokens, search query, dork file, and output name:

    • -tf: Path to the file containing your GitHub Personal Access Tokens.
    • -q: The search query (e.g., a domain like tesla.com).
    • -d: Path to the dorks file (e.g., Dorks/DORKFILE).
    • -o: The output prefix/name for the results.

    Example usage:

    python3 GitDorker.py -tf TOKENSFILE -q tesla.com -d Dorks/DORKFILE -o tesla