Giter Club home page Giter Club logo

chatgpt-api-leakage's Introduction

ChatGPT-API-Leakage

This tool scans GitHub for available OpenAI API Keys.

Result Demo 1

Warning

⚠️ DISCLAIMER

THIS PROJECT IS ONLY FOR SECURITY RESEARCH AND REMINDS OTHERS TO PROTECT THEIR PROPERTY, DO NOT USE IT ILLEGALLY!!

The project authors are not responsible for any consequences resulting from misuse.

本项目仅用于安全研究以及提醒人们注意保护个人信息,本项目禁止用于任何违法用途!!

项目作者不对任何滥用导致的后果负责。

Note

As of March 11, 2024, secret scanning and push protection will be enabled by default for all new user-owned public repositories that you create. Check this announcement here.

Keeping Your API Key Safe

It's important to keep it safe to prevent unauthorized access. Here are some useful resources:

Prerequisites

This project has been tested and works perfectly on macOS, Windows and WSL2 (see Run Linux GUI apps on the Windows Subsystem for Linux)

Ensure you have the following installed on your system:

  • Google Chrome
  • Python3

Installation

  1. Clone the repository:

    git clone https://github.com/Junyi-99/ChatGPT-API-Leakage
    
    cd ChatGPT-API-Leakage
  2. Install required pypi packages

    pip install -r requirements.txt

Usage

  1. Run the main script:

    python3 main.py
  2. You will be prompted to log in to your GitHub account in the browser. Please do so.

That's it! The script will now scan GitHub for available OpenAI API Keys.

Results

The results are stored in the github.db SQLite database, which is created in the same directory as the script.

You can view the contents of this database using any SQLite database browser of your choice.

Result Demo 1

Result Demo 2

FAQ

Q: Why are you using Selenium instead of the GitHub Search API?

A: Because the official search API does not support regex search. Only web-based search does.

Q: Why are you limiting the programming language in the search instead of searching all languages?

A: Because the web-based search only provides the first 5 pages of results. There are many API keys available. By limiting the language, we can split the search results and obtain more keys.

Q: Why don't you use multithreading?

A: Because GitHub searches and OpenAI are rate-limited. Using multithreading does not significantly increase efficiency.

chatgpt-api-leakage's People

Contributors

jestyf avatar junyi-99 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.