https://github.com/liuzhen9320/capjs-cli
๐ A blazingly fast, parallel CapJS proof-of-work solver implemented in Rust (Powered By Claude)
https://github.com/liuzhen9320/capjs-cli
capjs captcha cli proof-of-work rust-cli
Last synced: 18 days ago
JSON representation
๐ A blazingly fast, parallel CapJS proof-of-work solver implemented in Rust (Powered By Claude)
- Host: GitHub
- URL: https://github.com/liuzhen9320/capjs-cli
- Owner: liuzhen9320
- License: agpl-3.0
- Created: 2025-08-28T15:29:08.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2025-08-28T16:21:16.000Z (11 months ago)
- Last Synced: 2026-06-23T19:34:54.913Z (19 days ago)
- Topics: capjs, captcha, cli, proof-of-work, rust-cli
- Language: Rust
- Homepage:
- Size: 39.1 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# โ๏ธ CapJS Proof-of-Work Solver CLI
> ๐ A blazingly fast, parallel Capjs proof-of-work solver implemented in Rust
## โจ Features
- ๐ฏ **Single Challenge Solving**: Solve individual proof-of-work challenges with precision
- ๐ฆ **Batch Processing**: Generate and solve thousands of challenges in parallel
- ๐ง **JSON Support**: Import/export challenges in structured JSON format
- ๐งต **Multi-threading**: Configurable worker threads for maximum CPU utilization
- ๐ **Progress Tracking**: Beautiful progress bars with ETA for long operations
- ๐จ **Flexible Output**: Choose between plain text, JSON, or pretty-printed formats
- โก **Zero-Copy Operations**: Optimized buffer operations for maximum performance
- ๐ **SHA-256 Hashing**: Industry-standard cryptographic hashing
## ๐ ๏ธ Installation
### From Source
```bash
git clone https://github.com/liuzhen9320/capjs-cli.git
cd capjs-cli
cargo install --path .
```
### Pre-built Binaries
Download the latest release from our [GitHub Releases](https://github.com/liuzhen9320/capjs-cli/releases) page.
## ๐ Quick Start
### ๐ฏ Solve a Single Challenge
```bash
# Basic usage
pow-solver single --salt "a5b6fda4aaed97cf61d7dd9259f733b5" --target "d455"
# Output:
# Salt: a5b6fda4aaed97cf61d7dd9259f733b5
# Target: d455
# Nonce: 67302
# Duration: 371.226518 ms
```
### ๐ฆ Generate and Solve Multiple Challenges
```bash
# Standard web page validation. The data here can be obtained from the http://API_HOST/API_KEY/challenge endpoint
pow-solver multi -c 50 -d 4 -s 32 -t 4097a4371e6852602a1b7d91bd4eccf5e356365756fef135b9
# More scientific, using JSON output for easier parsing
pow-solver multi -c 50 -d 4 -s 32 -t 4097a4371e6852602a1b7d91bd4eccf5e356365756fef135b9 -o json
```
## ๐จ Output Formats
### Plain Text (Default)
```
Challenge 0: salt=a1b2c3, target=000012, nonce=87654, duration=0.234s
Challenge 1: salt=d4e5f6, target=000034, nonce=12345, duration=0.456s
```
### JSON Compact
```json
[
{
"challenge_index": 0,
"salt": "a1b2c3",
"target": "000012",
"nonce": 87654,
"duration": 0.234
}
]
```
### JSON Pretty
```json
[
{
"challenge_index": 0,
"salt": "a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4",
"target": "000012",
"nonce": 87654,
"duration": 0.234
}
]
```
## โ๏ธ Command Reference
### ๐ฏ `single` - Solve Single Challenge
| Flag | Description | Example |
| -------------- | ----------------------- | -------------------- |
| `-s, --salt` | Salt string for hashing | `--salt "mysalt123"` |
| `-t, --target` | Target hex prefix | `--target "00000a"` |
### ๐ฆ `multi` - Batch Processing
| Flag | Default | Description |
| --------------------- | -------- | ------------------------- |
| `-t, --challenge` | Required | Seed token for generation |
| `-c, --count` | `1` | Number of challenges |
| `-s, --salt-length` | `32` | Generated salt length |
| `-d, --target-length` | `6` | Target difficulty length |
| `-w, --workers` | `0` | Worker threads (0=auto) |
| `-o, --output` | `plain` | Output format |
### ๐ `json` - JSON Input Mode
| Flag | Default | Description |
| --------------- | -------- | ----------------------- |
| `-i, --input` | Required | JSON challenge array |
| `-w, --workers` | `0` | Worker threads (0=auto) |
## ๐งฎ Difficulty Guide
Understanding target difficulty:
| Length | Avg Attempts | Difficulty | Use Case |
| ------ | ------------ | ------------ | ------------------- |
| 3 | ~4K | ๐ข Easy | Development/Testing |
| 4 | ~65K | ๐ก Medium | Small-scale mining |
| 5 | ~1M | ๐ Hard | Production use |
| 6 | ~16M | ๐ด Very Hard | High security |
| 7 | ~268M | โซ Extreme | Enterprise/Research |
> ๐ก **Tip**: Each additional hex character increases difficulty by ~16x
## ๐ค Contributing
We welcome contributions!
### ๐ Found a Bug?
1. ๐ Check [existing issues](https://github.com/liuzhen9320/capjs-cli/issues)
2. ๐ Create a detailed bug report
3. ๐ท๏ธ Add appropriate labels
### ๐ก Feature Requests
1. ๐ญ Open an issue with the "enhancement" label
2. ๐ Describe the use case and benefits
3. ๐ค Discuss implementation approaches
## Third-Party Libraries Used
### @cap.js/wasm
- Source:
- License: Apache License 2.0
This project uses this library and complies with the requirements of the Apache-2.0 license. The full license text is included in the appendix.