Commit Graph
36 Commits
Author SHA1 Message Date
lukaszraczylo bfbb78383d docs: README updates for gemini, stealth coherence, headed mode
Reflect the previously-deferred items as done: gemini provider is fully wired
to native generateContent (vision + audio), unit-tested, with a note that live
use needs a real Google key. Document that get_stealth_script now takes
os/browser/locale/seed and returns a fingerprint, and that the evasion script
is templated to match it (coherent) — inject both together or share a seed.
Note reasoning-model <think> blocks are stripped before json parse. Record the
CAPTCHA_E2E_HEADED toggle, drop the done roadmap items, keep the honest note
that headless reCAPTCHA v2 usually won't mint a token, and call out the single
package-lock.json lockfile.
2026-06-07 14:35:05 +01:00
lukaszraczylo b3c32864e9 chore: drop duplicate pnpm-lock.yaml
Two lockfiles existed (package-lock.json and pnpm-lock.yaml). Keep the
canonical npm package-lock.json and remove the pnpm one to avoid divergent
dependency resolution.
2026-06-07 14:34:48 +01:00
lukaszraczylo fe53510a71 test(e2e): add CAPTCHA_E2E_HEADED toggle for recaptcha v2
Real Google reCAPTCHA rarely yields a token in headless Chromium. When
CAPTCHA_E2E_HEADED=1 the script now launches { headless: false, slowMo: 80 }
so a user can attempt a real-profile solve; otherwise it keeps the existing
headless launch. Logs whether headed mode is on and that a headed/real-profile
browser improves the odds of a token. Go wrapper and best-effort exit-0
behavior unchanged; text-captcha script untouched.
2026-06-07 14:34:44 +01:00
lukaszraczylo 4ffe555bfd fix(captcha): strip reasoning-model <think> blocks before json extraction
Reasoning models prefix responses with <think>...</think> (or
<thinking>...</thinking>) scratchpad that can itself contain a JSON-looking
object. The brace-counting extractor would grab that inner object instead of
the real answer. Strip think/thinking blocks via a package-level regexp before
the balanced-object scan. Adds table cases covering both tag spellings while
keeping the plain, prose-wrapped, and unbalanced cases intact.
2026-06-07 14:34:35 +01:00
lukaszraczylo f0e1264edf chore(stealth): remove orphaned static evasions.js superseded by template 2026-06-07 14:29:54 +01:00
lukaszraczylo 22775d446e feat(stealth): make evasion script coherent with generated fingerprint
- Convert assets/evasions.js to evasions.js.tmpl (Go text/template)
- Placeholders: WebGLVendor, WebGLRenderer, Platform, Languages
- Add navigator.platform spoof from fingerprint
- ScriptParams gains OS, Browser, Locale, Seed fields (fieldalignment ordered)
- ScriptResult gains Fingerprint field — returns the identity the script was rendered for
- StealthScript calls GenerateFingerprint and renders template; single call gives both script and coherent fingerprint
- languagesJS: locale to JS list (en-GB -> 'en-GB', 'en')
- Template parsed once at init via template.Must
- StealthScriptIn in tools.go gains OS, Browser, Locale, Seed pass-through
- Tests: added TestStealthScriptCoherence asserting rendered values match fingerprint
2026-06-07 14:29:13 +01:00
lukaszraczylo 5476aefb11 feat(llm): implement native gemini generateContent provider (vision + audio)
- Replace stub Vision/Transcribe with real REST implementation
- Endpoint: POST {base}/v1beta/models/{model}:generateContent
- Auth via x-goog-api-key header
- Vision: text part + inline_data per image (mime_type from Image.MediaType)
- Transcribe: transcription prompt + inline_data audio (default audio/wav)
- Model selection: opts.Model > audioModel (transcribe) > c.model
- maxTokens mapped to generationConfig.maxOutputTokens when non-zero
- Add httptest coverage: TestGeminiVision, TestGeminiTranscribe
- Re-enable gemini in tools.go audio capability check
2026-06-07 14:24:16 +01:00
lukaszraczylo 8bfd64f7ed fix: address code review (v3/v2 detect, gemini caps, fetch timeout, audio mime, json extract, dead temp config)
- detect: recaptcha_v3 now suppresses recaptcha_v2 (hidden g-recaptcha div on v3 pages no longer mis-detected as LLM-solvable); funcaptcha drops over-broad bare "arkose" substring
- llm/gemini: stub methods return ErrUnsupported{Provider:"gemini"} so audio handler errors.As guard catches it; drop unused fmt import
- mcp/tools: remove gemini from audio capability (stub); pick audio filename (.wav/.mp3) from sniffed media type; schema notes for browser/actions no longer advertise unimplemented options
- imageutil: fetchURL uses a package client with 30s Timeout instead of http.DefaultClient
- captcha/json: extractJSON brace-counts to return the first balanced object (handles prose, markdown fences, example-before-real)
- config: remove dead CAPTCHA_LLM_TEMPERATURE / Config.Temperature; solving is fixed at temperature 0
- stealth: Action.Type doc comment drops nonexistent scroll case
2026-06-07 14:15:43 +01:00
lukaszraczylo 9265bc55ec docs: note browser e2e in README 2026-06-07 14:08:49 +01:00
lukaszraczylo b16fff8700 test(e2e): playwright browser harness against 2captcha demo 2026-06-07 14:08:40 +01:00
lukaszraczylo 021e4400ad chore: add playwright devdependency 2026-06-07 14:08:33 +01:00
lukaszraczylo 7b38b9198f docs: runnable playwright + lightpanda examples 2026-06-07 13:53:42 +01:00
lukaszraczylo 5987113a64 docs: README with authorized-use scope and usage 2026-06-07 13:53:37 +01:00
lukaszraczylo f31d6cb1e2 test(e2e): gated live solve_grid against a real LLM gateway
Add opt-in live e2e under tags e2e,live + CAPTCHA_E2E_LIVE=1. Launches the
built server, speaks MCP over stdio, generates a 300x300 red-top-row grid,
and asserts a real vision model selects tiles {0,1,2}. make e2e (tag e2e
only) does not compile or run it.
2026-06-07 13:48:45 +01:00
lukaszraczylo d96b7134f1 fix(llm): retry openai chat with max_completion_tokens when max_tokens is rejected 2026-06-07 13:38:55 +01:00
lukaszraczylo a1f2b99935 test(e2e): solve_grid over real MCP stdio with fake LLM 2026-06-07 13:32:32 +01:00
lukaszraczylo 4c433e343f feat(cmd): stdio entrypoint wiring config+llm+mcp 2026-06-07 13:27:22 +01:00
lukaszraczylo e97aa3b459 feat(mcp): tool registration and handlers for solve+stealth+detect 2026-06-07 13:26:00 +01:00
lukaszraczylo cd7f6c50db feat(stealth): consistent header set with TLS/JA3 advisories 2026-06-07 13:22:31 +01:00
lukaszraczylo d477b27e49 feat(stealth): humanized interaction plan (bezier + cadence) 2026-06-07 13:21:49 +01:00
lukaszraczylo d269c87b82 feat(stealth): embeddable evasion init script with apply hints 2026-06-07 13:20:55 +01:00
lukaszraczylo 6a70f6c9d5 feat(stealth): deterministic coherent fingerprint generator 2026-06-07 13:20:13 +01:00
lukaszraczylo 13ff6449a3 feat(captcha): best-effort rotation/funcaptcha solver 2026-06-07 13:17:26 +01:00
lukaszraczylo 6e496eeac8 feat(captcha): image-grid tile solver with centroid mapping 2026-06-07 13:16:54 +01:00
lukaszraczylo 0f1ad1dc44 feat(captcha): audio captcha transcription solver 2026-06-07 13:15:57 +01:00
lukaszraczylo c0da1121d9 feat(captcha): LLM text-image OCR solver with strict-retry 2026-06-07 13:15:32 +01:00
lukaszraczylo ca9add612e feat(captcha): deterministic HTML detection for known providers 2026-06-07 13:13:10 +01:00
lukaszraczylo d438673a1f feat(imageutil): input decoding and grid centroid geometry 2026-06-07 13:12:24 +01:00
lukaszraczylo d008ba1424 feat(llm): provider factory with per-provider default base URLs 2026-06-07 13:08:27 +01:00
lukaszraczylo f6def2f71d feat(llm): anthropic vision provider (audio unsupported) 2026-06-07 13:07:57 +01:00
lukaszraczylo 967b28769f feat(llm): openai-compatible vision and transcription provider 2026-06-07 13:07:25 +01:00
lukaszraczylo 43aa78abc5 feat(llm): client interface and fake test double 2026-06-07 13:05:59 +01:00
lukaszraczylo 9a4d329224 feat(config): env-driven config with validation 2026-06-07 13:02:25 +01:00
lukaszraczylo cb0e570bfd chore: scaffold captcha-solver-mcp module and tooling 2026-06-07 13:01:28 +01:00
lukaszraczylo 93e9c41d05 docs: phased implementation plan for captcha-solver-mcp 2026-06-07 12:50:14 +01:00
lukaszraczylo 0822e5cd76 docs: captcha-solver-mcp design spec 2026-06-07 12:27:14 +01:00