
Developers Build 5KB Pure-JavaScript Headless Browser to Bypass DuckDuckGo AI Chat Anti-Bot System
A detailed technical analysis reveals how a minimal 5,408-byte obfuscated JavaScript payload delivered via the x-vqd-hash-1 HTTP header can be executed inside a fully synthetic browser environment written in pure JavaScript. The implementation replicates enough of the Chrome DOM, HTML5 parser, V8 engine fingerprints, and iframe behavior to solve DuckDuckGo’s rotating anti-bot challenges without using any real browser engine. The resulting Telegram bot, called headless-duckapi, streams responses from multiple free models including GPT-6-luna, Claude-haiku-4-5, and Mistral-small-2603 while also supporting image generation and vision tasks. Four distinct challenge variants were deobfuscated, exposing checks that range from native-code string detection and subclassed Array behavior to precise HTML5 parsing of malformed markup. The entire solution runs in serverless isolates with no external dependencies, maintaining a solved challenge token across restarts via SQLite.
HabrOct 22, 2026Translated from Russian
