NOJSCAP/README.md
2025-08-21 12:49:29 +00:00

77 lines
1.7 KiB
Markdown

# NOJSCAP
**NOJSCAP** is a minimal Proof-of-Work based CAPTCHA system. It includes both:
- A **NOJSCAP client** that computes valid nonces for challenge strings using SHA-256.
- A **NOJSCAP server** that issue challenges and verify solutions over HTTP.
This repository is structured as a monorepo containing both the client and server codebases.
Read project background: [https://libroot.org/posts/project-nojscap/](https://libroot.org/posts/project-nojscap/)
---
## Structure
```
.
├── client/ # Proof-of-Work nonce generator implementations
└── server/ # Server-side challenge issuers & verifiers
```
---
## Client
The client directory includes NOJSCAP client implementations in multiple languages. Each version takes a challenge string and a difficulty level, then searches for a nonce such that the SHA-256 hash of `challenge + nonce` begins with the required number of leading zero bits.
### Supported Languages
- **C**: `nojscap.c`
- **Go**: `nojscap.go`
- **Python**: `nojscap.py`
- **JavaScript (Node.js)**: `nojscap.js`
- **Rust**: `nojscap.rs`
Each implementation is self-contained and demonstrates equivalent functionality.
---
## Server
The `server` directory contains example implementations in multiple languages of NOJSCAP servers that issue PoW challenges and validate solutions.
### Available Servers
* **Python + Flask**
```sh
cd server/python-html
python3 server.py
```
* **TypeScript + Express**
```sh
cd server/ts-express
npm install
npx tsx start
```
* **Go + net/http**
```sh
cd server/go-http
go run server.go
```
Each server implementation listens for challenge requests and verifies submitted nonces against the configured difficulty level.
---
## License
GNU AGPLv3