NOJSCAP/client
2025-08-06 16:58:36 +00:00
..
nojscap.c Initial commit. 2025-08-06 16:58:36 +00:00
nojscap.go Initial commit. 2025-08-06 16:58:36 +00:00
nojscap.js Initial commit. 2025-08-06 16:58:36 +00:00
nojscap.py Initial commit. 2025-08-06 16:58:36 +00:00
nojscap.rs Initial commit. 2025-08-06 16:58:36 +00:00
README.md Initial commit. 2025-08-06 16:58:36 +00:00

NOJSCAP 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.

Implementations

  • C: nojscap.c
  • Go: nojscap.go
  • Python: nojscap.py
  • JavaScript (Node.js): nojscap.js
  • Rust: nojscap.rs

Each implementation provides similar usage and functionality.


C Version

Compilation

You need:

  • GCC or any C compiler
  • OpenSSL development libraries (libssl-dev on Debian-based systems)
gcc -O2 -o nojscap nojscap.c -lssl -lcrypto

Usage

./nojscap <challenge_string> <difficulty_bits>
  • challenge_string: Any input string used as the challenge.
  • difficulty_bits: Integer between 1 and 256. Higher values are more computationally expensive.

Example

./nojscap libroot12 26
Attempts: 0
Attempts: 1048576
Attempts: 2097152
Attempts: 3145728
Attempts: 4194304
Attempts: 5242880
Attempts: 6291456
Found nonce: 6368109
Hash: 0000000e724d990815e84e8a53f3f2410875046fe62a050de830d706b853ebe2

Python

python3 nojscap.py <challenge_string> <difficulty_bits>

May require the hashlib module if using older Python verisons (standard in Python 3).

Go

go run nojscap.go <challenge_string> <difficulty_bits>

Requires Go 1.13+.

JavaScript (Node.js)

node nojscap.js <challenge_string> <difficulty_bits>

Uses the built-in crypto module.

Rust

rustc nojscap.rs -o nojscap_rs
./nojscap_rs <challenge_string> <difficulty_bits>

Requires Rust and sha2 crate if using the Cargo version.