A team of developers has constructed a fully functional headless browser using only 5,408 bytes of obfuscated JavaScript to defeat DuckDuckGo’s anti-bot protection on its free AI chat service duck.ai.
The project began after repeated 500 errors containing the message “no x-vqd-hash-1 token” appeared while building a Telegram proxy bot. The researchers reverse-engineered four rotating challenge variants delivered inside the x-vqd-hash-1 response header, each containing heavily obfuscated JavaScript that must be executed to produce a valid proof-of-browser token.
Challenge Mechanics
Upon receiving the challenge, the synthetic browser performs environment checks that include:
- Verification that native functions contain the string “[native code]”
- Subclassing behavior of Array objects under V8
- Correct normalization of malformed HTML5 markup such as “<p><div></p><p></div”
- iframe contentWindow properties and prototype chain integrity for HTMLDivElement, HTMLElement, and Element
Results are combined with a fabricated stack trace and execution duration metadata, then hashed with a pure-JavaScript SHA-256 implementation before being returned in the same header.
Telegram Bot Capabilities
The resulting serverless Telegram bot supports ten live models, progressive message editing for streaming responses, automatic image generation via the GenerateImage tool, and JPEG-to-PNG conversion for vision requests—all without any external libraries. A dedicated SQLite table persists solved challenge tokens across function invocations.
The authors note that the entire client, including a custom HTML5 parser and DOM mannequin, fits comfortably inside a single 950-line JavaScript file that runs identically in Node.js and lightweight serverless isolates.

