Automated offline CAPTCHA solver for JDownloader 2 (JD2). It uses a local YOLO Darknet convolutional neural network and in-memory geometric feature analysis to automatically solve CAPTCHAs that JD2 cannot handle natively.
Runs 100% locally and offline without third-party API keys or recurring subscription costs.
Note
Special Thanks to the Original Author:
Huge thanks and full credit to cracker0dks for creating the original CaptchaSolver project and training the neural network models that make offline CAPTCHA solving possible. This fork builds upon their excellent foundational work by introducing security hardening, zero-allocation in-memory transforms, CPU/RAM optimizations, automated GitHub Actions multi-arch CI/CD, and native Docker support.
| Host | CAPTCHA Type | Engine |
|---|---|---|
| keep2share.cc / k2s.cc | 6-Character Alphanumeric | YOLOv4-tiny neural network |
| fileboom.me / fboom.me | 6-Character Alphanumeric | YOLOv4-tiny neural network |
| tezfiles.com | 6-Character Alphanumeric | YOLOv4-tiny neural network |
| publish2.me | 6-Character Alphanumeric | YOLOv4-tiny neural network |
| depositfiles.com / dfiles.eu | 6-Character Alphanumeric | YOLOv4-tiny neural network |
| filejoker.net | Geometric Shape Matching | In-memory Pixelizer & Flood-fill |
This repository includes a production-ready, multi-stage Dockerfile and docker-compose.yml based on jlesage/jdownloader-2.
Features of the Docker setup:
- Native Darknet Compilation: Darknet is compiled from source in Stage 1 directly on Alpine Linux (
musl), supporting both AMD64 (x86_64) and ARM64 (Raspberry Pi, Apple Silicon hosts, ARM NAS) without glibc emulation hacks (gcompat). - Pre-bundled Dependencies: Node.js and production npm packages are baked into the image at build time.
- Cross-Platform Sanitization: Automatically sanitizes Windows
CRLFline endings viados2unixon startup. - Automatic Initialization: On container startup, an s6 init hook initializes the JAC captcha methods into
/config/jd/captcha/methodsand tools into/config/tools/offlineCaptchaSolverwith correct user permissions (USER_ID:GROUP_ID).
Option A: Run pre-built image from GitHub Container Registry (Fastest)
# Pull the pre-built multi-arch image (AMD64 & ARM64)
docker pull ghcr.io/devdrake/jd2captchasolver:latestOr using docker run:
docker run -d \
--name=jdownloader2 \
-p 5800:5800 \
-v /path/to/config:/config:rw \
-v /path/to/downloads:/output:rw \
-e USER_ID=1000 \
-e GROUP_ID=1000 \
-e TZ=Etc/UTC \
--restart unless-stopped \
ghcr.io/devdrake/jd2captchasolver:latestOption B: Clone & Build locally with Docker Compose
-
Clone this repository:
git clone https://github.com/DevDrake/JD2CaptchaSolver.git cd JD2CaptchaSolver -
Start the container:
docker compose up -d # (or 'docker compose up -d --build' to force a local rebuild) -
Open your browser and navigate to:
http://<your-server-ip>:5800JDownloader 2 will start with the offline CAPTCHA solver pre-configured and active.
version: '3.8'
services:
jdownloader:
# Pre-built multi-arch image from GitHub Container Registry (ghcr.io)
image: ghcr.io/devdrake/jd2captchasolver:latest
# Optional: build locally from source
# build:
# context: .
# dockerfile: Dockerfile
container_name: jdownloader2
environment:
- USER_ID=1000
- GROUP_ID=1000
- TZ=Etc/UTC
# Set DEBUG=true to output intermediate transform logs
- DEBUG=false
ports:
- "5800:5800" # JDownloader Web GUI
volumes:
- ./config:/config
- ./downloads:/output
restart: unless-stopped
security_opt:
- no-new-privileges:trueIf you already have a running jlesage/jdownloader-2 container (in Portainer, Unraid, TrueNAS, Synology, or plain Docker) and do not want to recreate or rebuild it, you can install JD2CaptchaSolver directly into the running container using install-in-docker.sh.
Run this command on your Docker host (replace jdownloader2 with your container's name or ID):
docker exec -u 0 -it jdownloader2 sh -c "wget -qO- https://raw.githubusercontent.com/DevDrake/JD2CaptchaSolver/master/install-in-docker.sh | sh"Or using curl if wget is not available:
docker exec -u 0 -it jdownloader2 sh -c "curl -fsSL https://raw.githubusercontent.com/DevDrake/JD2CaptchaSolver/master/install-in-docker.sh | sh"If you have already cloned this repository to your Docker host:
docker cp install-in-docker.sh jdownloader2:/tmp/install-in-docker.sh
docker exec -u 0 -it jdownloader2 sh /tmp/install-in-docker.shWhat the installer does automatically:
- Installs Node.js, npm, runtime libraries, and certificates via Alpine
apk. - Compiles Darknet natively from source inside the container for your exact host architecture (x86_64, ARM64, etc.) with maximum CPU compatibility (
AVX=0,OPENMP=0). - Clones
DevDrake/JD2CaptchaSolverand copies the solver scripts and JAC methods to/config. - Installs npm production dependencies (
jimp,image-pixelizer). - Configures an s6 boot script (
/etc/cont-init.d/99-captchasolver.sh) so file permissions and executables remain active across container restarts. - Cleans up compiler tools and temporary build files to save container disk space.
Final Step:
Restart JDownloader 2 via the Web UI (File -> Restart), or restart the container:
docker restart jdownloader2-
Install Node.js & npm: Ensure Node.js (v14+) is installed and accessible in your system
PATH:node -v npm -v
-
Clone & Install Dependencies:
git clone https://github.com/DevDrake/JD2CaptchaSolver.git cd JD2CaptchaSolver/"JDownloader 2.0"/tools/offlineCaptchaSolver npm ci --production chmod +x *.sh darknet64/darknet
-
Architecture Check (ARM64 vs. AMD64):
- On x86_64 (AMD64): The precompiled
darknet64/darknetbinary can be used directly on glibc-based systems (Ubuntu, Debian, Fedora). - On ARM64: Compile Darknet from source:
git clone --depth 1 https://github.com/AlexeyAB/darknet.git /tmp/darknet cd /tmp/darknet && make -j$(nproc) cp darknet <path-to-repo>/"JDownloader 2.0"/tools/offlineCaptchaSolver/darknet64/darknet
- On x86_64 (AMD64): The precompiled
-
Copy into JDownloader 2 Folder: Copy the contents of
JDownloader 2.0/into your JDownloader root directory (typically~/.jd, or~/.var/app/org.jdownloader.JDownloader/data/jdownloader/for Flatpak):cp -r "JDownloader 2.0/"* ~/.jd/
-
Restart JDownloader 2.
- Clone or download this repository:
git clone https://github.com/DevDrake/JD2CaptchaSolver.git
- Extract or copy the contents of the
JDownloader 2.0folder directly into your main JDownloader 2 installation directory (e.g.C:\Users\<User>\AppData\Local\JDownloader 2.0\). - If Darknet fails to run, install the Microsoft Visual C++ 2010 Service Pack 1 Redistributable Package (x64).
- Restart JDownloader 2.
If you run JDownloader on a remote NAS/server and prefer a decoupled architecture that does not modify your JDownloader container, consider: 👉 cracker0dks/captchaSolverRemote
This alternative runs as a separate container, connects to the official My.JDownloader cloud API, listens for CAPTCHAs, and submits solutions remotely.
This repository includes an automated GitHub Actions workflow (.github/workflows/docker-publish.yml) that builds and publishes multi-architecture Docker images.
- Target Registries:
- GitHub Container Registry (GHCR):
ghcr.io/devdrake/jd2captchasolver(published automatically on every push tomasterand tagged release). - Docker Hub (Optional):
docker.io/<username>/jd2captchasolver(published automatically if repository secretsDOCKERHUB_USERNAMEandDOCKERHUB_TOKENare set).
- GitHub Container Registry (GHCR):
- Supported Architectures: Cross-compiles native Darknet binaries for both
linux/amd64(x86_64) andlinux/arm64(Raspberry Pi, ARM NAS, Apple Silicon). - Build Triggers:
- Pushes to
masterormainbranches. - Version tags (e.g.,
v2.0.0). - Manual execution via the Actions tab in GitHub (
workflow_dispatch). - Pull Requests (build-tested without pushing).
- Pushes to
| Variable | Default | Description |
|---|---|---|
DEBUG |
false |
When set to true, outputs detailed processing logs and saves intermediate image files for debugging. |
CAPTCHA_INPUT |
input.gif |
Path to the CAPTCHA image provided by JDownloader. |
CAPTCHA_OUTPUT |
result.txt |
Target text file where the solved string is written. |
CAPTCHA_LOG |
log.txt |
Target file for JSON solver telemetry (confidence, host, answer). |
- Pre-processing: The input image is converted to grayscale, and pixel thresholding (
rgb.r < 253) strips out colored lines and background noise using a direct Uint8Array buffer pass. - Inference: The cleaned image (
darknet64/temp.jpg) is analyzed by Darknet using a custom-trained YOLOv4-tiny model (yolov4-tiny-custom_last.weights) configured in dedicated inference mode (batch=1,subdivisions=1). - Post-processing: Ambiguous font glyphs (such as uppercase
Ivs. lowercasel) are resolved, low-confidence false positives are pruned, and the predicted 6-character string is written toresult.txt. - Detailed training documentation: Walkthrough.
-
Pre-processing: The
$5 \times 5$ CAPTCHA grid is segmented into individual tiles. -
Clustering & Detection: Each tile is blurred, pixel-clustered (
image-pixelizer), and flood-filled from the center using a zero-allocation flat-array queue. - Shape Classification: Radius and perimeter pixel counts identify the geometry (Circle, Hexagon, Pentagon, Square, Triangle) to match the prompt tile.
- Performance: All transformations operate in memory to prevent disk wear on SSD/flash storage.
- Detailed shape documentation: Walkthrough.
- Execution & Stderr Log: Check
tools/offlineCaptchaSolver/solver.loginside your JD2 directory for process exit codes, Node errors, or Darknet messages. - Result & Confidence Log: Check
tools/offlineCaptchaSolver/log.txtfor the JSON response payload.
- Windows: Run
JDownloader 2.0\tools\offlineCaptchaSolver\darknet64\test.bat. - Linux / Docker:
Expected output:
cd tools/offlineCaptchaSolver/darknet64 ./darknet detector test data/obj.data yolov4-tiny-custom.cfg yolov4-tiny-custom_last.weights -dont_show temp.jpg
temp.jpg: Predicted in 74.892000 milli-seconds. e: 99% h: 74% C: 100% Y: 99% C: 100% 1: 99%
If a host changes its CAPTCHA provider:
- Navigate to
jd/captcha/methods/in your JDownloader folder. - Move or rename the corresponding directory (e.g.
keep2share_linuxorfilejoker_linux). - Restart JDownloader 2.
- Original concept and YOLO training by cracker0dks.
- Linux support contributions by Corubba.
- Hardening, performance tuning, and multi-arch Docker containerization by DevDrake.