This repository provides a Python-based implementation to generate Proof of Work (PoW) tokens and Sentinel tokens for bypassing security mechanisms in OpenAI's ChatGPT and Sora private APIs. By reverse engineering the browser's token generation process, this project enables programmatic access to these APIs without requiring manual interaction or browser-based token generation.
OpenAI's private APIs, such as ChatGPT and Sora, use advanced security mechanisms like Proof of Work (PoW) and Sentinel tokens to prevent unauthorized access. These tokens are typically generated in the browser using a combination of cryptographic hashing, unique identifiers, and environmental data.
This project reverse-engineers the token generation process to allow developers to programmatically generate these tokens and interact with the APIs directly. This can be useful for automation, testing, or research purposes.
- Proof of Work Token Generation: Implements a hashing-based PoW mechanism to generate valid tokens.
- Sentinel Token Generation: Creates Sentinel tokens required for API authentication.
- Reverse-Engineered Browser Behavior: Mimics browser-specific configurations and environmental data.
- Customizable: Easily modify configurations like user agents, navigator keys, and more.
The PoW token is generated by solving a computational challenge. The process involves:
- Generating a random seed and difficulty level.
- Iteratively hashing the seed with encoded configuration data until the hash meets the difficulty criteria.
- Returning the solution as a base64-encoded string.
The implementation is in proof_of_work.py
, which uses cryptographic hashing (sha3_512
) and base64 encoding to generate the token.
The Sentinel token is generated by:
- Fetching API requirements using the PoW token.
- Parsing the API response to extract necessary fields like
turnstile
andtoken
. - Constructing a payload with the extracted data and generating the final Sentinel token.
The implementation is in sentinel_token.py
, which handles API communication and token generation.
- Clone the repository:
git clone https://github.com/your-username/openai-sentinel.git cd openai-sentinel
- Install the required dependencies:
Ensure you have Python 3.8 or higher installed.
pip install -r requirements.txt
To generate a PoW token, run the following command:
python proof_of_work.py
This will output a valid PoW token that can be used for API authentication.
To generate a Sentinel token, run the following command:
python sentinel_token.py
This will output a valid Sentinel token that can be used for API authentication.
openai-sentinel/
├── proof_of_work.py
├── sentinel_token.py
├── config.py
├── requirements.txt
├── README.md
proof_of_work.py
: Contains the implementation for generating PoW tokens.sentinel_token.py
: Contains the implementation for generating Sentinel tokens.config.py
: Configuration file for user agents, navigator keys, and other settings.requirements.txt
: Lists the required Python packages.README.md
: This documentation file.
This project is intended for educational and research purposes only. The use of this code to bypass security mechanisms or access APIs without authorization may violate the terms of service of OpenAI or other third-party services. Use at your own risk, and ensure compliance with all applicable laws and regulations.
Please do not use this code for malicious purposes or to infringe on the rights of others. The author and contributors are not responsible for any misuse or damage caused by the use of this code.