No description
  • C 95.3%
  • CMake 2.9%
  • Makefile 1.8%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-11-16 01:28:43 +01:00
images docs: add initial readme 2026-11-08 19:02:39 +01:00
src fix: free cJSON json and result.body in gitlab, and return when header becomes too long 2026-11-16 01:28:22 +01:00
.gitignore fix(build): change build path to be same as Make and add release cmake folder to .gitignore 2026-11-09 16:18:08 +01:00
CMakeLists.txt fix(build): Update CMakeLists.txt 2026-11-15 23:15:13 +01:00
LICENSE.md Initial Commit 2026-11-07 01:14:28 +01:00
Makefile feat: add request callback to process response json with cJSON 2026-11-15 16:50:45 +01:00
README.md docs: add shorthand cli args to docs 2026-11-16 01:28:43 +01:00

Keytester

Keytester is a program that can test if your API keys work. It supports multiple services, currently supporting 10+ services, but with more providers planned. It is written in C, using the libcurl library for requests, and termios for hiding keys when the program asks for it on linux. API keys can be supplied through command-line arguments, environment variables, or the hidden-input prompt. They are checked in that order, with the prompt being the last fallback. This is my first ever C program, so bugs may still exist. I made it for HackClub's Terra program.

Screenshot

Screenshot showing the program in action

Key providers:

The following API providers are implemented right now:

Service Parameter Endpoint
Discord (bots) discord https://discord.com/api/v10/users/@me
Discord (webhooks) webhook-dc The webhook's url
Google Gemini gemini https://generativelanguage.googleapis.com/v1beta/models
OpenRouter openrouter https://openrouter.ai/api/v1/key
GitHub github https://api.github.com/user
GitLab gitlab https://gitlab.com/api/v4/user
NASA nasa https://api.nasa.gov/planetary/apod?api_key=
Slack slack https://slack.com/api/auth.test
OpenWeather openweather https://api.openweathermap.org/data/2.5/weather?q=London&appid=
Telegram (bots) telegram https://api.telegram.org/bot/getMe

The endpoints used are chosen to minimize API usage to the key owner, so they only affect limits if it is the only option available.

Requirements

Keytester supports both Linux and Windows systems.

Usage:

To use the program, you should first download it from github releases or build it from source

Linux

Locate the downloaded/built file, and give it executable permissions:

chmod +x ./keytester

Then run the file:

./keytester --help (or -h) # Shows command usage
./keytester -v (or --version) # Shows keytester version
./keytester providers # Lists all providers
./keytester --provider (or -p) discord --key <your token> # Tests a discord bot token.
./keytester --provider gitlab # Tests a gitlab key by checking environment variables, and if none found prompting the user.

Windows

Run the executable (.exe) from powershell or command prompt:

.\keytester.exe --help
.\keytester.exe -v
.\keytester.exe providers
.\keytester.exe --provider discord --key <token>
.\keytester.exe --provider gitlab

Building from source

To build from source you need the following dependencies: curl, make and gcc To install them use these instructions:

Arch Linux:

sudo pacman -S base-devel curl

Ubuntu / Debian / Linux Mint

sudo apt update
sudo apt install build-essential libcurl4-openssl-dev

Windows

On windows, you need the following dependencies to build:

  • MinGW-w64 GCC
  • CMake
  • Ninja
  • vcpkg
    • libcurl
    • cJSON

Other distributions

For other distributions, please look up their corresponding docs to find out which packages to install.

Instructions:

Firstly, clone the repository:

git clone https://github.com/ItsGoldMonke/Keytester.git
cd Keytester

Then compile the project:

Linux - Makefile

After installing the dependencies

make

Then your binary should be built at bin/keytester.

Windows - CMake & vcpkg

To build on Windows, we use CMake with MinGW-w64 and vcpkg to manage packages.

  1. Install CMake
  2. Install Ninja
  3. Install MinGW-w64
  4. Install vcpkg

You should make sure MinGW-w64 and CMake are in your PATH.

Installing dependencies:

Open a terminal and use vcpkg to install libcurl and cJSON.

Replace with the triplet matching your MinGW toolchain:

vcpkg install curl cjson --triplet <triplet>

For example, a typical 64-bit MinGW dynamic triplet is x64-mingw-dynamic.

Configure and build

Configure the project using your vcpkg installation:

cmake -S . -B build -G Ninja `
    -DCMAKE_BUILD_TYPE=Release `
-DCMAKE_TOOLCHAIN_FILE="C:/path/to/vcpkg/scripts/buildsystems/vcpkg.cmake" `
-DVCPKG_TARGET_TRIPLET=<triplet>

Replace the toolchain path with the actual location of your vcpkg installation.

Then compile:

cmake --build build

The executable will be generated at:

bin/Release/keytester.exe

Disclaimer

You should only use this with your OWN keys, tokens, and links, or ones you are permitted to use.

Credits

This project was heavily inspired by Keylyzer, as it inspired me to make a similar program.