A command-line companion for CTFs and authorized cybersecurity testing.
- Base64, hex, and URL decoding
- JWT inspection and offline HS256 wordlist testing
- Example SQL injection, XSS, command-injection, and file-inclusion payload generation
- DNS, WHOIS, IP geolocation, and Shodan lookups
- Modular CLI design
Use testing features only against systems you own or are explicitly authorized to assess. JWT wordlist testing can consume significant CPU and should only be performed with permission.
- Python 3.12 or newer
- A virtual environment is recommended
git clone https://github.com/jagdishtripathy/ctf-helper.git
cd ctf-helper
python3 -m venv .venv
source .venv/bin/activate
python -m pip install --upgrade pip
python -m pip install -r requirements.txt
python ctf --helpOn Windows PowerShell, activate the virtual environment with:
.venv\Scripts\Activate.ps1Decode a string:
python ctf --decode SGVsbG8gd29ybGQhDecode a JWT without verifying its signature:
python ctf --jwt-decode 'eyJhbGciOiJIUzI1NiIsInR...'Test a JWT HMAC secret against a wordlist you are authorized to use:
python ctf --jwt-brute '<JWT>' /path/to/wordlist.txtLook up DNS or WHOIS data:
python ctf --dns-lookup example.com
python ctf --whois-lookup example.comGet IP geolocation data:
python ctf --geolocate 8.8.8.8The Shodan API key is not stored in the source code. Set it in your shell before using Shodan:
Linux/macOS:
export SHODAN_API_KEY='your-shodan-api-key'
python ctf --shodan 1.1.1.1Windows PowerShell:
$env:SHODAN_API_KEY = "your-shodan-api-key"
python ctf --shodan 1.1.1.1Do not commit API keys or other secrets to Git. If a key has previously been committed, revoke or rotate it because removing it from the latest source does not remove it from Git history.
Dependencies are pinned in requirements.txt. Dependabot is configured to propose weekly updates, and GitHub Actions runs dependency auditing and basic CLI checks.
For a local audit:
python -m pip install pip-audit
pip-audit -r requirements.txtPull requests are welcome. For major changes, open an issue first, then submit a focused pull request with test results.
See LICENSE.
