NOJSCAP/README.md
2025-08-06 18:54:24 +00:00

1.6 KiB

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.


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
cd server/python-html
python3 server.py
  • TypeScript + Express
cd server/ts-express
npm install
npx tsx start
  • Go + net/http
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

TODO