No description
Find a file
Renovate Bot c2d3f755dd
All checks were successful
ci/woodpecker/manual/woodpecker Pipeline was successful
ci/woodpecker/pull_request_closed/woodpecker Pipeline was successful
fix(deps): update rust crate url to v2.5.0
2024-06-04 08:00:40 +00:00
.github/workflows moved from mono repo 2021-03-09 15:51:11 +05:30
.reuse feat: init reuse.software 2023-10-23 19:10:58 +05:30
benches update deps and benchemark 2021-08-31 14:24:23 +05:30
docs/third-party feat: add NLnet funding details 2023-03-08 17:25:34 +05:30
LICENSES feat: init reuse.software 2023-10-23 19:10:58 +05:30
scripts update deps and benchemark 2021-08-31 14:24:23 +05:30
src feat: parse webpage and compute PoW for widget 2023-10-27 03:40:55 +05:30
.dockerignore feat: publish docker 2023-10-23 19:06:09 +05:30
.env.dev.sample feat: setup cross compilation 2023-10-23 18:54:44 +05:30
.gitignore feat: setup cross compilation 2023-10-23 18:54:44 +05:30
.woodpecker.yml feat: init CI 2023-10-23 19:07:39 +05:30
Cargo.lock fix(deps): update rust crate url to v2.5.0 2024-06-04 08:00:40 +00:00
Cargo.toml feat: bumb version 2023-10-27 03:41:31 +05:30
code_of_conduct.md added code_of_conduct.md 2021-05-02 18:13:29 +05:30
Dockerfile fix: docker img src code 2023-10-27 22:16:45 +05:30
Makefile fix: build dir 2023-10-27 03:55:23 +05:30
pack.sh feat: init reuse.software 2023-10-23 19:10:58 +05:30
README.md feat: parse webpage and compute PoW for widget 2023-10-27 03:40:55 +05:30
renovate.json Add renovate.json 2024-06-04 07:33:47 +00:00
upload.sh feat: init reuse.software 2023-10-23 19:10:58 +05:30

mCaptcha PoW CLI

mCaptcha - PoW based DoS protection

Documentation CI (Linux) dependency status
codecov

Usage

Modes:

  1. Offline: Computes PoW over given CAPTCHA parameters
  2. Protected Page: Compute mCaptcha challenge for the CAPTCHA at a protected page
  3. Widget URL: Compute PoW for captcha at widget URL
Usage: mcaptcha-cli <COMMAND>

Commands:
  offline         Compute PoW with offline parameters
  protected-page  Compute PoW by fetching parameters from  protected page URL
  widget-url      Compute PoW by fetching parameters from  CAPTCHA URL
  help            Print this message or the help of the given subcommand(s)

Options:
  -h, --help     Print help
  -V, --version  Print version

Offline

Help menu:

Compute PoW with offline parameters

Usage: mcaptcha-cli offline --salt <SALT> --phrase <PHRASE> --difficulty-factor <DIFFICULTY_FACTOR>

Options:
  -s, --salt <SALT>                            Salt with which PoW should be computed
  -p, --phrase <PHRASE>                        Phrase over which PoW should be computed
  -d, --difficulty-factor <DIFFICULTY_FACTOR>  Difficulty Factor
  -h, --help                                   Print help

Example usage:

13:28 atm@lab cli ±|online|→ mcaptcha-cli offline -s $(rand 32) -p $(rand 32) -d 50000
difficulty: 50000
nonce: 90507
original phrase: f351f333d44b2c6b5bf7f033b065bbb8fb5e9dd153bd402e43ed04425f5a3859
result: 340276562956196291522979356090220150471

(where rand is this script)

Protected Page

Used to generate authorization tokens for CAPTCHA at a protected page

03:39 atm@lab cli ±|feat-parse-webpage ✗|→ mcaptcha-cli protected-page https://showcase.mcaptcha.org/
Authorization token: eRAZJiMrW58uDYA1s64Tmwq1u30HutuF

Widget URL

Fetches CAPTCHA parameters from CAPTCHA URL, computes PoW, validates against given mCaptcha server and returns authorization token

Help menu:

Compute PoW by fetching parameters from  CAPTCHA URL

Usage: mcaptcha-cli online --url <URL>

Options:
  -u, --url <URL>  URL of the CAPTCHA. Example:  https://example.org/widget?sitekey=foo
  -h, --help       Print help

Example usage:

13:32 atm@lab cli ±|online ✗|→ mcaptcha-cli online -u https://demo.mcaptcha.org/widget?sitekey=pHy0AktWyOKuxZDzFfoaewncWecCHo23
Authorization token: 3xleN26OctBuVu3X4t6CYyUjErhaxQvz

Funding

NLnet

NLnet NGIZero logo

2023 development is funded through the NGI0 Entrust Fund, via NLnet. Please see here for more details.