jwt-hack
AGENTS.md1.1k starsChanged 2 days agoMITView on GitHub
JWT-HACK is a high-performance Rust-based JSON Web Token security testing toolkit. It provides JWT encoding, decoding, verification, cracking, and attack payload generation capabilities. Always reference these instructions first and fallback to search or bash commands only when you encounter unexpected information that does not match the info here.
- Pipes a download into a shell
- Installs packages
Trending
Quiet since June.about the whole repository
Who's talking about hahwul/jwt-hack
- hahwul/reqs“Add --mcp flag”GitHub · Oct 11, 2025 · 1 reactions
- Homebrew/homebrew-core“jwt-hack 2.3.0”GitHub · Sep 11, 2025 · 1 reactions
- NixOS/nixpkgs“jwt-hack: 2.5.0 -> 2.6.0”GitHub · Jun 7, 2026
- Homebrew/homebrew-core“jwt-hack 2.6.0”GitHub · Jun 5, 2026
- NixOS/nixpkgs“jwt-hack: 2.0.0 -> 2.5.0”GitHub · May 10, 2026
The biggest 5 of 17 mentions linking to the repository that our crawl found. Each line is their own headline.
See all 17
Talked about on GitHub (17 times).
On GitHub · 17
- Oct 11, 2025Add --mcp flag — hahwul/reqs1 reaction
- Sep 11, 2025jwt-hack 2.3.0 — Homebrew/homebrew-core1 reaction · 1 comment
- Jun 7, 2026jwt-hack: 2.5.0 -> 2.6.0 — NixOS/nixpkgs0 reactions · 1 comment
- Jun 5, 2026jwt-hack 2.6.0 — Homebrew/homebrew-core0 reactions · 1 comment
- May 10, 2026jwt-hack: 2.0.0 -> 2.5.0 — NixOS/nixpkgs0 reactions · 2 comments
12 more on GitHub
- Mar 2, 2026jwt-hack 2.5.0 — Homebrew/homebrew-core0 reactions · 1 comment
- Dec 25, 2025[WIP] Improve documentation structure for better navigation — hahwul/urx0 reactions
- Oct 26, 2025jwt-hack 2.4.0 — Homebrew/homebrew-core0 reactions · 1 comment
- Oct 11, 2025Add --mcp flag for Model Context Protocol server mode — hahwul/reqs0 reactions
- Sep 13, 2025jwt-hack 2.3.1 — Homebrew/homebrew-core0 reactions · 1 comment
- Sep 12, 2025jwt-hack: add build patch — Homebrew/homebrew-core0 reactions · 2 comments
- Aug 29, 2025jwt-hack 2.2.0 — Homebrew/homebrew-core0 reactions · 1 comment
- Aug 10, 2025jwt-hack 2.1.0 — Homebrew/homebrew-core0 reactions · 1 comment
- Jun 8, 2025jwt-hack: 1.2.0 -> 2.0.0 — NixOS/nixpkgs0 reactions · 1 comment
- May 22, 2024jwt-hack: 1.1.2 -> 1.2.0 — NixOS/nixpkgs0 reactions · 2 comments
- Dec 29, 2022[addtool] jwt-hack — gwen001/offsectools_www0 reactions · 2 comments
- Jun 15, 2022jwt-hack: init at 1.1.2 — NixOS/nixpkgs0 reactions · 1 comment
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.
Of the AGENTS.md files we read, the 35,337 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repositoryOne other file it gives its agents.
- docs/AGENTS.mdAGENTS.md
The file
Show its rules and text
We split this AGENTS.md into the rules it gives an agent
21 rules. About 0 are common, 9 are distinctive, and 12 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈9
Distinctive · estimate
This author's own choices. Worth a look.
12
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 5
Always reference these instructions first and fallback to search or bash commands only when you encounter unexpected information that does …
- Very specific: line 29
Run full test suite: just test -- takes 17 seconds.
- Very specific: line 37
Run performance benchmarks (criterion): just bench or cargo bench
- Very specific: line 40
Run a fuzz target (requires nightly + cargo install cargo-fuzz):
- Very specific: line 92
Always run these before committing changes or the CI (.github/workflows/ci.yml) will fail:
- Very specific: line 134
Create new module in src/cmd/
- Very specific: line 135
Add command struct with clap derives
- Very specific: line 137
Add to src/cmd/mod.rs and main command enum
- Distinctive: line 138
Add comprehensive unit tests
- Distinctive: line 144
Always add tests for new algorithms or validation logic
- Distinctive: line 145
Test with various JWT formats and edge cases
- Very specific: line 157
Dependency resolution errors: Delete Cargo.lock and rebuild
- Distinctive: line 158
Compilation errors: Ensure using latest stable Rust version
- Very specific: line 161
Clippy warnings: Run cargo clippy --fix --allow-dirty then manually review changes
- Very specific: line 162
Format failures: Run cargo fmt to auto-fix formatting
- Very specific: line 163
Unit test failures: Check if tests depend on specific sample data in samples/
- Distinctive: line 166
JWT parsing errors: Verify JWT format (header.payload.signature structure)
- Distinctive: line 167
Missing wordlist files: Use relative paths from project root or absolute paths
- Distinctive: line 168
Performance issues: Use release build for large-scale operations
- Distinctive: line 184
All CI checks must pass before merging.
- Very specific: line 214
Test files: src//*test*.rs or #[cfg(test)] modules
≈ “Common” is an estimate: at least 1 in 5 of the 45,344 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
JWT-HACK Development Instructions
JWT-HACK is a high-performance Rust-based JSON Web Token security testing toolkit. It provides JWT encoding, decoding, verification, cracking, and attack payload generation capabilities.
Always reference these instructions first and fallback to search or bash commands only when you encounter unexpected information that does not match the info here.
Working Effectively
Prerequisites and Setup
- Install Rust and Cargo (latest stable version recommended):
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh source ~/.cargo/env - Install Just task runner:
cargo install just
Build Commands
- CRITICAL: Set timeouts to 120+ seconds for all build commands. NEVER CANCEL builds.
- Development build:
just devorcargo build-- takes 75 seconds on first build with dependencies, 18 seconds on subsequent builds. NEVER CANCEL. Set timeout to 120+ seconds. - Release build:
just buildorcargo build --release-- takes 47 seconds. NEVER CANCEL. Set timeout to 90+ seconds. - Quick check (no build):
cargo check-- takes 15 seconds. Good for fast compilation verification. - Clean build:
cargo cleanfollowed by build commands. - Quick recompile after changes:
cargo build-- takes 3-5 seconds for incremental builds.
Testing
- Run full test suite:
just test-- takes 17 seconds. NEVER CANCEL. Set timeout to 60+ seconds. - This runs:
cargo test,cargo clippy,cargo fmt --check, andcargo doc - Unit tests only:
cargo test-- takes 3-5 seconds. - Lint only:
cargo clippy -- --deny warnings - Format check:
cargo fmt --check - Format code:
just fixorcargo fmt
Benchmarks and Fuzzing
- Run performance benchmarks (criterion):
just benchorcargo bench- Covers encode, decode, verify, and cracking (dictionary + brute force).
- CI tracks results against a baseline via
.github/workflows/benchmarks.yml.
- Run a fuzz target (requires nightly +
cargo install cargo-fuzz):just fuzz jwt_decode(orjwe_decode,header_parsing)cargo +nightly fuzz run <target> -- -max_total_time=60- Fuzz targets live in
fuzz/fuzz_targets/; scheduled/manual CI is in.github/workflows/fuzz.yml.
Development Tasks
- List available Just commands:
just --list - Format and fix linting:
just fix - Build documentation:
cargo doc --workspace --all-features --no-deps --document-private-items
Validation Scenarios
CRITICAL: Always run these validation steps after making changes:
- Build and Test Validation:
just dev && just test - Core Functionality Testing:
# Test decoding (should display header/payload breakdown with algorithm and timestamps) ./target/debug/jwt-hack decode eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.5mhBHqs5_DTLdINd9p5m7ZJ6XD0Xc55kIaCRY5r6HRA # Test encoding (should create valid JWT with spinner animation) ./target/debug/jwt-hack encode '{"sub":"1234", "name":"test"}' --secret=mysecret # Test verification (should show validation result) ./target/debug/jwt-hack verify eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.5mhBHqs5_DTLdINd9p5m7ZJ6XD0Xc55kIaCRY5r6HRA --secret=test # Test dictionary cracking (should process 16 words with progress bar) ./target/debug/jwt-hack crack -w samples/wordlist.txt eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0In0.CHANGED # Test brute force cracking (should generate combinations with progress) ./target/debug/jwt-hack crack -m brute eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0In0.CHANGED --max=2 # Test payload generation (should create none algorithm attack payloads) ./target/debug/jwt-hack payload eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0In0.CHANGED --target none # Test all payload types (should generate multiple attack vectors) ./target/debug/jwt-hack payload eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0In0.CHANGED --jwk-attack example.com - Help System Validation:
# Verify help displays correctly with banner ./target/debug/jwt-hack --help ./target/debug/jwt-hack decode --help ./target/debug/jwt-hack encode --help
Pre-commit Validation
Always run these before committing changes or the CI (.github/workflows/ci.yml) will fail:
cargo fmt
cargo clippy --all-targets --all-features -- -D warnings
cargo testProject Structure
Key Directories and Files
├── src/
│ ├── main.rs # Application entry point
│ ├── cmd/ # Command implementations
│ │ ├── decode.rs # JWT decoding functionality
│ │ ├── encode.rs # JWT encoding functionality
│ │ ├── verify.rs # JWT verification functionality
│ │ ├── crack.rs # JWT cracking (dict/brute force)
│ │ ├── payload.rs # Attack payload generation
│ │ └── version.rs # Version display
│ ├── jwt/ # Core JWT operations
│ ├── crack/ # Cracking algorithms and utilities
│ ├── payload/ # Payload generation logic
│ ├── printing/ # Output formatting and logging
│ └── utils/ # Shared utilities
├── samples/ # Test data
│ ├── jwt.txt # Sample JWT token
│ └── wordlist.txt # Sample wordlist for cracking
├── Cargo.toml # Rust project configuration
├── justfile # Task automation scripts
├── Dockerfile # Container build definition
└── .github/workflows/ # CI/CD pipelinesConfiguration Files
Cargo.toml: Dependencies, build configuration, binary definitionjustfile: Task automation (build, test, dev, fix commands).github/workflows/ci.yml: CI pipeline (builds on Ubuntu/macOS/Windows)
Common Development Patterns
Adding New Commands
- Create new module in
src/cmd/ - Add command struct with
clapderives - Implement execute function
- Add to
src/cmd/mod.rsand main command enum - Add comprehensive unit tests
- Update help documentation
Modifying JWT Operations
- Core JWT logic is in
src/jwt/ - Uses
jsonwebtokencrate for cryptographic operations - Always add tests for new algorithms or validation logic
- Test with various JWT formats and edge cases
Performance Considerations
- Uses
rayonfor parallel processing in cracking operations - Uses
indicatiffor progress bars on long-running operations - Built with release optimizations: LTO, single codegen unit, stripped binaries
Troubleshooting
Build Issues
- "cargo command not found": Install Rust toolchain with rustup
- "just command not found": Install with
cargo install just - Dependency resolution errors: Delete
Cargo.lockand rebuild - Compilation errors: Ensure using latest stable Rust version
Test Failures
- Clippy warnings: Run
cargo clippy --fix --allow-dirtythen manually review changes - Format failures: Run
cargo fmtto auto-fix formatting - Unit test failures: Check if tests depend on specific sample data in
samples/
Runtime Issues
- JWT parsing errors: Verify JWT format (header.payload.signature structure)
- Missing wordlist files: Use relative paths from project root or absolute paths
- Performance issues: Use release build for large-scale operations
Docker Build (Note: May fail in restricted environments)
# Docker build may fail due to network restrictions in sandboxed environments
docker build -t jwt-hack .
# If build fails, use local cargo builds insteadCI/CD Information
The project uses GitHub Actions with the following jobs:
- Build & Test: Runs on Ubuntu, macOS, Windows with stable Rust
- Lint: Runs
cargo fmt --checkandcargo clippywith strict warnings - Coverage: Generates code coverage reports using
cargo-llvm-cov
All CI checks must pass before merging. The pipeline takes approximately 5-10 minutes to complete.
Quick Reference
Most Common Commands
# Development workflow
just dev # Build for development (75s first build, 18s subsequent, timeout 120s)
just test # Run all tests (17s, timeout 60s)
just fix # Format and fix linting
# Manual commands
cargo check # Fast compilation check (15s, timeout 30s)
cargo build # Development build
cargo build --release # Production build (47s, timeout 90s)
cargo test # Unit tests only
cargo clippy # Linting
cargo fmt # Code formatting
# Application testing
./target/debug/jwt-hack --help # Show help with banner
./target/debug/jwt-hack decode TOKEN # Decode JWT (shows header/payload)
./target/debug/jwt-hack encode JSON --secret=KEY # Encode JWT (creates new token)
./target/debug/jwt-hack verify TOKEN --secret=KEY # Verify JWT signature
./target/debug/jwt-hack crack -w FILE TOKEN # Crack JWT with wordlist
./target/debug/jwt-hack crack -m brute TOKEN --max=N # Brute force crack
./target/debug/jwt-hack payload TOKEN --target=TYPE # Generate attack payloadsFile Patterns to Know
- Test files:
src/**/*test*.rsor#[cfg(test)]modules - Sample data:
samples/*.txt - Build artifacts:
target/(excluded from git) - Binary location:
target/debug/jwt-hackortarget/release/jwt-hack
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

