Skip to main content

wulu-geetest-bypass-nine

Offline nine-grid solver for Geetest v4 CAPTCHAs. The challenge is a 3×3 grid plus a prompt icon; the solver picks the cells that show the same object and returns their grid positions.

Works either way: as a plugin of wulu-geetest-bypass, which adds click-track generation and submission, or standalone — the package exports solve_nine() and imports nothing from the main package.

How it works

A single end-to-end ONNX neural classifier:

  1. Prompt class lookup: The prompt icon's MD5 hash is matched against the class registry (from ONNX custom metadata classes or environment variables), resolving the target category index.
  2. Grid preprocessing:
    • The grid image carries a 2px black bar at the bottom (all collected samples do), so bar_rows() trims it before cutting.
    • The three-way boundaries start at ceil(i * h / 3) — the real seams sit at rows 87 and 173 of the 259-tall content (i.e. ceil(86.33) and ceil(172.67)), while every cell is h // 3 = 86 tall, cleanly dropping the seam row:
0..85   87..172   173..258      86 rows each, seams exactly between cells
  1. Batch inference:
    • All 9 cells are cropped, resized to the model's expected resolution (auto-detected from the ONNX graph, default 128×128), and normalized with ImageNet mean and std.
    • The resulting tensor of shape (9, 3, H, W) is fed into nine.onnx in a single forward pass.
    • The logits corresponding to the target prompt class index logits[:, target_idx] rank the cells by matching confidence.
    • The top nine_nums cells are returned in click order.

Model

File Size Type Input Shape Output Shape
nine.onnx ~14 MiB CNN Classifier image [batch, 3, 128, 128] logits [batch, num_classes]

Category metadata (classes) is embedded directly in the ONNX file's custom metadata map as a comma-separated list of prompt icon hashes.

Custom Model Integration

You can provide your own trained ONNX model weights without modifying any code. Point the environment variable NINE_MODEL_PATH to your model file:

export NINE_MODEL_PATH=/path/to/your_custom_model.onnx

Model Requirements

  1. Input Tensor:

    • Shape: [batch, 3, H, W] (e.g. [batch, 3, 128, 128], [batch, 3, 224, 224], or arbitrary H×W). The solver automatically inspects the ONNX graph's input shape to resize candidate cells. If dimensions are dynamic or unspecified, it defaults to 128×128.
    • Node name: Arbitrary (auto-detected via session.get_inputs()[0].name).
    • Normalization: RGB format normalized with ImageNet statistics: mean = [0.485, 0.456, 0.406], std = [0.229, 0.224, 0.225].
  2. Output Tensor:

    • Shape: [batch, num_classes] returning raw classification logits for each grid cell.
    • Node name: Arbitrary (auto-detected via session.get_outputs()[0].name).
  3. Class Mapping (classes): The solver matches each prompt icon by its MD5 hex digest against the target output column index. You can provide this mapping via either of two methods:

    • Method A (Recommended — Embed into ONNX metadata):
      import onnx
      
      model = onnx.load('your_model.onnx')
      meta = model.metadata_props.add()
      meta.key = 'classes'
      meta.value = ','.join(class_md5_hashes)  # e.g. "0259c3ab...,16a04e9c..."
      onnx.save(model, 'your_model.onnx')
      
    • Method B (Environment Variables):
      • Set NINE_CLASSES_PATH=/path/to/classes.txt (newline-separated or comma-separated list of hashes, or a JSON array), or
      • Set NINE_CLASSES=hash1,hash2,hash3,....

Performance

Single process, CPU (CPUExecutionProvider), batched 9-cell inference:

Function Latency (CPU)
solve_nine ~15–25 ms

Download

The model file is fetched on first use into platformdirs.user_cache_dir('wulu-geetest-bypass', appauthor=False) / 'nine' and SHA-256 verified against the registry in hub.py.

hub.py also runs as a script, which fetches the file up front instead of waiting for the first challenge:

python -m wulu_geetest_bypass_nine.hub

If huggingface.co is unreachable, point HF_ENDPOINT at a mirror — the same variable huggingface_hub reads:

export HF_ENDPOINT=https://hf-mirror.com

HF_ENDPOINT is read when the package is first imported, so set it before the solver runs.

Usage

As a plugin of the main package:

uv add wulu-geetest-bypass[nine]

The solver registers as an entry point of the wulu_geetest_bypass.solvers group under the nine captcha type, and is discovered automatically by wulu_geetest_bypass.

from wulu_geetest_bypass import Geetest

solver = Geetest(captcha_id='your_captcha_id', risk_type='nine')
seccode = await solver.resolve()

Or standalone:

pip install wulu-geetest-bypass-nine
from wulu_geetest_bypass_nine import solve_nine

cells = solve_nine(grid_bytes, [prompt_bytes], 3)
# [[row, col], ...] 1-based, in click order — e.g. [[1, 1], [3, 3], [1, 3]]

Grid positions are 1-based on both axes, matching the SDK's userresponse (dataId is 1..3); score_nine() returns the same ranking as raw logits if you need the scores.

Metadata

Release files for wulu-geetest-bypass-nine 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for wulu-geetest-bypass-nine 0.1.1
File Size Uploaded Provenance Actions
wulu_geetest_bypass_nine-0.1.1.tar.gz 8.1 kB With provenance Details for wulu_geetest_bypass_nine-0.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for wulu-geetest-bypass-nine 0.1.1
File Interpreter ABI Platform Actions
wulu_geetest_bypass_nine-0.1.1-py3-none-any.whl Python 3 none any Details for wulu_geetest_bypass_nine-0.1.1-py3-none-any.whl

Total release size: 17.3 kB

Release files / wulu_geetest_bypass_nine-0.1.1.tar.gz

Download URL wulu_geetest_bypass_nine-0.1.1.tar.gz
Size 8.1 kB
Tags Source
SHA-256 checksum
How to use checksums
1a81bc3f48dafde018b6c1d68ec5d76891eacc542d602d810fbbb1e5422c5ea0
BLAKE2b-256 checksum
How to use checksums
e4711d7b183db6131eb3b6c8e62cc00c0418820999c13bd6a9090d5674a316f5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 31, 2026.

Transparency log

Release files / wulu_geetest_bypass_nine-0.1.1-py3-none-any.whl

Download URL wulu_geetest_bypass_nine-0.1.1-py3-none-any.whl
Size 9.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8667d38bef705797a13e5947a8527515cb25ae1c1b01a84131c52c909ab1a074
BLAKE2b-256 checksum
How to use checksums
dd038e1d95ef8b9d393837fd0cb8b08f1393c04cbe7bf052255dcddb9fe0850c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 31, 2026.

Transparency log

Security for wulu-geetest-bypass-nine 0.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for wulu_geetest_bypass_nine-0.1.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 31, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page