<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by glizzykingdreko on Medium]]></title>
        <description><![CDATA[Stories by glizzykingdreko on Medium]]></description>
        <link>https://medium.com/@glizzykingdreko?source=rss-ab5cacaa6f79------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*U-qolkrtsBCsP2P2Mk_Erg@2x.jpeg</url>
            <title>Stories by glizzykingdreko on Medium</title>
            <link>https://medium.com/@glizzykingdreko?source=rss-ab5cacaa6f79------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 03 Dec 2026 05:28:06 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@glizzykingdreko/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com" rel="hub"/>
        <item>
            <title><![CDATA[Medium’s Good Words Solver]]></title>
            <link>https://medium.com/@glizzykingdreko/mediums-good-words-solver-f6cf7074b647?source=rss-ab5cacaa6f79------2</link>
            <guid isPermaLink="false">https://medium.com/p/f6cf7074b647</guid>
            <category><![CDATA[medium]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[javascript-game]]></category>
            <category><![CDATA[chrome-extension]]></category>
            <category><![CDATA[reverse-engineering]]></category>
            <dc:creator><![CDATA[glizzykingdreko]]></dc:creator>
            <pubDate>Wed, 07 Oct 2026 00:00:45 GMT</pubDate>
            <atom:updated>2026-10-07T09:53:15.627Z</atom:updated>
            <content:encoded><![CDATA[<p>Medium’s Good Words game ships its own solver, and solo boards come from the round number. A case study and a Chrome extension that plays every word.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*PDL3axiSWVo511Jz.png" /></figure><p>A case study / chrome extension to auto solve Medium’s Good Words game.</p><p><a href="https://chromewebstore.google.com/detail/good-words-solver-by-taki/aeagbadhifkaigikmlbepfhggbdgmomk">Get the extension</a> | <a href="https://github.com/glizzykingdreko/medium-good-words">Check the source</a></p><h3>Introduction</h3><p>Medium just launched <strong>Good Words</strong>, a little multiplayer word game living at medium.com/games/good-words.</p><p>So I just wondered how hard would have been to “automatize” the solving of it.<br>Just a quick project done in a few minutes that, posting just as a study case.</p><h3>The game</h3><p>Simples rules:</p><ul><li>5x5 grid of letter</li><li>3m for round</li><li>30s break</li><li>everyone plays the same board at the same moment</li><li>u have to find words by matching nearby letters in whatever direction, min 4 letters for word</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*3EJXOn_cfAmWVHjs.jpg" /></figure><p>The points you earn for words are based on the letters count</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*yaEL9Jfs7HL873Vz.jpg" /></figure><p>Basically a <a href="https://en.wikipedia.org/wiki/Boggle">Boggle</a> modernized.</p><p>But let’s get to the point!</p><h3>Analyzing the requests</h3><p>By checking the game page, the important requests I found where:</p><h4>The dictionary files</h4><ul><li>.../goodwords/words.txt?v=6eeb79b5190c - dictionary</li><li>.../goodwords/freq.bin?v=6eeb79b5190c - word frequencies</li><li>.../goodwords/vocab.json?v=6eeb79b5190c - definition</li></ul><p>The three static files all carry the same version tag, ?v=6eeb79b5190c, hardcoded in the bundle:</p><ul><li>words.txt - 171,624 words, one per line. the words you type gets checked against this list.</li><li>freq.bin - tells the game how common a word is.</li><li>vocab.json - the definitions. used for the bonus clue and the &quot;Worth knowing&quot; list after each round.</li></ul><h4>The websocket</h4><p>The multiplayer part runs on wss://goodwords.medium.com/api/play. Protected under Cloudflare.</p><p>When the websocket fails, the game doesn’t care. It just switches to <strong>solo mode</strong> and keeps going. Keep this in mind.</p><p>The messages are simple JSON:</p><pre>// client -&gt; server<br>{ t: &quot;hello&quot;, name, id, token }<br>{ t: &quot;word&quot;, w: &quot;pestered&quot; }<br><br>// server -&gt; client<br>{ t: &quot;board&quot;, round, board, ... }<br>{ t: &quot;ok&quot;, w }</pre><h3>The game solves itself</h3><p>After every round the game shows “X of Y points”. To know Y, it has to find every possible word on the board. So the solver is already inside the bundle.</p><p>How it works:</p><ol><li>Load words.txt into a <strong>trie</strong> (a letter tree)</li><li>Start from every tile</li><li>Walk to the nearby tiles, one letter at a time</li><li>Stop as soon as no word starts with those letters</li><li>Save every real word with 4+ letters</li></ol><p>Pretty simple logic.</p><h4>Solo boards are predictable</h4><p>In solo mode the board is not sent by any server. The game creates it from the current round number:</p><pre>const round = Math.floor(Date.now() / 210000); // 3m + 30s<br>const board = dealBoard(round);</pre><p>dealBoard shuffles the 25 dice with a random generator seeded with the round number. Same round, same board, for everyone.</p><p>I ported it to Python and checked it against the original JS. Same boards, same words. So you can get the board of any round, even future ones.</p><h3>Building the extension</h3><p>The extension does three things.</p><h4>1. Read the board</h4><p>Every tile in the page has its position in a data-cell attribute:</p><pre>&lt;div data-testid=&quot;goodWordsBoard&quot;&gt;<br>  &lt;button data-cell=&quot;0&quot;&gt;S&lt;/button&gt;<br>  &lt;button data-cell=&quot;1&quot;&gt;QU&lt;/button&gt;<br>  ...<br>&lt;/div&gt;</pre><p>So reading the board is just reading 25 buttons.</p><h4>2. Find the words</h4><p>Now we have the 25 letters. The extension downloads the same words.txt the game uses and runs the same search the game runs. So we validate an input exactly like the game does.</p><h4>3. Submit a word</h4><p>The input box is a React input. Setting input.value alone doesn&#39;t work, React ignores it. This does:</p><pre>Object.getOwnPropertyDescriptor(HTMLInputElement.prototype, &quot;value&quot;).set.call(input, word);<br>input.dispatchEvent(new Event(&quot;input&quot;, { bubbles: true }));<br>requestAnimationFrame(() =&gt; input.form.requestSubmit());</pre><p>Set the value, tell React it changed, submit. The game then checks the word and sends it like you typed it.</p><h3>Demo</h3><p>Here’s the extension in action:</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FmLdeQa603z8%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DmLdeQa603z8&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FmLdeQa603z8%2Fhqdefault.jpg&amp;type=text%2Fhtml&amp;schema=youtube" width="640" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/a2c6efea49f39468e4b4a502251300ff/href">https://medium.com/media/a2c6efea49f39468e4b4a502251300ff/href</a></iframe><h3>Note</h3><p>While writing this article I forgot a chrome window opened for some hours, getting me to the last 24h leaderboard</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*iXUmux9zL50p_f6y.png" /></figure><p>seems I got noticed by some platers too</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*3C3JB1yenzWsk75G.png" /></figure><p>A fun fact is that I discovered this new medium game while getting to the website in order to write an article about an IT / development cybersecurity company game, will publish it next week.</p><h3>Conclusion</h3><p>And that’s pretty much it. I added a nice UI just in case, but in the end it’s a simple search over every word the available letters can make, checked against the game’s own dictionary.</p><p>Did I achieve anything by doing this? Not at all. It was just for fun, to see how the game is made. It’s not my intention to ruin anyone’s game experience, and I don’t recommend using this extension to anyone.</p><h3>Need help with Cloudflare?</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*kSNKXmIwSjbIdlrk.png" /></figure><p>A websocket getting challenged by Cloudflare is the kind of thing that breaks every automation the moment it leaves a real browser. If you need to get through Cloudflare and friends without babysitting a headless browser, check out <a href="https://takionapi.tech">TakionAPI</a>, we know what we’re doing.</p><p>Start right away with a <a href="https://takionapi.tech/trial">free trial</a></p><h3>Connect with me</h3><p>If you enjoyed this article, follow me on GitHub and on Medium to receive notifications whenever I post or open-source something.</p><ul><li><a href="https://github.com/glizzykingdreko">GitHub</a></li><li><a href="https://mobile.twitter.com/glizzykingdreko">Twitter</a></li><li><a href="https://medium.com/@glizzykingdreko">Medium</a></li><li><a href="mailto:glizzykingdreko@protonmail.com">Email</a></li><li><a href="https://www.buymeacoffee.com/glizzykingdreko">Buy me a coffee ❤️</a></li><li><a href="https://takionapi.tech/">TakionAPI</a></li></ul><p><em>Originally published at </em><a href="https://takionapi.tech/blog/medium-good-words-solver"><em>https://takionapi.tech</em></a><em> on October 7, 2026.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f6cf7074b647" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Training a captcha solver by reading the generator instead of the images]]></title>
            <link>https://medium.com/@glizzykingdreko/training-a-captcha-solver-by-reading-the-generator-instead-of-the-images-2e8b3ee82ba2?source=rss-ab5cacaa6f79------2</link>
            <guid isPermaLink="false">https://medium.com/p/2e8b3ee82ba2</guid>
            <category><![CDATA[python]]></category>
            <category><![CDATA[captcha-solver]]></category>
            <category><![CDATA[yii2]]></category>
            <category><![CDATA[ticketmaster]]></category>
            <category><![CDATA[ml-model]]></category>
            <dc:creator><![CDATA[glizzykingdreko]]></dc:creator>
            <pubDate>Tue, 06 Oct 2026 00:00:59 GMT</pubDate>
            <atom:updated>2026-10-09T05:31:01.618Z</atom:updated>
            <content:encoded><![CDATA[<p>Ticketmaster PH and SG gate add-to-cart with a 4 letter captcha. It comes from Yii, which is open source, so I ported the generator and trained a small ONNX model on captchas I render myself.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Tp_gO19UvGFtjVq5.jpg" /></figure><p><a href="https://ticketmaster.ph/">Ticketmaster PH (Philippines)</a>, exactly like <a href="https://ticketmaster.sg/">Ticketmaster SG (Singapore)</a>, puts a 4 letter image captcha on some actions, like adding a ticket to cart. Instead of throwing a generic OCR at it, I ported the captcha generator to Python and trained a small model on captchas I render locally.</p><h3>Where it shows up</h3><p>After picking a ticket, the ATC lands you on /ticket/check-captcha/.../.../.../... and you get the captcha. 4 letters, white on blue, 120x100.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*pwi-W1r822ioBKBf.png" /></figure><h3>The Oracle</h3><p>When working in this kind of situations, for training an ML model for a specific type of challenge, you obv need a way to verify that your current output is correct, therefore you need an <strong>oracle</strong>.</p><h3>The website</h3><p>In this situation the most logic, but as well slower and more expensive in terms of time and money solution would have been making a parallel script that enters the website, initializes the session and solves the antibots, adds a product to cart, and validates a captcha each time.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Dk4tUniK05clH11L.jpg" /></figure><p>fresh sessionproxy, antibot solvedadd to cartreach the captcharead itsubmit a guessthe site answersright or wrongevery label costs a proxy usage and time1 label, then the whole run again</p><p>Even if this is the safest and most reliable solution most of the times, in this case it would have took extremely lot of time and resources.</p><h3>A vision model</h3><p>Another option would have been pulling a big quantity of captchas from the website by using</p><pre>&quot;https://ticketmaster.ph/ticket/captcha?v=1&quot; # On each refresh a new captcha is returned</pre><p>And then use an <strong>external oracle</strong> such as a vision model or even human classification for validating each output of our model.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*f7KPs5SSB72-TlY3.jpg" /></figure><p>A way slower and maybe even more expensive.</p><p>So, I started checking the WAF page source.</p><h3>It’s an open source Captcha</h3><p>Let’s take a look at the script that loads it:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/930/0*eQhD5feV8HR5KwMX.png" /></figure><pre>https://ticketmaster.ph/assets/bba9a1aa/yii.captcha.js</pre><p>It presents itself as the “Yii Captcha widget”.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Wh1KIVyyOUndnNIJ.png" /></figure><p>By searching it on google, comes out that the captcha is <a href="https://github.com/yiisoft/yii2/tree/master/framework/captcha">Yii2</a>, and Yii2 is open source, which means I can read the function that draws it and port it to a local script: <a href="https://github.com/yiisoft/yii2/blob/db5ff801c63c37e8f8bf4143026804c90a00102e/framework/captcha/CaptchaAction.php#L274">CaptchaAction::renderImageByGD</a>.</p><pre>$x = 10;<br>$y = round($this-&gt;height * 27 / 40);<br>for ($i = 0; $i &lt; $length; ++$i) {<br>    $fontSize = (int) (rand(26, 32) * $scale * 0.8);<br>    $angle = rand(-10, 10);<br>    $letter = $code[$i];<br>    $box = imagettftext($image, $fontSize, $angle, $x, $y, $foreColor, $this-&gt;fontFile, $letter);<br>    $x = $box[2] + $this-&gt;offset;<br>}</pre><p>Per letter: a random size between 26 and 32, a random tilt between -10 and 10 degrees, then move right.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/0*Jk06_cJKvlza38dC.png" /></figure><p>The font is <strong>SpicyRice</strong>. Stock Yii draws 6 to 7 letters from bcdfghjklmnpqrstvwxyz and mixes vowels in. The captchas I sampled on Ticketmaster were 4 consonants, so the generator uses bcdfghjklmnpqrstvwyz, which gives 160,000 possible codes.</p><p>Comparing Yii defaults with the target, they changed 5 things (on the TM implementation, guessed by analyzing some loaded captchas):</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*QJbQEoVuIkXUBmam.jpg" /></figure><h3>Porting it</h3><p>From there it is a direct translation into Pillow:</p><pre>def render(code, random):<br>    # CaptchaAction::renderImageByGD ported from PHP<br>    image = Image.new(&quot;RGB&quot;, (WIDTH, HEIGHT), BACK_COLOR)<br>    ...<br>    for letter in code:<br>        point_size = int(random.randint(26, 32) * scale * 0.8)<br>        angle = random.randint(-10, 10)<br>        # each glyph is drawn on its own layer so it can spin around the baseline origin<br>        layer = Image.new(&quot;L&quot;, (pad * 2, pad * 2), 0)<br>        ImageDraw.Draw(layer).text((pad, pad), letter, font=load_font(point_size), fill=255, anchor=&quot;ls&quot;)<br>        if angle:<br>            layer = layer.rotate(angle, resample=Image.BICUBIC, center=(pad, pad))<br>        image.paste(FORE_COLOR, (x - pad, y - pad), layer)<br>        # gd advances to the x of the rotated lower right corner, which is not the widest one<br>        left, top, right, bottom = glyph_box(point_size, letter)<br>        radian = radians(angle)<br>        x = x + int(round(right * cos(radian) + bottom * sin(radian))) + OFFSET<br>    return image</pre><p>python generator.py opens a random one in your image viewer, and sample() gives you (code, image) pairs from a seed.</p><p>Six of them, created locally:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/120/1*fYFYa-GJx2C-6M42xn-G3A.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/120/1*qjWKmYjBqprZFKofhRzfyw.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/120/1*B9zXTUiU2KHk8AWQJPE2Uw.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/120/1*ytq2t5e13xjg1qzirk4LeQ.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/120/1*pIpYIflNj43XHyujw8SAVw.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/120/1*WEvIq6JkRYqNKOqEflg1kA.jpeg" /></figure><h3>Training on captchas I render myself</h3><p>Now there is no dataset to collect. Every training step renders a fresh batch in memory and the labels are the codes I asked for, so no proxies, no requests to the site, no manual labelling.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*SvwfQFtzYeAD7qiH.jpg" /></figure><p>Pillow and GD do not draw exactly the same pixels, so the training images get a light blur, a brightness jitter and some noise on top. That keeps the model from learning edges that only Pillow produces. Validation runs on 3000 captchas from a different seed than the training ones.</p><p>The model is a small CNN reading the image as 4 slots of 20 letters. Open trainer.py, set RELEASE, run it:</p><pre>python trainer.py micro</pre><pre>[3] Training for 300 steps<br>    step   100/300  loss 2.4031  full  15.87%  per letter  63.98%     5s<br>    step   200/300  loss 0.3797  full  89.83%  per letter  96.82%     8s<br>    step   300/300  loss 0.1542  full  94.07%  per letter  98.12%    11s</pre><p>full is the share of captchas with all 4 letters right, the number that matters. per letter just shows how far off the misses are. That run took 11 seconds. The default 4000 steps take a few minutes on an M4 Max.</p><p>You get 2 files: a .pt to resume training from, and a .onnx the solver uses, so production needs ONNX Runtime and not PyTorch.</p><h3>The models</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*pwliLr1EcbLsM7R2.jpg" /></figure><p>3 sizes, same structure, the last layers are wider each time:</p><p>Accuracy is full codes on 20,000 fresh captchas from benchmark.py, speed is the median of 900 solves on 1 CPU thread of an M4 Max. Those captchas come from my port of the generator, not from Ticketmaster itself, so real ones may score a bit differently.</p><p>So why 3 models you may ask… can’t a guy just have fun?</p><p>micro reading fresh ones, with the per letter confidence next to each:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/720/1*OiMzYyFN8uvqi-43GpIggQ.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/720/1*DraD18Gj0zYkzMkYpuJYYw.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/720/1*KEv2RAWfYfoasVnrm9OXMA.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/720/1*tgwiVUrMR9zbiMRLZ5YXcQ.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/720/1*EfhxRPIQVujMwuyiUxPO8g.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/720/1*62qvDcFXvInIlBba2MoZtg.jpeg" /></figure><h3>Conclusion</h3><p>This has been a quick and easy case study for a different approach of a ML model trianing, saved me lots of time and resources.</p><p><a href="https://github.com/glizzykingdreko/ticketmaster-yii-captcha">Repo is here</a> with mnodels, trianing script and all the other scripts used.</p><h3>Need antibot solutions?</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*_f00NvMpN0CIL1fA.png" /></figure><p>If you would rather not deal with captchas and antibots yourself, <a href="https://takionapi.tech/bypass"><strong>TakionAPI</strong></a> covers DataDome, Akamai, PerimeterX, Cloudflare, hCaptcha and the rest, one HTTPS call per token, no browser. We know what we are doing. <a href="https://takionapi.tech/trial">Start with a trial</a>.</p><p>We offer as well cheap and reilable tmpt solutions for Ticketmaster.</p><h3>Connect with me</h3><p>If you enjoyed this, follow me on GitHub and Medium to get a ping whenever I post or open-source something.</p><ul><li><a href="https://github.com/glizzykingdreko">GitHub</a></li><li><a href="https://mobile.twitter.com/glizzykingdreko">Twitter</a></li><li><a href="https://medium.com/@glizzykingdreko">Medium</a></li><li><a href="mailto:glizzykingdreko@protonmail.com">Email</a></li><li><a href="https://www.buymeacoffee.com/glizzykingdreko">Buy me a coffee ❤️</a></li><li><a href="https://takionapi.tech/">TakionAPI</a></li></ul><h3>Sources</h3><ul><li><a href="https://github.com/glizzykingdreko/ticketmaster-yii-captcha">ticketmaster-yii-captcha</a>, generator, trainer, benchmark and the 3 models</li><li><a href="https://github.com/yiisoft/yii2/blob/db5ff801c63c37e8f8bf4143026804c90a00102e/framework/captcha/CaptchaAction.php#L274">Yii2 CaptchaAction</a>, the function this is ported from</li></ul><p><em>Originally published at </em><a href="https://takionapi.tech/blog/ticketmaster-yii-captcha-solver?image_format=jpg"><em>https://takionapi.tech</em></a><em> on October 6, 2026.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2e8b3ee82ba2" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[DataDome plv3: reverse engineering the VM behind the token]]></title>
            <link>https://medium.com/@glizzykingdreko/datadome-plv3-reverse-engineering-the-vm-behind-the-token-de24c215aa79?source=rss-ab5cacaa6f79------2</link>
            <guid isPermaLink="false">https://medium.com/p/de24c215aa79</guid>
            <category><![CDATA[datadome]]></category>
            <category><![CDATA[vm]]></category>
            <category><![CDATA[disassembler]]></category>
            <category><![CDATA[plv3]]></category>
            <category><![CDATA[reverse-engineering]]></category>
            <dc:creator><![CDATA[glizzykingdreko]]></dc:creator>
            <pubDate>Tue, 28 Jul 2026 00:00:11 GMT</pubDate>
            <atom:updated>2026-09-11T13:08:21.365Z</atom:updated>
            <content:encoded><![CDATA[<p>DataDome’s plv3 runs a VM whose opcode table does not exist until the bytecode is already running. Here is the disassembler, and what it measures about you.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*A8Pd3FFPnSVJqC6g.jpg" /></figure><p>Let’s walk through the virtual machine behind DataDome’s plv3 token, the one running on both the interstitial and the captcha, and build a disassembler for it. The interesting part is not that they wrote a VM, everybody writes a VM. It is that their opcode table does not exist until the bytecode has already started running.</p><p>Everything here is reproducible with <a href="https://github.com/glizzykingdreko/datadome-plv3-vm-disassembler">the tool in this repo</a>, verified against 6 different bundles across both challenge types.</p><h3>What a VM is, and why they use one</h3><h4>First, what a VM actually is</h4><p>You can skip this if you already know VMs. If you have only ever seen “the code is obfuscated” and not “the code is a VM”, this part makes everything below make sense.</p><p>Normal JavaScript is executed by your browser’s engine. You write a + b, V8 compiles it, the CPU runs it. If I want to know what your script does, I read the script.</p><p>A <strong>virtual machine</strong> inserts a layer. Instead of shipping the logic as JavaScript, you ship:</p><ol><li><strong>An interpreter</strong>, a small piece of real JavaScript that knows how to execute a made-up instruction set</li><li><strong>Bytecode</strong>, a blob of bytes that means nothing on its own, encoding the actual logic in that made-up instruction set</li></ol><p>The interpreter loops: read a byte, decide what it means, do it, move to the next byte. That loop is the <strong>dispatch loop</strong>, and the byte it reads is an <strong>opcode</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*38ePPbyuRWi4jc0cwwTwKw.png" /></figure><p>One opcode byte per turn. The handler does the work, the loop advances, and nothing about the guest program is visible in the interpreter itself.</p><p>Here is a toy version in 20 lines:</p><pre>function run(bytecode) {<br>  const stack = [];<br>  let pc = 0;                                     // program counter<br>  while (pc &lt; bytecode.length) {<br>    const op = bytecode[pc++];                    // fetch<br>    switch (op) {                                 // decode<br>      case 1: stack.push(bytecode[pc++]); break;  // PUSH &lt;imm&gt;<br>      case 2: stack.push(stack.pop() + stack.pop()); break;  // ADD<br>      case 3: console.log(stack.pop()); break;    // PRINT<br>      case 4: return;                             // HALT<br>    }<br>  }<br>}<br><br>run([1, 2, 1, 3, 2, 3, 4]);   // push 2, push 3, add, print -&gt; 5</pre><p>[1, 2, 1, 3, 2, 3, 4] is the whole program. You cannot read it. There is no + anywhere, no console.log call you can breakpoint, no function names, no control flow you can follow in a debugger. The logic is <em>data</em> now, and data does not show up in a stack trace.</p><p>That is the entire point. The interpreter is visible and boring, the interesting part is in a byte array, and to understand the byte array you first have to understand the interpreter well enough to decode it. That work is called <strong>writing a disassembler</strong>: recovering, for each opcode byte, what it does and how many operand bytes follow it, so a blob of numbers turns back into a listing you can read.</p><p>The vocabulary that comes up below, in one place:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*J0mcO-6UfklWs2rRlscXZA.png" /></figure><p>Every one of those exists in DataDome’s VM. The twist is where the handlers come from.</p><h3>Why anti-bot vendors like them</h3><p>Three reasons, and they are good ones.</p><p><strong>Reading is expensive.</strong> Deobfuscating a bundle doesn’t get you the logic, just the interpreter. You have done maybe 10% of the work at the point where normally you would be done.</p><p><strong>Debuggers stop helping.</strong> Every operation runs through the same lines. A breakpoint in the dispatch loop hits millions of times and tells you nothing about which <em>guest</em> operation you are in.</p><p><strong>The instruction set is a knob they own.</strong> They can shuffle opcode numbers, change operand widths, add instructions, and it costs them a rebuild while it costs you a rewrite of your tooling.</p><p>The counterweight is that a VM has to be able to build itself before it can run. Follow that construction path and it hands you the pieces in order, which is exactly what the rest of this article does.</p><h3>How this VM is put together</h3><h4>The file that got smaller</h4><p>The vm-obf.js module inside a DataDome challenge used to be a standard obfuscated VM. Around 614 lines after running it through <a href="https://github.com/glizzykingdreko/new-datadome-deobfuscator">my deobfuscator</a>, with a big dispatch switch and an opcode table you could read straight out of the JavaScript. Annoying, but a known quantity.</p><p>Then it shrank. Same job, 163 lines. Sorting my bundle collection by date makes the switch obvious:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*p3nvCZlqRikTkgns8_lY4g.png" /></figure><p>A file getting <strong>four times smaller</strong> while doing the same work is usually good news for whoever has to read it. Not this time. The old bundle was bigger because it <em>contained</em> its instruction set. The new one is small because it moved that instruction set into the payload, and it is a different instruction set in every build.</p><p>So the opcode table you carefully document on Monday is worth nothing on Tuesday. That is the actual upgrade, and it is a smart one.</p><h3>Anatomy of the loader</h3><p>Deobfuscated, the whole thing is six pieces:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AfeL0nRpZj7g3LEbCGqugQ.png" /></figure><p>The entry is where a disassembler gets its footing:</p><pre>const Q = function (A) {<br>  const g = o();<br>  return Array.from({ length: 209725 }, (Q, D) =&gt;<br>    D &gt;= C &amp;&amp; D &lt; C + B ? A.charCodeAt(D - C) : g());<br>}(atob(A));</pre><p>Three important things there: the flat buffer is <strong>209725 bytes</strong>, the bytecode sits at offset C, and it is B bytes long. Everything outside that window is LCG filler.</p><p>Every concrete number in this walkthrough comes from one bundle, interstitial-e813eb1. They all rotate per build, so the sample bundle in the repo prints its own set. <a href="https://takionapi.tech/blog/datadome-plv3-vm-disassembler#the-rotation-surface">The rotation surface</a> at the end has the table.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MLZVx5F2rSuqGfWYJbt7Ug.png" /></figure><p>The bytecode is a window inside a much larger buffer. Both sides of it are load-bearing, which is why the LCG has to be reproduced rather than padded.</p><p>That filler is not padding. The registers live <em>below</em> the bytecode and handlers read entropy from <em>above</em> it, so if you rebuild the buffer with zeros instead you get a VM that runs and produces the wrong answer, which is the worst possible failure mode. The generator is 6 lines:</p><pre>function o() {<br>  let A = 2078235825, g = 0;<br>  return function () {<br>    return 3 &amp; g++ || (A ^= A &lt;&lt; 13, A ^= A &gt;&gt; 17, A ^= A &lt;&lt; 5),<br>      (A &gt;&gt; ((3 &amp; g) &lt;&lt; 3)) % 256;<br>  };<br>}</pre><p>Seed, xorshift 13/17/5, and a rotation through the four bytes of the state so one state advance yields four output bytes. Port it exactly, including the counter increment happening before the shift, or your buffer diverges a few thousand bytes in.</p><p>Because that charCodeAt is the only one in the file, it makes a perfect anchor. My loader finds it, reads the window guard next to it, resolves the identifiers through the const block, and never once looks up a name it was told to expect.</p><p>The const block deserves a note. The interstitial declares one block of plain integers. The captcha declares <strong>three</strong>, and computes half of them off each other:</p><pre>var c = 790629505, D = 3492, w = 10600, B = D + 114, Q = B + 348,<br>    I = D - 1, J = 194136, Y = Q + J, M = D + 16, ...;<br>var s = 116, a = 111, P = 67, z = 53, y = 62, ...;          // value tags<br>var l = 31, H = 11, X = 34, k = 24, j = 0, ..., AA = 182;   // primitive slots</pre><p>So the evaluator has to be a tiny expression system with multiple passes, not a regex for integer literals. Fun detail: the captcha names its tag bytes and primitive slot IDs as constants while the interstitial inlines them. Two different compiler settings for the same VM.</p><h3>There is no switch</h3><p>Here is the entire dispatch loop:</p><pre>const s = Q[C + Q[D]++], c = g + s;<br>for (Q[I] = Q[c], Q[4222] = s; !Q[w] &amp;&amp; P++ &lt; 1e8;) Q[I]();</pre><p>Compare that to the toy loop earlier. Same fetch, decode, execute, except decode is not a switch, it is an array index. Read a byte, index a table of closures with it, keep calling whatever is in Q[I]. Every handler ends by calling NEXT, which reads the following byte and swaps in the next closure. That structure has a name, <strong>thread-of-code</strong>, and it means there is no jump table you can point at.</p><p>Registers are just offsets in the same flat buffer:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/876/1*-bzgf81lKtHRiVN4giRB2g.png" /></figure><p>Yes, -1. In JavaScript that is just a property named &quot;-1&quot; on the array. Keep this in mind.</p><p>Note P++ &lt; 1e8 in the loop condition. P counts iterations, and it does not stay inside the VM. That matters later.</p><h3>MAKE_FUNC, or how the opcodes arrive</h3><p>Walking the bytecode from byte 0 with the naive assumption that instructions start there gives you this:</p><pre>57 86 00 00 54 &quot;const n=arguments[0];n[34](86);const s=n[43](),t=n[32][n[36]];n[32][t-1]^=s,n[17]();&quot;</pre><p>That is not an instruction. That is a record:</p><pre>[ 1B opcode 57 ] [ 1B slot 86 ] [ 3B length 0x000054 = 84 ] [ 84 bytes of JavaScript ]</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*g7zWD6ufyWg8XKYOGmSQSA.png" /></figure><p>The opcode semantics ship inside the payload. Every bundle installs its own 103 handlers before executing a single instruction, so no hardcoded opcode table survives a rotation.</p><p>And the handler installed at slot 57 does exactly what you would expect:</p><pre>A[4379] = function () {<br>  const B = M(),                                    // u8, target slot<br>    Q = o(),                                        // u24, source length<br>    P = String.fromCharCode.apply(null, /* slice Q bytes */),<br>    E = new Function(P);<br>  A[g + B] = E.bind(null, d), n();                  // install, bound to primitives<br>};</pre><p>There are <strong>103 of these records back to back</strong>, occupying the first ~11 KB of every bundle I have looked at. Interstitial or captcha, every rotation, always 103. Then the chain stops and the real program begins.</p><p>The .bind(null, d) is the piece that makes the rest tractable. Every compiled handler receives the primitive table as arguments[0], which is why they all open the same way:</p><pre>const n = arguments[0];</pre><p>A handler cannot touch the DOM, cannot call a global, cannot do anything except index into n. That is a hard sandbox, and it means the vocabulary of the entire VM is about two dozen entries wide. Recover them and every one of the 103 bodies becomes readable.</p><p>Which, to be clear, they already are. This is the trade DataDome made: the opcode semantics are now <strong>plaintext JavaScript</strong> sitting in the payload, in exchange for the table being different every build. Anyone reading one bundle has an easier time than before. Anyone trying to write a static tool that survives the next push has a much harder time. Given how these things are usually attacked, that is the right call.</p><h3>Writing the disassembler</h3><h4>Recovering the primitive table</h4><p>The initializer is the only function containing new Function, so it is easy to locate, and the table it fills is named by the .bind(null, X) call. Then it is a matter of classifying two dozen or so assignments by shape:</p><pre>d[32] = A;                                            // the flat buffer<br>d[41] = B;                                            // the OUTPUT object, remember this one<br>d[14] = M;                                            // read u8 at PC<br>d[45] = function () { ... return A[D] = g + 2, B &lt;&lt; 8 | Q; };    // read u16<br>d[49] = o;                                            // read u24<br>d[43] = function () { return s(() =&gt; A[C + A[D]++]); };          // tagged value<br>d[17] = n;                                            // NEXT<br>d[15] = function () { A[E] = A[--A[P]]; };            // pop to accumulator<br>d[44] = function (g) { A[A[P]++] = A[Q + g]; };       // push register<br>d[7]  = function (g) { A[Q + g] = A[A[P] - 1]; };     // store register<br>d[3]  = function () { ... A[A[P] - 1] = C[g]; };      // property get<br>d[50] = function () { ... A[--A[P]][g] = A[A[P] - 1]; };         // property set<br>d[23] = c;                                            // string cipher<br>d[34] = function (A) {};                              // telemetry no-op</pre><p>Two traps in here, both of which cost me a debugging cycle.</p><p><strong>One:</strong> several entries are references to named inner functions ( d[49] = o), so you have to resolve the name to its body before classifying, otherwise you classify the string &quot;o&quot;.</p><p><strong>Two:</strong> the string cipher reads a 4-byte header key, which means its body contains &lt;&lt; 16 and &lt;&lt; 8, which means a naive &quot;widest shift wins&quot; classifier labels the cipher as the u24 reader. Check for the cipher first. Everything downstream depends on those five reader slots being right, since they are where operand widths come from.</p><p>The reward for getting it right is that the numbers below are all recovered, never assumed:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9_OlCuSNZYsjYSv7vFCUuA.png" /></figure><h4>The value tags</h4><p>Plenty of opcodes take an immediate that is not fixed width. One tag byte, then 0 to 8 payload bytes:</p><pre>function s(A) {<br>  let g = A();<br>  if (128 &amp; g) return 127 &amp; g;              // 7-bit small int, 1 byte total<br>  let C = 0, B = 24;<br>  switch (g) {<br>    case 55:  return !0;<br>    case 72:  return !1;<br>    case 34:  return null;<br>    case 64:  return;<br>    case 114: return &lt;f64 decoder&gt;(A);      // 8 payload bytes<br>    case 103: C |= A() &lt;&lt; 24, B -= 8;       // i32, falls through<br>    case 94:  C |= A() &lt;&lt; 16, B -= 8;       // i24, falls through<br>    case 62:  C |= A() &lt;&lt; 8,  B -= 8;       // i16, falls through<br>    case 108: return C |= A(), C &lt;&lt; B &gt;&gt; B; // i8, terminal<br>  }<br>}</pre><p>The tag bytes rotate per bundle, so hardcoding 114 = float is pointless. What does not rotate is the <strong>fall-through chain</strong>: the terminal integer arm reads one payload byte, the arm above it reads two, and so on up. Count the chain arms in source order and the widths fall out without knowing a single tag value. The boolean and null arms are 1 byte, the arm building an 8-element array is the float.</p><p>Nine tags in every bundle, plus the small-int fast path. By getting one width wrong the walker desyncs on the first immediate it meets, which is a nice property: you notice immediately.</p><h4>Building an opcode table that does not exist yet</h4><p>Now the useful part. For each of the 103 handlers, two things are needed.</p><p><strong>The operand signature.</strong> A handler consumes bytecode only by calling a reader primitive, so the ordered list of reader calls in the body <em>is</em> the operand list. This one is exact, no heuristics:</p><pre>const n = arguments[0];<br>n[34](140);<br>const s = n[43](),                 // one tagged value<br>  t = n[32][n[36]];<br>n[32][t - 1] &gt;&gt;= s, n[17]();</pre><p>Signature: one tagged value. Semantics: shift the top of the stack right by an immediate. In listing terms, SHR_IMM.</p><p><strong>A mnemonic.</strong> This one is pattern matching, and the trick that made it work is stripping every bind[N] reference out of the body first. What is left is the guest-level expression:</p><pre>n[32][n[32][n[36]]++] = s     -&gt;     @[@[@]++] = s      // a push<br>t[s] = c                      -&gt;     t[s] = c           // property store<br>t(s)                          -&gt;     t(s)               // a call</pre><p>Suddenly the shapes are obvious and 85 of 103 opcodes get real names: JMP, JMP_IF_FALSE, PUSH_STR, GET_PROP, SET_PROP, CALL, CALL_APPLY, MAKE_CLOSURE, HALT, XOR, MUL, CMP_GT, KEYS, NEW_ARRAY, and so on. The remaining 18 keep an OP_&lt;slot&gt; name and print their source, which is honest and still perfectly usable, since their operand signatures are exact regardless.</p><h3>Walking the program</h3><p>Handlers jump by adding to the PC slot at runtime:</p><pre>const n = arguments[0], s = n[49]();<br>n[32][n[21]] += s, n[17]();</pre><pre>const n = arguments[0], s = n[49]();<br>n[32][--n[32][n[36]]] || (n[32][n[21]] += s), n[17]();        // JMP_IF_FALSE</pre><p>Which means a linear sweep is wrong. Sooner or later it walks into a jump’s padding, decodes an operand as an opcode, and everything after that is fiction that still looks plausible.</p><p>So the walker is a worklist: start at the entry, decode until the block ends, queue branch targets, decode every address at most once. Unconditional jumps end a block. Regions nothing reaches are printed as gaps instead of being swept over, because a wrong instruction is worse than a missing one.</p><p>This also hands us a free correctness check. If any operand width is off by even one byte, jump targets stop landing on instruction boundaries. Across all 6 bundles:</p><pre>captcha-3f9a12d       jmp=1119/1119      interstitial-161af37  jmp=1020/1020<br>captcha-d18541a       jmp=1014/1014      interstitial-e813eb1  jmp=1135/1135<br>captcha-d7aa843       jmp=1010/1010      interstitial-fa96b7a  jmp=976/976</pre><p>Every branch, every bundle, dead on a boundary. That is about as much confidence as you get without running the thing.</p><p>Coverage lands around 90%. The missing tenth sits behind computed dispatch that only a live VM resolves, and I would rather report it as a gap than invent instructions for it.</p><h4>The instruction that hides 4 KB</h4><p>First instruction of the program, and the first thing that broke my walker:</p><pre>const r = arguments[0];<br>for (var n = r[49](), a = new Uint8Array(n), t = 0; t &lt; n; t++)<br>  a[t] = r[14]();<br>r[32][r[32][r[36]]++] = a, r[17]();</pre><p>Read a u24, then read <em>that many</em> bytes one at a time. Counting reader calls naively gives “u24 plus one u8”, four bytes of operands. The real answer is 3 + 4262, because the u8 read is inside a loop.</p><p>By failing here you land 4258 bytes early, in the middle of a data blob, where the bytes decode into perfectly reasonable looking instructions that mean nothing at all.</p><p>So the analyzer tracks for-loop spans and marks reads inside them as repeating, with the count taken from the operand read just before. Same shape shows up with tagged values:</p><pre>const t = arguments[0], e = t[14]();<br>for (let n = 0; n &lt; e; n++) t[32][t[32][t[36]]++] = t[43]();</pre><p>That one is “read a count, then read that many tagged values”, each of which is 1 to 9 bytes depending on its own tag. Two nested variable lengths in a single instruction.</p><p>And a third variant that looks identical from the operand side but is not a data blob at all:</p><pre>const o = arguments[0], t = o[14](), n = [], s = o[14]();<br>for (let t = 0; t &lt; s; t++) { const t = o[14](), s = o[32][o[32][o[35]] + t]; n.push(s) }<br>const c = o[32][o[21]] + o[19], e = function (s) { /* new frame */ };<br>o[32][o[32][o[36]]++] = e, o[17]();</pre><p>Arity, capture count, then that many capture slots, and it pushes a closure. That is the VM’s function constructor, so it gets MAKE_CLOSURE rather than being lumped in with the byte pushers.</p><h4>Strings, and the byte that was not missing</h4><p>The cipher is short and has no S-box:</p><pre>header    bytes 0..3, little-endian u32, the base key<br>table     starts at byte 4, six bytes per entry:<br>          [ u24 LE offset ][ u16 LE length ][ u8 flags ]<br>keystream k[i] = (baseKey ^ ctx ^ (i + 1)) &amp; 0xff<br>plaintext text[i] = image[offset + i] ^ k[i]</pre><p>Two problems. The ctx byte is not stored anywhere, and the table is not where you would expect it.</p><p>The usual answer to a missing key byte is to sweep all 256 values and keep whatever looks readable. I did that first, and it is really useless: XOR against a wrong key lands in printable ASCII most of the time, so you get thousands of candidates like &quot;tsohr}qy&quot; and &quot;MIYNEoYPY_HSN&quot; sitting right next to &quot;pathname&quot; with the same score. You can eyeball the real ones. You cannot automate it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SeLpRoFoj9toOLKPrmBuUw.png" /></figure><p>The key byte was never missing. It is an operand of the instruction that calls the decoder, so the disassembly hands it over and the guessing disappears.</p><p>Then look at the handler that actually decodes strings:</p><pre>const a = arguments[0];<br>var n = a[45](), r = a[45](), s = a[14](), t = a[32][a[11] + n];<br>a[32][a[32][a[36]]++] = a[23](t, r, s), a[17]();</pre><p>ctx is not missing. <strong>It is an operand.</strong> Every string decode site reads a register index, a table id and a ctx byte right out of the instruction stream, then hands all three to the cipher. Once the program is disassembled, every PUSH_STR instruction carries the exact table id and the exact ctx for that call site.</p><p>So the sweep goes in the bin and string recovery becomes exact. My resolver maps the cipher call’s argument names back to the order the operands were read in, so it keeps working when a rotation reshuffles them, then decodes each site directly.</p><p>The second problem sorts itself out along the way. The string image is not at bytecode offset 4, because the cipher is handed a buffer read out of a <em>register</em>. That buffer is the 4262-byte blob the prologue pushes as its very first instruction. So the strings cannot be found until the program has been disassembled, and the disassembly is far more readable once the strings are attached. Chicken, egg, and the egg wins if you do the passes in the right order.</p><p>Result on a current interstitial: <strong>224 unique strings from 1198 call sites</strong>, all exact.</p><h3>What comes out, and what it reports</h3><h4>How the token gets out</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZWmJAJj6ae5p1P--8vwZ_A.png" /></figure><p>One value on the wire, and a step count riding beside it. The token is what you reproduce, the telemetry is what catches you reproducing it wrong.</p><p>Look again at the primitive table:</p><pre>d[41] = B;      // B is the initializer&#39;s second parameter</pre><p>And at the loader:</p><pre>const E = {};                      // the output object<br>try {<br>  M(Q, E);                         // handed to the initializer -&gt; lands in d[41]<br>  ...<br>  for (Q[I] = Q[c], ...) Q[I]();   // run<br>  E.u = Q[-1];<br>} catch (A) {<br>  E.e = A;<br>} finally {<br>  return E.i = P, E.t = performance.now() - Q | 0, E;<br>}</pre><p>So the <strong>guest program has a handle on the output object</strong>. It can write properties on it directly, and exactly one handler in the entire VM does. My classifier now flags it as HALT:</p><pre>// interstitial e813eb1, slot 165<br>const n = arguments[0];<br>n[41].r = n[32][n[10]],    // out.r = MEM[accumulator]<br>n[32][n[22]] = 1;          // halt = 1</pre><pre>// captcha 3f9a12d, slot 140<br>const n = arguments[0];<br>n[11].r = n[31][n[19]],<br>n[31][n[45]] = 1;</pre><p>That value is the <strong>plv3 token</strong>, the thing that ends up in the plv3 field of the POST body. It is not Q[-1], and it is not returned by anything. The guest computes it, leaves it in the accumulator, and the last instruction it ever executes copies it onto the output object and raises the halt flag. Notice there is no n[17]() call at the end: HALT is the only handler that does not dispatch to the next one, because there is no next one.</p><p>One HALT per bundle, every time:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*g0AnUbS5aNBFUvXYM-KT_w.png" /></figure><p>So the VM’s return value is a five-field object. Note the internal field is called r, but nothing outside the bundle ever sees that name: main.js reads it straight into the plv3 field of the request, which is what everyone actually calls it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gzKNtgw0YI0ByfWZMYcLfA.png" /></figure><p>Four of those five have nothing to do with the token. They are telemetry about <em>how the VM ran</em>, and that is where this gets interesting.</p><h4>The orchestrator, and where every signal comes from</h4><p>main.js in the same bundle is 60 lines and it is the Rosetta stone. It schedules the challenge across five steps paced by window.ddm.durationMs, and step 2 is the VM:</p><pre>case 2:<br>  D(&quot;W285lp&quot;, s(window.ddm.seed));<br>  var N = Date.now();<br>  try {<br>    var J = C(872)();                                    // run the VM<br>    D(&quot;CUu1rJ&quot;, J.i),                                    // iterations   -&gt; signal<br>    D(&quot;V3s4H9&quot;, J.u),                                    // Q[-1]        -&gt; signal<br>    J.e &amp;&amp; D(&quot;Uznj9t&quot;, &quot;i:&quot; + String(J.e).slice(0, 150)); // error       -&gt; signal<br>    E = J.r;                                             // token, kept for the wire<br>  } catch (A) {<br>    D(&quot;Uznj9t&quot;, &quot;e:&quot; + String(A).slice(0, 150));<br>  }<br>  var i = Date.now();<br>  D(&quot;RfE0EQ&quot;, i - N);                                    // elapsed      -&gt; signal<br>  break;</pre><p>and step 4 assembles the request:</p><pre>case 4:<br>  D(&quot;k63MOw&quot;, K), D(&quot;5E2YI5&quot;, K), (0, B[1])(), Q = {<br>    plv2: P(window.ddm.cid),<br>    plv3: E<br>  };</pre><p>D(key, value) is the signal setter. So every field the VM returns goes somewhere, and only one of them is the token.</p><p>Cross-referencing those obfuscated keys against the signal mapping in the same bundle turns it into plain English.</p><h4>Signal by signal</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ISBidRzeIp8KEqcbhpKLMw.png" /></figure><p>Two rows in that table are not fingerprints at all. They are traps.</p><h4>The two tripwires</h4><p><strong>vm_challenge_interactions is a step counter.</strong> The VM reports precisely how many dispatch iterations it took to produce the token. For a given bundle and a given input, that number is essentially deterministic. If you reimplement the VM, or hook the dispatch loop to trace it, or short-circuit a loop to make it faster, the count moves and the server can see it.</p><p>I know how sensitive this is because I have watched it: browser 467499 against 463596 from an offline run, a 0.8% gap, on a value that is meant to be reproducible. It is a cheap and very effective way to ask &quot;did you actually execute my program, all of it, the way I wrote it&quot;.</p><p><strong>chksm hashes the interpreter&#39;s own source.</strong> Look at what it feeds the hash:</p><pre>var l = s.toString() + B.toString() + D.toString() + P.toString(),<br>  z = M(l);</pre><p>Function.prototype.toString on its own functions. Monkey-patch any of them to instrument the VM and the source text changes, so the checksum changes. Classic self-integrity check, and it pairs neatly with the step counter: one catches you rewriting the code, the other catches you rewriting the execution.</p><p><strong>And </strong><strong>vm_challenge_undef is the third.</strong> E.u = Q[-1] reads a slot that is <em>below</em> the buffer, which in JavaScript means a property that simply does not exist unless something explicitly wrote to it. The signal name DataDome&#39;s own code generates for it is literally vm_challenge_undef, which reads a lot like &quot;this is expected to be undefined&quot;. Nothing in the disassembly writes there in a clean run. As I understood it, it is a canary for a tampered or instrumented buffer rather than a payload field, though unlike the other two I cannot prove intent from static analysis alone.</p><p>Note: none of these three cost DataDome anything. They are free by-products of running a VM you control, and they punish exactly the shortcuts people take.</p><h4>Captcha versus interstitial</h4><p>The two challenge types feel like different products. One is the silent “verifying your browser” page, the other is the puzzle. I assumed the VMs would differ in interesting ways, and went looking for it. Same tool, three interstitial rotations against three captcha rotations.</p><p>They do not differ. At all, structurally:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HSDPUTjC1tRBuswbI3argA.png" /></figure><p>Not “similar”. Identical counts, and every mnemonic my classifier produces for one family shows up in the other.</p><p>The instruction <em>mix</em> says the same thing. Sharing of named instructions across the two families, aggregated over three bundles each:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/890/1*cDtlfU8r3PaaLFHkOc-8Sw.png" /></figure><p>Those are the six <strong>largest</strong> differences in the entire instruction set. The biggest gap anywhere is under half a percentage point, which is noise between two builds of the same source.</p><p>Strings tell the same story, as long as you are strict about what “only” means. Take the strings present in <strong>all three</strong> rotations of one family and absent from <strong>every</strong> bundle of the other. On that test 130 strings are common to all six, and the captcha-only set is two entries:</p><pre>crypto <br>getRandomValues</pre><p>That is the whole difference. The captcha pulls entropy from crypto.getRandomValues on top of Math.random, and everything else, the WebGL shader, the canvas compositing, the SVG probe, the CSS calc() measurement, the timing reads, is the same program. The interstitial-only set is empty.</p><p>That criterion is doing real work, so it is worth spelling out. Relax it to “in all of one family, not in all of the other” and the same six bundles report 26 captcha-only and 13 interstitial-only strings. Every one of the extras is a chain like performance.memory.usedJSHeapSize sitting at 3/3 in one family and 1/3 in the other, which is a build that happened to drop a probe, not a design decision. Pick the loose test and you will write up rotation noise as strategy.</p><h4>The part where I was wrong</h4><p>My first pass compared one interstitial against one captcha and produced a much more exciting list: maxTouchPoints, hardwareConcurrency, XMLDocument, a pile of differing CSS custom property names. I nearly wrote it up as &quot;same machine, different questionnaire&quot;.</p><p>It was rotation noise. Those CSS variable names (--b4, --oj, --za) are regenerated per build, so a single-bundle comparison shows dozens of &quot;differences&quot; that are really just two different Tuesdays. Intersecting three rotations per family before diffing collapses the list from dozens to two. If you take one thing from this section, take that: <strong>against a target that rebuilds daily, never diff two files, diff two sets.</strong></p><p>The same discipline caught a bug in my own tool. The comparison initially reported 23 primitive slots for the interstitial and 22 for the captcha, which looked like a real structural difference and was in fact my const-block parser dropping $ = 18. The regex used \b before the identifier, and \b does not match before $ because $ is not a word character. After a double check, both families report 23. A &quot;difference&quot; that only shows up on one side of a comparison is worth suspecting before you publish it.</p><h4>So why two challenge types</h4><p>Because the difference is not in the VM, it is around it. Same interpreter, same program, same collection surface, wrapped in a different orchestrator, submitted to a different endpoint, inside a completely different envelope:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*x-r0DJLYY2_0ks4h3TW9jw.png" /></figure><p>Which is good news if you have already done the work for one of them. The plv3 half carries over completely.</p><h3>What the VM computes, proven from the listing</h3><p>A string dump tells you a bundle <em>contains</em> the word webdriver. It does not tell you the program reads it. That gap matters, because a 4 KB blob of strings includes plenty the program never touches on a given path.</p><p>Thanks to the disassembly we can settle it. Property access in this VM is always the same two-instruction shape:</p><pre>PUSH_STR &quot;document&quot;     ; push a decoded string<br>GET_PROP                ; pop key, pop object, push object[key]<br>PUSH_STR &quot;timeline&quot;<br>GET_PROP<br>PUSH_STR &quot;currentTime&quot;<br>GET_PROP</pre><p>So a run of those pairs <em>is</em> a property chain, and joining the strings back together reconstructs document.timeline.currentTime with a byte offset attached. That is the difference between &quot;this string exists somewhere&quot; and &quot;the program evaluates this expression, at pc 35310&quot;.</p><p>The tool does this with --chains. Two details make it correct rather than approximate:</p><ul><li><strong>Any non-string push closes the chain.</strong> The fn.apply(thisArg, ...) idiom pushes the receiver and then re-resolves it to reach the method, so without this you reconstruct Math.Math.random instead of two separate reads.</li><li><strong>A SCREAMING_CASE key closes the chain.</strong> gl.ARRAY_BUFFER is a constant read off an object, never a container you walk into, so sibling reads stop gluing together.</li></ul><h4>The stable core</h4><p>Twenty-five chains appear in <strong>all six bundles</strong>, three interstitial rotations and three captcha rotations:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GsPeaAUKzZYRBQKXT0efjA.png" /></figure><p>Call frequency from a current interstitial, and the counts are worth a look on their own:</p><pre>32x () Math.random                          @pc 34130<br> 21x () Date.now                             @pc 34099<br> 10x () document.createElement               @pc 148413<br>  6x () document.createElementNS             @pc 142720<br>  5x () performance.now                      @pc 52322<br>  5x () document.body.appendChild            @pc 154486<br>  3x    document.timeline.currentTime        @pc 35310<br>  3x    window._virtualConsole               @pc 170307<br>  2x    performance.memory.usedJSHeapSize    @pc 52080<br>  2x () window.atob.toString                 @pc 173254</pre><p>Math.random 32 times and Date.now 21 times is a way to salt and time itself through the run. The DOM constructors are the probe being built. Everything else is the measurement.</p><h4>The five checks that are looking for you specifically</h4><p>This is the group that needs special attention, because four of these five are not fingerprinting, they are automation detection, and every one is confirmed present in all six bundles:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jt7EP_6WUkuhRESfnLomWg.png" /></figure><p>That last one is the sharpest. The VM stringifies the atob. And [native code] sits right there in the recovered string table. Function.prototype.toString on a real builtin returns function atob() { [native code] }, and on a hooked one returns your replacement source. So the VM is checking <strong>whether the primitives it depends on have been monkey-patched</strong>, which is exactly what an instrumentation harness does to observe it.</p><p>Put that next to the <a href="https://takionapi.tech/blog/datadome-plv3-vm-disassembler#the-two-tripwires">two tripwires</a> from earlier, the step counter and the chksm self-hash, and the anti-tamper story is coherent: chksm catches you rewriting the interpreter&#39;s own functions, the step counter catches you changing how it executes, and atob.toString catches you rewriting the browser underneath it.</p><h4>Where the effort actually goes</h4><p>Bucketing the resolved call sites by area, averaged per bundle:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yQ_Y95kKjfRa-TChWTp7wA.png" /></figure><p>Two things stand out.</p><p><strong>The layout probe has the largest vocabulary by far.</strong> 53 distinct strings, more than double WebGL’s 25, because every rotation ships its own generated CSS custom property names (--b4, --oj, --za) plus the selectors and declarations to go with them. The VM writes a &lt;style&gt; block, nests divs, parks them at position:absolute;left:-9999px, and reads offsetWidth back out. The answer comes from the browser&#39;s own layout arithmetic over calc() expressions, which is precisely why it is hard to fake: you cannot patch a getter to return a plausible number, you would have to reimplement CSS length resolution and agree with the real engine.</p><p><strong>navigator is nearly the smallest.</strong> Seven strings, thirteen call sites. The classic fingerprinting surface everyone patches first is the part this VM cares least about. It spends its time on rendered output and layout instead, which is a rational choice given how easy navigator is to spoof.</p><h4>WebGL, end to end</h4><p>The full pipeline is recoverable, including the shader source, which is sitting in the string table as a literal:</p><pre>attribute vec2 p;void main(){gl_Position=vec4(p,0,1);}</pre><p>and the chains show it being built and executed in order: createShader, shaderSource, compileShader, attachShader, createProgram, linkProgram, useProgram, getAttribLocation, enableVertexAttribArray, bindBuffer with ARRAY_BUFFER, bufferData with STATIC_DRAW, vertexAttribPointer with FLOAT, drawArrays with TRIANGLES, then readPixels with RGBA and UNSIGNED_BYTE.</p><p>That last call is the point of the whole exercise: it renders a triangle and reads the pixels back. The value that comes out depends on the GPU, the driver and the rasteriser, so it is a hardware fingerprint that no amount of JavaScript spoofing reproduces. The canvas path does the same trick with globalCompositeOperation set to difference and getImageData.</p><h4>The captcha delta, at chain level</h4><p>Earlier I compared the two challenge types by their string tables and found two captcha-only strings. Repeating it at chain level, with the same discipline of requiring presence in all three rotations of a family:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ya9y-bHJ-prMP2dNi9tUWw.png" /></figure><p>One chain. The captcha pulls extra entropy from crypto.getRandomValues on top of Math.random, and that is the entire difference in what the two programs ask the browser.</p><p>Everything else that <em>looks</em> like a difference is per-rotation drift, and the counts make it obvious:</p><pre>document.timeline.currentTime        int=3/3  cap=1/3<br>performance.memory.usedJSHeapSize    int=3/3  cap=1/3<br>window.outerWidth                    int=2/3  cap=3/3<br>performance.timeOrigin               int=3/3  cap=2/3<br>window.screen.height                 int=3/3  cap=1/3<br>location.href                        int=3/3  cap=1/3</pre><p>Those are not challenge-type differences, they are build-to-build differences that happen to fall unevenly. Compare one interstitial against one captcha and you would write up half of that list as meaningful. Compare three against three and only crypto.getRandomValues survives.</p><h4>What this means if you are reproducing it</h4><p>The chain list is a to-do list, in priority order. The reads are cheap to satisfy and the <em>renders</em> are not:</p><ul><li>navigator.*, location.*, document.hidden, window.isSecureContext: plain values, spoof freely</li><li>the clock and entropy chains: plain values, but they feed the timing signals, so stay self-consistent</li><li>lastChild.offsetWidth after a calc() style block: needs a real layout engine or an exact reimplementation</li><li>readPixels and getImageData: need a real rasteriser, or a captured value from the machine you are claiming to be</li><li>navigator.webdriver, window._virtualConsole, window.Buffer, window._userAgent, atob.toString: must be <em>absent</em> or <em>native</em>, and jsdom fails four of the five by existing</li></ul><p>That last line is why headless-DOM approaches to this particular VM tend to die early, and it took a disassembler rather than a string dump to say so with a byte offset attached.</p><h3>The rotation surface</h3><p>Every number in this table changes per build:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*M9T6e5Rg9Y8B6FLMnAwZ_g.png" /></figure><p>So do all identifier names, all register offsets, all value tag bytes, all primitive slot IDs, the HALT slot, and the opcode byte of every instruction in the program.</p><p>What does not change is the shape: a const block, an LCG closure, a tagged-value reader with a fall-through chain, a 6-byte string table entry, a MAKE_FUNC record layout, 23 primitives, exactly one HALT, and <strong>exactly 103 handlers</strong> in every bundle in my collection. By anchoring on shape you get a tool that survives rotations. By anchoring on values you get a tool that survives until the next deploy.</p><p>The 103 is the detail I keep coming back to. Identical across interstitial and captcha, identical across every rotation. That is not randomness, that is a compiler emitting a fixed instruction set with shuffled encodings.</p><h3>Conclusion</h3><p>This was a case study, and a good one. Moving the opcode semantics into the payload is a real improvement over the old static switch: it kills every hardcoded opcode table in existence and makes each bundle its own dialect. That is a much better idea than renaming variables one more time. The step counter and the source checksum riding along for free are the kind of details that separate a VM someone built because it sounded cool from a VM someone built to catch people.</p><p>It also has a structural weakness, which is that a VM has to be able to build itself. The loader must tell you where the bytecode lives, the initializer must hand every handler the same primitive table, and the handlers must arrive as readable source before they can be compiled. Follow that construction path in the same order the VM does and it hands you the instruction set on the way past.</p><p>The ctx byte is still my favourite bit. Everyone treats it as a missing key and brute forces it into a pile of nonsense. It was sitting in the instruction stream the whole time, one operand over, waiting for someone to disassemble the program first.</p><p><a href="https://github.com/glizzykingdreko/datadome-plv3-vm-disassembler">Tool is here</a>, MIT, zero dependencies. Point it at a bundle and it will tell you what changed since yesterday.</p><h3>Need DataDome bypass solutions?</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*8zuClmcyHQ1hYOC4.png" /></figure><p>If you would rather skip all of this and just get a working cookie, <a href="https://takionapi.tech/bypass/datadome"><strong>TakionAPI</strong></a> handles DataDome interstitials, captchas and tags in production, plv3 included. One call returns the datadome cookie against a consistent fingerprint, no browser. We know what we are doing. <a href="https://takionapi.tech/trial">Start with a trial</a>.</p><h3>Connect with me</h3><p>If you enjoyed this, follow me on GitHub and Medium to get a ping whenever I post or open-source something.</p><ul><li><a href="https://github.com/glizzykingdreko">GitHub</a></li><li><a href="https://mobile.twitter.com/glizzykingdreko">Twitter</a></li><li><a href="https://medium.com/@glizzykingdreko">Medium</a></li><li><a href="mailto:glizzykingdreko@protonmail.com">Email</a></li><li><a href="https://www.buymeacoffee.com/glizzykingdreko">Buy me a coffee ❤️</a></li><li><a href="https://takionapi.tech/">TakionAPI</a></li></ul><h3>Sources</h3><ul><li><a href="https://github.com/glizzykingdreko/new-datadome-deobfuscator">new-datadome-deobfuscator</a>, run this first to get a readable vm-obf.js</li><li><a href="https://github.com/glizzykingdreko/datadome-wasm">datadome-wasm</a>, the embedded WASM module</li><li><a href="https://github.com/glizzykingdreko/datadome-encryption">datadome-encryption</a>, the request payload encryption</li></ul><p><em>Originally published at </em><a href="https://takionapi.tech/blog/datadome-plv3-vm-disassembler?image_format=jpg"><em>https://takionapi.tech</em></a><em> on July 28, 2026.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=de24c215aa79" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Understanding and Bypassing BotDeflector]]></title>
            <link>https://medium.com/@glizzykingdreko/understanding-and-bypassing-botdeflector-56ff9d0ef9c0?source=rss-ab5cacaa6f79------2</link>
            <guid isPermaLink="false">https://medium.com/p/56ff9d0ef9c0</guid>
            <category><![CDATA[reverse-engineering]]></category>
            <category><![CDATA[soft-block]]></category>
            <category><![CDATA[bypass]]></category>
            <category><![CDATA[queue-it]]></category>
            <category><![CDATA[captcha]]></category>
            <dc:creator><![CDATA[glizzykingdreko]]></dc:creator>
            <pubDate>Sat, 25 Jul 2026 00:00:08 GMT</pubDate>
            <atom:updated>2026-09-09T14:11:00.833Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*D5EsSemrK8FYlpuaUW7HQA.png" /></figure><h3>What is BotDeflector?</h3><p>On a first read you may not even recognise this name, but recently lots of <strong>Queue-IT protected websites</strong> started rolling out this new captcha on either the main queue or a /softblock/ page.</p><p>By making a quick search on internet, the information about them is pretty few. You can see a totally 0 effort landing page and logo.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8ZqizVWlfjV2VHmIjB40HQ.jpeg" /></figure><p>I honestly felt pretty ambiguous about the fact that the most famous Queue provider, used widely around ticket, sneakers and government related websites, implemented this low-effort almost inexistent captcha solution. Their website is a pure one-prompt slop with 0 effort.</p><p>Turned out that the domain has been registered during November 2025, and the Company Owner of BotDeflector is <strong>Martin Pronk</strong>, the co-founder of Queue-IT.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*c31zY7rzB3FuutnI4k4H0A.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WFiCjaRewn9n5w2q1Z5iuQ.png" /></figure><h3>Let’s analyse the captcha</h3><p>BotDeflector protection is based on 2 challenges.</p><h4>Invisible / Proof of Work</h4><p>The PoW logic comes from pow.js, obfuscated via <strong>javascript-obfuscator</strong> with string array rotation and hex accessors. The honestly most basic and low effort way to obfuscate a script.</p><p>We are not going to focus on the deobfuscation of their javascript, since I already released <a href="https://github.com/glizzykingdreko/botdeflector-deobfuscator">a repo for it</a>.</p><p>The server gives you challenge hashes and a params blob:</p><pre>{ &quot;NODES_BITS&quot;: 12, &quot;EDGES_BITS&quot;: 13, &quot;CYCLE_LENGTH&quot;: 6 }</pre><p>plus a GRAPH_SEED, which is your sessionId.</p><p>You build a graph where every edge index maps to two node endpoints:</p><pre>h = sha256(struct.pack(&quot;&lt;I&quot;, edge) + seed_bytes).digest()<br>u = int.from_bytes(h[0:8],  &quot;little&quot;) % (1 &lt;&lt; NODES_BITS)<br>v = int.from_bytes(h[8:16], &quot;little&quot;) % (1 &lt;&lt; NODES_BITS)</pre><p>Then you find a simple cycle of length CYCLE_LENGTH and return its edgeIndices.</p><p>All the challenges in one step share the same graph. The challenge hash only picks your DFS start node:</p><pre>start = int.from_bytes(sha256(bytes.fromhex(challenge)).digest()[0:8], &quot;little&quot;) % num_nodes</pre><p>Like the Queue-IT captcha, pretty simple and easy, only CPU expensive. You can find <a href="https://github.com/glizzykingdreko/botdeflector-pow">here</a> the GO / Python / NodeJS implementation of it.</p><h4>Icon Captcha</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DOuhSarUZj6Yy1oQ4Ac0hw.png" /></figure><p>This is the only hard part of the challenge, a captcha that most of the times is hard to solve even for humans.</p><p><a href="https://takionapi.tech/blog/understanding-and-bypassing-botdeflector#icon-captcha">Try one yourself</a>, it explains the difficulty faster than I can</p><p>And yes, that widget is running on my blog, on a domain that has nothing to do with the SiteKey it is using. There is no origin check anywhere in the flow, so you can lift a SiteKey off any protected site and serve working challenges from wherever you want. reCAPTCHA, hCaptcha and Turnstile all bind a site key to a domain allowlist, it is usually the first thing you implement. Shipping to production without it is pretty rough LOL.</p><p>Front-tier vision models (such as GPT, Anthropic, Google ones) have a really low score rate, with the most capable one benchmarked as <strong>Claude Sonnet 5 with a 60% success rate</strong> and an obv too much cost for solving a captcha that simple. I ran this benchmark for a pure comparison human vs model, for understanding if the captchas are actually hard to understand most of the times.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*6_vjIrzzYVc_FtH8.png" /></figure><p>So the only path forward for solving this issue has been training my own model.</p><p>Lucky the developer of this captcha didn’t implement 2 important things:</p><ol><li><strong>Rate limits.</strong> I can refresh and submit as much icon captchas as I want with no limits at all.</li><li><strong>Rejection after X tries.</strong> So I can retry solving the same image as much as I want by using the same parameters via APIs.</li></ol><p>I didn’t check for other insecurities on their endpoints, such as the possibility to solve a specific image, send empty tokens etc, but by seeing how is going it wouldn’t surprise me.</p><p>Those 2 issues permitted me to have the /icon/verify endpoint as <strong>oracle</strong>. I can submit the same image until solved correctly, making it a perfect distillation for the initial versions of my model. Thanks to this I reached a <strong>99.8% success rate</strong> for this exact kind of captcha, could have pushed it even further but I saw no need at all. All of this without having to use a single proxy, all localhost.</p><h3>The Captcha Steps</h3><p>Few days after the release of the captcha, their portal was live and accessible at https://portal.botdeflector.eu/ (right now returning 404).</p><p>I sadly didn’t save any screenshot of it, but the main thing that you was able to do was creating captchas for testing. This internal look made me understand a bit more about the customisations they offer.</p><p>You can set up to X “steps” based on your tier. Each step can be either an invisible/PoW or icon captcha. You can also choose the difficulty of it in a scale of 1 to 5. On the PoW side the computation gets more CPU-intensive, while the icon captcha didn’t seem to change much.</p><h3>GDPR Compliant</h3><p>The biggest claim of this captcha solution is that they are GDPR compliant.</p><p>Honestly talking the GDPR is pure bullshit. What I’m assuming is just that someone is trying to get some European funds with a project developed in an afternoon, since they can prove that is used by already hundreds of thousands of websites across the web.</p><p>Anyway by analysing the source code there are 2 issues that didn’t make it GDPR compliant. They use <strong>FingerprintJS</strong> in order to fingerprint your browser:</p><ul><li><strong>Canvas fingerprint</strong> (toDataURL) requires consent, as <a href="https://eur-lex.europa.eu/legal-content/EN/TXT/?uri=CELEX%3A32002L0058">Art. 5(3)</a> and the <a href="https://ico.org.uk/for-organisations/direct-marketing-and-privacy-and-electronic-communications/guide-to-pecr/cookies-and-similar-technologies/">ICO guidance</a></li><li><strong>Audio / WebGL / font / hardware fingerprint</strong> requires consent, as <a href="https://www.edpb.europa.eu/system/files/2024-10/edpb_guidelines_202302_technical_scope_art_53_eprivacydirective_v2_en.pdf">EDPB 2/2023</a></li><li><strong>No transparency notice</strong> on the anti-bot flow (usually host-side), as <a href="https://gdpr-info.eu/art-13-gdpr/">Art. 13</a></li></ul><p>Also the captchas are “hard” to solve for a normal person most of the times, requiring different retries most of the times. A colorblind or partially blind person is totally unable to solve them, not the best choice.</p><h3>Conclusion</h3><p>Since we are not talking about a small project/startup but a well funded company, my thoughts are more sharp. I hope to see improvements in this project and not just a quick escamotage to get european funds as Friendly Captcha has done.</p><p>Make sure to check all the repos related to this article:</p><h3>Need help bypassing BotDeflector?</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Fm04STrvTix78womv4msdg.png" /></figure><p>If you’re integrating, reversing, or just trying to understand a wall, whether it’s BotDeflector, a Queue-IT challenge, DataDome or Akamai, that’s what we do at <strong>TakionAPI</strong>. One API call solves the full challenge flow, no browser and no need to pay for external Vision APIs/trian your ML model after a reverse engeneering work. See the <a href="https://takionapi.tech/bypass/botdeflector">BotDeflector bypass</a> page for the endpoint. Start today <a href="https://takionapi.tech/trial">with a trial</a></p><h3>Connect with me</h3><ul><li><a href="https://github.com/glizzykingdreko">GitHub</a></li><li><a href="https://mobile.twitter.com/glizzykingdreko">Twitter</a></li><li><a href="https://medium.com/@glizzykingdreko">Medium</a></li><li><a href="mailto:glizzykingdreko@protonmail.com">Email</a></li><li><a href="https://takionapi.tech/">TakionAPI</a></li><li><a href="https://www.buymeacoffee.com/glizzykingdreko">Buy me a coffee ❤️</a></li></ul><p><em>Originally published at </em><a href="https://takionapi.tech/blog/understanding-and-bypassing-botdeflector"><em>https://takionapi.tech</em></a><em> on July 25, 2026.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=56ff9d0ef9c0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[X (former Twitter) Login flow reconstruction. Episode 2 — UI Metrics]]></title>
            <link>https://medium.com/@glizzykingdreko/x-former-twitter-login-flow-reconstruction-episode-2-ui-metrics-549eab0c0f9c?source=rss-ab5cacaa6f79------2</link>
            <guid isPermaLink="false">https://medium.com/p/549eab0c0f9c</guid>
            <category><![CDATA[twitter]]></category>
            <category><![CDATA[reverse-engineering]]></category>
            <category><![CDATA[web-automation]]></category>
            <category><![CDATA[xs]]></category>
            <category><![CDATA[ui-metrics]]></category>
            <dc:creator><![CDATA[glizzykingdreko]]></dc:creator>
            <pubDate>Sat, 21 Feb 2026 23:34:57 GMT</pubDate>
            <atom:updated>2026-02-21T23:34:57.101Z</atom:updated>
            <content:encoded><![CDATA[<h3>X (former Twitter) Login flow reconstruction. Episode 2 — UI Metrics</h3><p>This is my second episode about the login X / Twitter flow and all the needed generation required in order to create a requests based script. If you missed the previous episode, be sure to <a href="https://medium.com/@glizzykingdreko/x-former-twitter-login-flow-reconstruction-episode-1-headers-generation-68a23add39e1">check it out</a></p><p><a href="https://github.com/glizzykingdreko/x-twitter-ui-metrics">Check this episode GitHub repo with full study and its Node/Go/Python implementations</a></p><p>Today goal is to correctly understand and solve the ui_metrics challenge loaded from the script <a href="https://twitter.com/i/js_inst?c_name=ui_metrics">https://twitter.com/i/js_inst?c_name=ui_metrics</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BuGeYdzBptzRvLM9VJmhlg.png" /></figure><h3>Understanding it</h3><p>During an “username check” request ( on the endpoint https://api.x.com/1.1/onboarding/task.json?flow_name=login ) you&#39;ll get as response subtask_id LoginJSInstrumentationSubtask</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TpDiZf1zHSt5YHoWKcQwlw.png" /></figure><p>This mean that the twitter sdk is going to load the js script from <a href="https://twitter.com/i/js_inst?c_name=ui_metrics">https://twitter.com/i/js_inst?c_name=ui_metrics</a></p><p>A dynamic JS script that will return a long dynamic JS obfuscated script that looks like</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zB38lN4Zfp4E6iW-OBIwRg.png" /></figure><p>By taking a look into this mess, we can already identify some key informations:</p><ul><li>Variables used 6x hex chars (SHA256 like approach)</li><li>A return object with rf (computed values) and s (a static signature/token)</li><li>The script creates an hidden input fields named ui_metrics with the JSON result</li></ul><p>The main calculation function uses some bitwise operations on 4 numeric variables and then return the final result. But before proceeding we need to understand 2 “complex” obfuscation patterns.</p><h3>1. Identifying the obfuscation patterns</h3><h4>Prototype XOR</h4><p>A pretty clean pattern that uses Javascript prototype chain in order to perform XOR operations in an “obfuscated” way</p><pre>a6119e2f973a1d...4ca6d3d91310d0927 = function(POgAM, oFHVk, TvMAz) {<br>    function UkRmJ(yBLdW) {<br>        this.TWByd = function() {<br>            return this.mUxbW ^ yBLdW;<br>        }<br>    }<br>    var vjVer = {<br>        mUxbW: TvMAz<br>    };<br>    var aVDMH = new UkRmJ(POgAM);<br>    aVDMH.mUxbW = oFHVk;<br>    UkRmJ.prototype = vjVer;<br>    return aVDMH.TWByd() | (new UkRmJ(oFHVk)).TWByd();<br>}(arg1, arg2, arg3);</pre><p>Let’s break it down:</p><ol><li>A constructor UkRmJ is created that stores a XOR method</li><li>An object vjVer is created with mUxbW set to the third argument</li><li>An instance is created, then its mUxbW is overwritten with the second argument</li><li>The prototype is changed AFTER creating the first instance</li><li>First call: this.mUxbW comes from instance property (arg2), XORed with arg1</li><li>Second call: this.mUxbW comes from prototype (arg3), XORed with arg2</li></ol><p>That can be easly converted into</p><pre>arg2 ^ arg1 | arg3 ^ arg2</pre><h4>DOM Tree Calculation</h4><p>Now we get creative. Using an actual DOM a calculation is made</p><pre>a4952d9090df64c4e...1e4c7a23d4f827 = function(Bcgrg, UZGVA, iKpwN) {<br>    var aRkCd = document.createElement(&#39;div&#39;);<br>    aRkCd.setAttribute(&#39;style&#39;, &#39;display:none;&#39;);<br>    document.getElementsByTagName(&#39;body&#39;)[0].appendChild(aRkCd);<br><br>    function QvFOY(jIbtN, YvKjZ) {<br>        for (var i = 0; i &lt; 8; i++) {<br>            var RFTrj = document.createElement(&#39;div&#39;);<br>            jIbtN.appendChild(RFTrj);<br>            RFTrj.innerText = YvKjZ;<br>            if ((YvKjZ &amp; 1) == 0)<br>                jIbtN = RFTrj;<br>            YvKjZ = YvKjZ &gt;&gt; 1;<br>        }<br>        return jIbtN;<br>    }<br><br>    function bUZeJ(RFTrj, aRkCd, YvKjZ) {<br>        if (!RFTrj || RFTrj == aRkCd)<br>            return YvKjZ % 256;<br>        while (RFTrj.children.length &gt; 0)<br>            RFTrj.removeChild(RFTrj.lastElementChild);<br>        return bUZeJ(RFTrj.parentNode, aRkCd, YvKjZ + parseInt(RFTrj.innerText));<br>    }<br><br>    var YvKjZ = bUZeJ(QvFOY(QvFOY(QvFOY(aRkCd, Bcgrg), UZGVA), iKpwN), aRkCd, 0);<br>    aRkCd.parentNode.removeChild(aRkCd);<br>    return YvKjZ;<br>}(val1, val2, val3);</pre><p>The logic of it is:</p><ol><li>Creates an hidden div and appends to the body</li><li>QvFOY builds a tree structure based on the binary representation of the input value - for each of the 8 bits, it creates a child div and conditionally changes the &quot;current parent&quot; based on whether the bit is 0</li><li>This is called three times in a chain to build nested tree structures for all three values</li><li>bUZeJ recursively traverses up the tree, summing up innerText values and returning the result mod 256</li><li>The hidden div is cleaned up after calculation</li></ol><p>Basically a computation “hidden” as a DOM manipulation, probably made in order to block headless browsers.</p><h4>Date XOR</h4><p>There’s also a third, simpler pattern. It looks like this</p><pre>value = value ^ new Date(value * 10000000000).getUTCDate();</pre><p>This one just XORs the variable with the UTC day of the month derived from the value itself. Pretty straight forward, and it means the output is time-independent since the timestamp is derived from the value, not the current date.</p><h3>2. The Deobfuscation</h3><p>Now that we understand what the obfuscation patterns actually do, we can skip the browser entirely and reimplement the logic in any language. Let’s proceed.</p><p>The approach is simple: parse the script line by line using regex, detect which pattern we’re dealing with, and execute it natively.</p><p>For the Prototype XOR we already know the formula, so whenever we detect a function IIFE containing &quot;prototype&quot;, we extract the three arguments and compute the result directly.</p><p>For the DOM Tree we detect it by looking for &quot;createElement&quot; in the function body. Then instead of actually building DOM nodes, we simulate the tree with a simple array</p><pre>def dom_tree_calc(val1, val2, val3):<br>    nodes = [{&#39;innerText&#39;: 0, &#39;parentIndex&#39;: -1}]<br><br>    def build_tree(parent_idx, value):<br>        current_parent_idx = parent_idx<br>        for _ in range(8):<br>            new_node_idx = len(nodes)<br>            nodes.append({&#39;innerText&#39;: value, &#39;parentIndex&#39;: current_parent_idx})<br>            if (value &amp; 1) == 0:<br>                current_parent_idx = new_node_idx<br>            value = value &gt;&gt; 1<br>        return current_parent_idx<br><br>    def traverse_and_sum(node_idx, root_idx, total):<br>        if node_idx == -1 or node_idx == root_idx:<br>            return js_mod(total, 256)<br>        node = nodes[node_idx]<br>        return traverse_and_sum(node[&#39;parentIndex&#39;], root_idx, total + node[&#39;innerText&#39;])<br><br>    d1 = build_tree(0, val1)<br>    d2 = build_tree(d1, val2)<br>    d3 = build_tree(d2, val3)<br>    return traverse_and_sum(d3, 0, 0)</pre><p>Each node is just a dict with innerText and parentIndex. build_tree walks the 8 bits of the value and either nests deeper (even bit) or stays at the same level (odd bit). traverse_and_sum walks back up summing the values.</p><h4>The annoying Javascript logic</h4><p>There is one critical thing worth mentioning. Notice the js_mod call instead of a plain % 256. In Python, the modulo operator always returns a non-negative result for a positive divisor</p><pre># Python<br>-208 % 256  # returns 48</pre><p>While in javascript, the sign of the dividend is preserved</p><pre>// JavaScript<br>-208 % 256  // returns -208</pre><p>The fix is a small helper</p><pre>def js_mod(a, b):<br>    if a &gt;= 0:<br>        return a % b<br>    return -((-a) % b) if (-a) % b != 0 else 0</pre><h3>3. The solver</h3><p>Putting it all together, the solver works in 4 steps:</p><ol><li>Extract the 4 initial variable values using a regex on var declarations</li><li>Extract the static s string from the return statement</li><li>Walk the function body line by line, detecting each operation type</li><li>Return the final variable values as the rf object, paired with the s string</li></ol><p>So, by understanding the operation type via this table</p><pre>| Pattern Detected          | Action                                    |<br>|---------------------------|-------------------------------------------|<br>| IIFE with `createElement` | `dom_tree_calc(arg1, arg2, arg3)`         |<br>| IIFE with `prototype`     | `(arg2 ^ arg1) \| (arg3 ^ arg2)`          |<br>| Assignment with `new Date`| `value ^ getUTCDate(value * 10000000000)` |<br>| Simple assignment         | Eval bitwise exp (`^`, `&amp;`, `\|`, `~`)    |</pre><p>We can straight-forward solve this challenge with just regex and arithmetic. By having at the end an output dict like</p><pre>{<br>  &quot;rf&quot;: {<br>    &quot;a426be92eaca1e3378ae3....c72d05ac7757212fc&quot;: 22,<br>    &quot;b068e1e02c6e975194343...bcd335f40257cab&quot;: 207,<br>    &quot;da6a57a0e5a772c8f414e...4f082ec3ef525f25d23d1c2&quot;: -195,<br>    &quot;ae09b38c692fe2ba158f6...8cc7413f58b5fdf886b2ca5c&quot;: 20<br>  },<br>  &quot;s&quot;: &quot;eJKvRt3Dg_63RqBBrX_w9EfBvNuG8b4O...&quot;<br>}</pre><p>That you’ll need to send back to twitter</p><h3>What’s next?</h3><p>We have terminated the ui_metrics challenge, be sure to check the <a href="https://github.com/glizzykingdreko/x-twitter-ui-metrics">full repo on Github</a> where you can find the solvers for both Python NodeJS and Golang. Be sure to star it.</p><p>Next step is proceeding with integrating everything into the complete login flow alongside the Castle Token generation. Be sure to subscribe to my newsletter in order not to miss it, a full login script request based will be posted.</p><h3>Connect with me</h3><p>If you enjoyed this article, follow me on GitHub and on Medium to receive notifications whenever I post or open-source something, or buy me a coffee to keep me up.</p><ul><li><a href="https://github.com/GlizzyKingDreko">GitHub</a></li><li><a href="https://twitter.com/GlizzyKingDreko">Twitter</a></li><li><a href="https://medium.com/@GlizzyKingDreko">Medium</a></li><li><a href="mailto:glizzykingdreko@protonmail.com">Email</a></li><li><a href="https://buymeacoffee.com/glizzykingdreko">Buy me a coffee</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=549eab0c0f9c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Analyzing Datadome latest changes]]></title>
            <link>https://medium.com/@glizzykingdreko/analyzing-datadome-latest-changes-424f385bcdd4?source=rss-ab5cacaa6f79------2</link>
            <guid isPermaLink="false">https://medium.com/p/424f385bcdd4</guid>
            <category><![CDATA[web-scraping]]></category>
            <category><![CDATA[anti-bot]]></category>
            <category><![CDATA[reverse-engineering]]></category>
            <category><![CDATA[javscript-vm]]></category>
            <category><![CDATA[datadome]]></category>
            <dc:creator><![CDATA[glizzykingdreko]]></dc:creator>
            <pubDate>Wed, 21 Jan 2026 16:53:48 GMT</pubDate>
            <atom:updated>2026-01-21T16:53:48.796Z</atom:updated>
            <content:encoded><![CDATA[<p>Once in a while Datadome actually implement something new, I always hope into a spicy situation, but this (again) seems not to be the case.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/958/1*rSYqpgU-qMvddXTbLNnIVA.png" /></figure><h3>No puzzle!</h3><p>Let’s start by talking about the actual global (seems) activation of the noPuzzle captcha</p><p>This was part of a sleeping code placed a while back, but I actually never saw it active before a couple of weeks ago.</p><p>At the moment it seems that their classic “slide captcha” has been globally deactivated (so probably not a website based configuration).</p><h4>Pro</h4><p>Actually, in terms of solving nothing has changed, maybe even improved, since you previously had to calculate the “slide arrival” location (for movements and signals) while. right now it is always going to be a static value. Solving time is as well cutted down since there’s no need anymore to solve and analyze the challenge images.</p><h4>Contro</h4><p>I’m assuming that this means they are about to implement a new image based captcha (I hope for them)</p><h3>Virtual Machine — plv3</h3><p>This update followed up with the implementation, on both captcha and interstitial of the plv3 parameter.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7ClVL3SxS1YLnlY7zO6PRg.png" /></figure><p>The generation of it is totally handled by their file vm-obj.js.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZRtDmY0mr5f_kxovXE32-g.png" /></figure><p>I’ll proceed explaining this part is the simplest way possible in order to make any reader understand what we are talking about.</p><h4>What’s a Javascript VM (Virtual Machine)?</h4><p>In a few words, Javascript normally runs on your browser thanks to the engine of it, able to understand specifically Javascript. <br>A VM let’s runs other code. Almost like a small pc inside your browser window This mostly helps with code protection and obfuscation.</p><p>Now that we understand VMs in general, let’s see how Datadome specifically implements theirs</p><h4>The Datadome VM</h4><p>The logic follows those 3 steps:</p><pre>┌─────────────────────────────────────────────────────────────┐<br>│                      BYTECODE                                │<br>│  (A long string of numbers - the encoded instructions)       │<br>│  Example: [45, 128, 67, 23, 199, 54, 12, 88, ...]            │<br>└─────────────────────────────────────────────────────────────┘<br>                              │<br>                              ▼<br>┌─────────────────────────────────────────────────────────────┐<br>│                     THE VM ENGINE                            │<br>│  - Reads bytecode one instruction at a time                  │<br>│  - Has a &quot;stack&quot; to store temporary values                   │<br>│  - Has a &quot;program counter&quot; to track current position         │<br>│  - Executes ~100 different operation types                   │<br>└─────────────────────────────────────────────────────────────┘<br>                              │<br>                              ▼<br>┌─────────────────────────────────────────────────────────────┐<br>│                       OUTPUT                                 │<br>│  A &quot;fingerprint&quot; - a unique signature of your browser        │<br>│  Example: {&quot;r&quot;: &quot;abc123...&quot;, &quot;i&quot;: 340000, &quot;t&quot;: 25}           │<br>└─────────────────────────────────────────────────────────────┘</pre><p>Those bytecode instructions comes from that long string we can find inside their file vm-obj.js</p><p><strong>Stack</strong><br>The VM uses a “stack” where you can only push or pop from the top</p><pre>PUSH 5     →  [5]<br>PUSH 3     →  [5, 3]<br>ADD        →  [8]        (pops 5 and 3, pushes their sum)<br>PUSH 2     →  [8, 2]<br>MULTIPLY   →  [16]</pre><p><strong>Program Counter (PC)<br></strong>The Program Counter tells the vm where to read the next instruction</p><pre>Bytecode: [PUSH, 5, PUSH, 3, ADD, PUSH, 2, MULTIPLY]<br>              ↑<br>              PC = 0 (start here)<br><br>After PUSH 5:<br>Bytecode: [PUSH, 5, PUSH, 3, ADD, PUSH, 2, MULTIPLY]<br>                    ↑<br>                    PC = 2 (moved forward)</pre><p>This because each number in the bytecode represent an operation, in the Datadome one we are going to find around 100 different ones:</p><pre>| Opcode | Name     | What it does                   |<br>|--------|----------|--------------------------------|<br>| 45     | PUSH     | Put a value on the stack       |<br>| 67     | ADD      | Add two numbers                |<br>| 89     | JUMP     | Go to a different position     |<br>| 92     | JUMP_IF  | Jump only if condition is true |<br>| 23     | GET_PROP | Get a property from an object  |<br>| 54     | CALL     | Call a function                |<br>| ...    | ...      | ...                            |</pre><p>let’s say that the VM wants to check if your navigator has a certain feature, it will proceed in a way like this:</p><pre>Bytecode: [GET_WINDOW, GET_PROP, &quot;navigator&quot;, GET_PROP, &quot;userAgent&quot;, STORE]<br><br>Step 1: GET_WINDOW<br>   Stack: [window]<br>   (Gets the browser&#39;s window object)<br><br>Step 2: GET_PROP &quot;navigator&quot;<br>   Stack: [navigator]<br>   (Gets window.navigator)<br><br>Step 3: GET_PROP &quot;userAgent&quot;<br>   Stack: [&quot;Mozilla/5.0 Chrome/120...&quot;]<br>   (Gets the browser&#39;s user agent string)<br><br>Step 4: STORE<br>   Stack: []<br>   (Saves this value to use in the fingerprint)</pre><h4>The output data</h4><p>After a successfull execution of the VM (around 360k instructions for a captcha, arond 100k less for interstitial challenge) the output will look like:</p><pre>{<br>  &quot;r&quot;: &quot;aGVsbG...&quot;,  # output fingerprint value<br>  &quot;i&quot;: 340580,       # interactions done <br>  &quot;t&quot;: 25            # elapsed time <br>}</pre><p>With this output data we now have r that will be used as our plv3, while the other 2 are going to be used for the signals payload.</p><h4>How can be solved?</h4><p>Currently the bytecode instructions makes several checks before/during the fingerprint extraction, that not only needs to match the details of your solved payload, but also of the challenge you are solving.</p><p>This means that using a browser tab for solving it isn’t just the worst and unscalable solution, will be also non-working. So good luck to the selenium based solutions around working with it.</p><p>The actual best approach would be to understand those instructions, what the VM is looking for and analysing, in order to then create a script-based env able to correctly run the file with the same details used for the signals payload constructions.</p><p>The main key in reverse engineering antibots is always: “have a clue of what’s happening” or you’ll pay the price for it later!</p><p>I’m assuming that this is just a first test for Datadome, let’s see if the upcoming VM changes will be actually strong lol</p><h3>Need a stable Datadome solution?</h3><p>Get in touch with some experts who truly understand the technology, don’t think you want to have your project down each time Datadome pushes a change.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5MPCXbV8c3zraY0AS5Tqng.jpeg" /></figure><p>At <a href="https://takionapi.tech">TakionAPI</a> we provide it Be sure to check it out, <a href="https://dashboard.takionapi.tech">start a free trial </a>and then proceed checking out <a href="https://docs.takionapi.tech">our documentation</a>, one api call and Datadome is not a problem you need to worry about anymore.</p><h3>Connect with me</h3><p>If you enjoyed this article, follow me on GitHub and on Medium to receive notifications whenever I post or open-source something.</p><ul><li><a href="https://github.com/glizzykingdreko">GitHub</a></li><li><a href="https://mobile.twitter.com/glizzykingdreko">Twitter</a></li><li><a href="/@glizzykingdreko">Medium</a></li><li><a href="mailto:glizzykingdreko@protonmail.com">Email</a></li><li><a href="https://www.buymeacoffee.com/glizzykingdreko">Buy me a coffee ❤️</a></li><li><a href="https://takionapi.tech">Start bypassing Datadome</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=424f385bcdd4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[X (former Twitter) Login flow reconstruction. Episode 1 — Headers generation]]></title>
            <link>https://medium.com/@glizzykingdreko/x-former-twitter-login-flow-reconstruction-episode-1-headers-generation-68a23add39e1?source=rss-ab5cacaa6f79------2</link>
            <guid isPermaLink="false">https://medium.com/p/68a23add39e1</guid>
            <category><![CDATA[reverse-engineering]]></category>
            <category><![CDATA[xs]]></category>
            <category><![CDATA[wasm]]></category>
            <category><![CDATA[twitter]]></category>
            <category><![CDATA[python-automation]]></category>
            <dc:creator><![CDATA[glizzykingdreko]]></dc:creator>
            <pubDate>Tue, 13 Jan 2026 14:11:50 GMT</pubDate>
            <atom:updated>2026-01-13T14:11:50.696Z</atom:updated>
            <content:encoded><![CDATA[<h3>X (former Twitter) Login flow reconstruction. Episode 1 — Headers generation</h3><p>Today post is the first of a small serie about X / Twitter login automatisation. In this episode I’m going to reverse engine all the X / Twitter headers required for the login flow. At the end of the serie we’ll have a full login script in python non-browser dependent.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Dlbiaqfnaa3aor_Ho8AByg.png" /></figure><p>Check this episode <a href="https://github.com/glizzykingdreko/twitter-generator/blob/main/LEARN.md">GitHub repo with full study</a> and its <a href="https://github.com/glizzykingdreko/twitter-generator">Python module</a></p><h3>X-Client-Transaction-Id</h3><p>This token gets generated for each request based on 3 main things:</p><ul><li>Request details (METHOD and URL)</li><li>Fingerprint based on a loaded (a meta tag called “twitter-site-verification” and a “dynamic” js file)</li><li>Current timestamp</li></ul><p>The original code looks like this</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HFxIKsiliLEUtoauPRccjw.png" /></figure><p>After a bit of cleaning up we get this more redable snippet</p><pre><br>// Calculate seconds elapsed since reference timestamp (April 2023)<br>var secondsSinceEpoch = Math.floor((Date.now() - 1682924400 * 1000) / 1000);<br><br>// Convert timestamp to bytes (Float64 → Uint8Array)<br>var timestampBytes = new Uint8Array(new Float64Array([secondsSinceEpoch]).buffer);<br><br>// Get fingerprint from DOM element<br>var fingerprint = new Uint8Array(atob(<br>    document.querySelectorAll(&quot;[name^=tw]&quot;)[0].getAttribute(&quot;content&quot;)<br>)[&quot;split&quot;](&quot;&quot;)[&quot;map&quot;](function (n) {<br>    return n[&quot;charCodeAt&quot;](0);<br>}));<br><br>var fingerprintHash = generateFingerprintHash(fingerprint);<br><br>// Random salt for the payload<br>var randomSalt = [Math.random() * 256];<br><br>// Convert fingerprint and timestamp to arrays<br>var fingerprintArray = Array.from(fingerprint);<br>var timestampArray = Array.from(timestampBytes);<br><br>// Build the hash input: &quot;param2!param1!timestamp&quot; + &quot;obfiowerehiring&quot; + fingerprintHash<br>var hashInput = [t, r, secondsSinceEpoch].join(&quot;!&quot;) + &quot;obfiowerehiring&quot; + fingerprintHash;<br><br>// Compute SHA-256 hash asynchronously<br>var hashResult = crypto.subtle.digest(&quot;sha-256&quot;, new TextEncoder().encode(hashInput));<br><br>// Build the final payload by concatenating:<br>// [randomSalt, fingerprintArray, timestampArray, transformed(slice16(arrayFrom(hashBytes).concat(HW))), 3]<br>var hashBytes = new Uint8Array(hashResult);<br>var hashArray = Array.from(hashBytes);<br>var transformed = hashArray.concat(HW)[&quot;slice&quot;](0, Math.pow(2, 4));  // Take first 16 bytes<br><br>var payload = randomSalt.concat(fingerprintArray, timestampArray, transformed, [3]);<br><br>// Encode as base64 with optional XOR and return<br>var finalBytes = new Uint8Array(payload);<br><br>// base64 encode with optional XOR<br>MW = function (n, r, t) {<br>    return r ? n ^ t[0] : n;<br>}<br>sW = function (n) {<br>    return btoa(Array.from(n)[&quot;map&quot;](function (n) {<br>        return String[&quot;fromCharCode&quot;](n);<br>    })[&quot;join&quot;](&quot;&quot;))[&quot;replace&quot;](/=/g, &quot;&quot;);<br>}<br>var encoded = sW(finalBytes.map(MW));</pre><p>You can find the full code, as well as the generateFingerprintHash part (a pretty base fingerprint based on css animations) on my github repo.</p><h4>So, how do we solve this one?</h4><p>Pretty straight forward to the result, we simply need to recreate the same hash based on the action we are taking and implement in it time and animation key, here’s an example</p><pre>def _generate_transaction_id(self, method: str, path: str) -&gt; str:<br>    # Calculate current time offset<br>    time_now = floor((time() * 1000 - 1682924400000) / 1000)<br>    time_now_bytes = [(time_now &gt;&gt; (i * 8)) &amp; 0xFF for i in range(4)]<br>    <br>    # Generate hash<br>    hash_val = sha256(<br>        f&quot;{method}!{path}!{time_now}obfiowerehiring{self.animation_key}&quot;.encode()<br>    ).digest()<br>    <br>    # Build final byte array with XOR encoding<br>    random_num = randint(0, 255)<br>    bytes_arr = [*self.key_bytes, *time_now_bytes, *list(hash_val)[:16], 3]<br>    out = bytearray([random_num, *[b ^ random_num for b in bytes_arr]])<br>    <br>    return b64encode(out).decode().rstrip(&quot;=&quot;)<br><br># Example usage<br>self._generate_transaction_id(<br>    method=&#39;POST&#39;,<br>    path=&#39;/1.1/onboarding/task.json&#39;<br>)</pre><p>The animation part, as well as the full code can be found in my repo.</p><h3>X-Guest-Token</h3><p>Generated from a</p><pre>POST https://api.x.com/1.1/guest/activate.json</pre><p>pretty simple and straight forward, we can skip this one and proceed.</p><h3>X-Xp-Forwarded-For</h3><p>Let’s take a look into the source code:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hW3-CLWcPYi2idW5-L586A.png" /></figure><p>So, we need to analyze this window.XPForwardedForSDK that by a first look seems to have couple of attributes and there’s a WASM script involved</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pHkxPE8PaSVP0o9sbidTqA.png" /></figure><p>The main attributes that are important to us are:</p><ul><li>init(environment)<br>Loads the WASM runtime</li><li>getForwardedForStr()<br>Returns us a dict containing the important string and the expiring time</li></ul><p>Obv since is prettye verything wasm based we need to understand what it does.</p><h4>1. Decompiling the WASM script</h4><p>After extracting and parsing the script via a simple snippet such as</p><pre>const fs = require(&#39;fs&#39;);<br>const code = fs.readFileSync(&#39;x_xp_forwarded_for.js&#39;, &#39;utf8&#39;);<br><br>// Find the WASM bytes array using regex<br>const match = code.match(<br>    /864585:\s*e\s*=&gt;\s*\{[^}]*var\s+t\s*=\s*new\s+ArrayBuffer\((\d+)\);\s*new\s+Uint8Array\(t\)\.set\(\[([^\]]+)\]/s<br>);<br><br>if (match) {<br>    const size = parseInt(match[1]);<br>    console.log(&#39;WASM size:&#39;, size, &#39;bytes&#39;);<br>    <br>    // Parse the bytes<br>    const allBytes = match[2].split(&#39;,&#39;).map(b =&gt; parseInt(b.trim()));<br>    const buffer = Buffer.from(allBytes);<br>    <br>    // Save to file<br>    fs.writeFileSync(&#39;xpforwarded.wasm&#39;, buffer);<br>    console.log(&#39;Saved to xpforwarded.wasm&#39;);<br>}</pre><p>We can proceed converting the binary WASM to redable text via the usefull tool wasm2wat as</p><pre>wasm2wat xpforwarded.wasm -o xpforwarded.wat</pre><p>We now have a way better view of the situation</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*LlMZa2WKaquBFs-un8t_tw.png" /></figure><p>We can already point out the fact that is a GO based script this make our debug process a way easier.</p><h4><strong>2. Analyzing WAT Data Segments</strong></h4><p>The WAT files contains data segments with embed strings</p><pre>(data (;0;) (i32.const 65536) &quot;expand 32-byte k...&quot;)<br>(data (;1;) (i32.const 65842) &quot;meta\00invalid syntax0123456789abcefz...&quot;)</pre><p>the main discoveries I’ve done was:</p><pre>| String                                      | Interpretation               |<br>|---------------------------------------------|------------------------------|<br>| `forwarded-for-sdk/javascript_fingerprint`  | Go package name              |<br>| `crypto/aes`, `crypto/internal/fips140/aes` | AES encryption used          |<br>| `crypto/internal/fips140/aes/gcm`           | GCM mode specifically        |<br>| `crypto/internal/fips140/sha256`            | SHA-256 hashing              |<br>| `documentcookie;=guest_id`                  | Cookie extraction logic      |<br>| `navigatoruserActivationhasBeenActive`      | User interaction check       |<br>| `userAgentwebdriverundefined`               | Bot detection via webdriver  |<br>| `getForwardedForStr`                        | Exported JS function name    |<br>| `strexpiryTimeMillis`                       | Return object properties     |<br>| `json:&quot;navigator_properties&quot;`               | JSON field tag               |<br>| `json:&quot;created_at&quot;`                         | JSON field tag               |</pre><p>We are almost set, let’s try to extract the encryption key used for the AES encryption in order to have everything</p><pre>strings xpforwarded.wasm | grep -E &quot;^[0-9a-f]{64}$&quot;<br><br># that will output<br>0e6be1f1e21ffc33590b888fd4dc81b19713e570e805d4e5df80a493c9571a05</pre><h4>3. Understanding the Go Runtime</h4><p>A bit of theory is always needed in order to figure out the situation</p><p>Go compiles to WASM using the <strong>GOOS=js GOARCH=wasm</strong> target. This requires:</p><p>1. A JavaScript file that implements the <strong>gojs</strong> imports<br>2. Go manages its own memory within WASM linear memory, so a amanger is required<br>3. The <strong>syscall/js</strong> package provides bidirectional communication</p><p><strong>Value Reference System<br></strong>Go WASM uses a reference system to pass values between Go and JavaScript:</p><pre>// Values are stored in an array, indexed by IDs<br>this._values = [<br>    NaN,        // 0: reserved<br>    0,          // 1: zero<br>    null,       // 2: null<br>    true,       // 3: true<br>    false,      // 4: false<br>    globalThis, // 5: global object<br>    this        // 6: Go instance<br>];</pre><p>When Go calls `syscall/js.valueGet(obj, “property”)`:</p><p>1. Go passes the object reference ID<br>2. The JS glue code looks up the object in `_values`<br>3. Gets the property<br>4. Stores the result in `_values` and returns the new ID</p><p><strong>Asyncify Transform<br></strong>The WASM module uses Binaryen’s asyncify transform to handle async JavaScript operations:</p><pre><br>(export &quot;asyncify_start_unwind&quot; (func 436))<br>(export &quot;asyncify_stop_unwind&quot; (func 437))<br>(export &quot;asyncify_start_rewind&quot; (func 438))</pre><p>This allows the Go code to `await` JavaScript Promises, which is necessary for:</p><p>- <strong>crypto.subtle.encrypt()</strong><br>- <strong>crypto.subtle.digest()</strong></p><h4>4. The reverse engineering methodology</h4><p>The approach I’m going to use in order to recreate this wasm correctly, is without using the file directly at all. Would be too easy to just make a simple JS script running the file with a correct env. I actually want to recreate everythign from scratch. Let’s proceed.</p><p><strong>Evidence 1: Embedded Strings<br></strong>The most powerfull technique for analyzing GO binaries is extracting and analyizing embedded strings, such as:</p><ul><li>Package names</li><li>Error messages</li><li>JSON struct tags</li><li>Type names</li></ul><p>Let’s extract everything via a single command</p><pre>strings xpforwarded.wasm | grep -v &quot;^.$&quot; | sort -u &gt; all_strings.txt</pre><p>Now let’s study them</p><pre>| String Found                           | What It Tells Us <br>|----------------------------------------|<br>| `json:&quot;navigator_properties&quot;`          | There&#39;s a Go struct with a field that serializes to `navigator_properties` <br>| `json:&quot;user_agent&quot;`                    | Nested struct has `user_agent` field <br>| `json:&quot;has_been_active&quot;`               | Boolean field for user activation <br>| `json:&quot;webdriver&quot;`                     | Boolean field for bot detection <br>| `json:&quot;created_at&quot;`                    | Timestamp field <br>| `navigatoruserActivationhasBeenActive` | Concatenated JS property access path <br>| `userAgentwebdriverundefined`          | More JS properties being accessed <br>| `getForwardedForStr`                   | The exported function name<br>| `strexpiryTimeMillis`                  | Return object has `str` and `expiryTimeMillis` keys</pre><p>The logic we’ll be using is</p><pre>json:&quot;navigator_properties&quot; + json:&quot;user_agent&quot; + json:&quot;has_been_active&quot; + json:&quot;webdriver&quot;<br>                                        ↓<br>                        NavigatorProperties struct with 3 fields<br><br>json:&quot;navigator_properties&quot; + json:&quot;created_at&quot;<br>                    ↓<br>        ClientSignals struct wrapping NavigatorProperties</pre><p><strong>Evidence 2: Package paths<br></strong>Go binaries embed full package paths:</p><pre>strings xpforwarded.wasm | grep &quot;crypto/&quot;<br># Returns<br>crypto/aes                       -&gt; Uses AES encryption<br>crypto/cipher                    -&gt; Uses cipher modes (block cipher interface)<br>crypto/internal/fips140/aes<br>crypto/internal/fips140/aes/gcm  -&gt; Specifically GCM mode<br>crypto/internal/fips140/sha256</pre><p><strong>Evidence 3: Error messages<br></strong>Error reveal us the functions behaviors</p><pre>strings xpforwarded.wasm | grep -i &quot;error&quot;<br><br>// returns<br>error creating AES cipher:<br>error creating GCM:<br>Error encrypting data:</pre><p>So we could already guess that there’s a logic like</p><pre>// Error message &quot;error creating AES cipher:&quot; implies:<br>block, err := aes.NewCipher(key)<br>if err != nil {<br>    return nil, fmt.Errorf(&quot;error creating AES cipher: %w&quot;, err)<br>}<br><br>// Error message &quot;error creating GCM:&quot; implies:<br>gcm, err := cipher.NewGCM(block)<br>if err != nil {<br>    return nil, fmt.Errorf(&quot;error creating GCM: %w&quot;, err)<br>}</pre><p>And so on, take a look to the github repo about it for a <a href="https://github.com/glizzykingdreko/twitter-generator/blob/main/LEARN.md">full reconstruction logic</a> of the original GO script and the conversion into Python / NodeJS. As well as the python module <a href="https://github.com/glizzykingdreko/twitter-generator">twitter-generator</a> for generating those headers easily</p><h3>What’s next?</h3><p>We have terminated the headers generation part, be sure to check the <a href="https://github.com/glizzykingdreko/twitter-generator">full repo on Github</a>.</p><p>Next step is proceeding with the first antibot challenge. Be sure to subscribe to my newsletter in order not to miss it.</p><h3>Connect with me</h3><p>If you enjoyed this article, follow me on GitHub and on Medium to receive notifications whenever I post or open-source something, or buy me a coffee to keep me up.</p><ul><li><a href="https://github.com/glizzykingdreko">GitHub</a></li><li><a href="https://mobile.twitter.com/glizzykingdreko">Twitter</a></li><li><a href="/@glizzykingdreko">Medium</a></li><li><a href="mailto:glizzykingdreko@protonmail.com">Email</a></li><li><a href="https://www.buymeacoffee.com/glizzykingdreko">Buy me a coffee ❤️</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=68a23add39e1" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Using iCloud+ subscription as its best]]></title>
            <link>https://medium.com/@glizzykingdreko/using-icloud-subscription-as-its-best-3c88d082888c?source=rss-ab5cacaa6f79------2</link>
            <guid isPermaLink="false">https://medium.com/p/3c88d082888c</guid>
            <category><![CDATA[icloud]]></category>
            <category><![CDATA[apple]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[hide-my-email]]></category>
            <category><![CDATA[generator]]></category>
            <dc:creator><![CDATA[glizzykingdreko]]></dc:creator>
            <pubDate>Tue, 06 Jan 2026 17:18:31 GMT</pubDate>
            <atom:updated>2026-01-06T17:18:31.140Z</atom:updated>
            <content:encoded><![CDATA[<p>The feature I love the most of iCloud+ is the “HideMyEmail”, that creates you an alias during website registrations in order to prevent sharing your real mail.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/830/0*8r4AKeDC0yTyUViE.png" /></figure><p>That’s nice, but you know what would be even better? The possibility of quickly using this feature to generate a list of aliases pointing to my iCloud mail, in order to prevent buying email lists or catchalls during raffles, bulk account creations, or just having fresh throwaway addresses whenever I need them.</p><p>So let’s do it!</p><h3>Other open source solutions</h3><p>This idea was born when I needed to create some aliases quickly and easily. I thought about this HideMyEmail approach, found a couple of projects online, but the main issue with all of them was the login.</p><p>Totally not supported. Had to extract cookies from my browser session in order to make any script work. So basically there’s just some vibe-coded modules around that will reproduce a request for X times with the cookies you provide them.</p><p>And by keeping in mind that iCloud lets you generate around 5 emails each 30/40 minutes… at the end, doing it manually would be even easier than fighting with expired sessions.</p><p>We can do it way better. (spoiler: <a href="https://github.com/glizzykingdreko/icloud-hme">check the github repo of this project</a>)</p><h3>Understanding the process</h3><p>To build something that actually works, I needed to understand what happens when you log into iCloud. So I fired up my browser, opened an HTTP proxy, and recorded the entire session from login to email generation.</p><p>obv Apple doesn’t make this easy. Their authentication uses a custom implementation of the Secure Remote Password (SRP) protocol with some Apple-specific modifications that took me way too long to figure out.</p><p>Let me walk you through it.</p><h4>The Authentication Flow</h4><p><strong>Step 1: SRP Initialization<br></strong>First, we send a request to /appleauth/auth/signin/init with the account name:</p><pre>{<br>  &quot;a&quot;: &quot;&lt;base64_encoded_A_value&gt;&quot;,<br>  &quot;accountName&quot;: &quot;your@icloud.com&quot;,<br>  &quot;protocols&quot;: [&quot;s2k&quot;, &quot;s2k_fo&quot;]<br>}</pre><p>The a value is our SRP public ephemeral value. Apple responds with their own values including:</p><ul><li>b Server&#39;s public ephemeral</li><li>saltFor password derivation</li><li>iterationPBKDF2 iteration count</li><li>protocolWhich variant to use (usually s2k)</li></ul><p><strong>Step 2: The s2k Protocol<br></strong>Here’s where Apple decided to be <em>Apple</em>. Standard SRP computes x = H(s || H(I:p)) where I is the username and p is the password.</p><p>But no, Apple’s s2k protocol does something different:</p><pre>x = H(s || p)</pre><p>Where p isn&#39;t the raw password, but:</p><pre>password_hash = SHA256(password)<br>derived_key = PBKDF2(password_hash, salt, iterations, 32, SHA256)</pre><p>I spent hours debugging “Invalid credentials” errors before finding this. Massive shoutout to the <a href="https://github.com/mandarons/icloudpy">icloudpy</a> project for helping me validate the logic, their implementation saved my time.</p><p><strong>Step 3: Complete Authentication</strong></p><p>With the correct SRP proof calculated, we send it to /appleauth/auth/signin/complete:</p><pre>{<br>  &quot;accountName&quot;: &quot;your@icloud.com&quot;, <br>  &quot;m1&quot;: &quot;&lt;base64_srp_proof&gt;&quot;,<br>  &quot;m2&quot;: &quot;&lt;base64_server_proof&gt;&quot;,<br>  &quot;rememberMe&quot;: true<br>}</pre><p><strong>Step 4: Two-Factor Authentication</strong></p><p>If 2FA is enabled (and honestly, it should be on every account), Apple returns a 409 status asking for verification. You&#39;ll get a code on your trusted devices — iPhone, iPad, Mac, whatever you have.</p><p>We send that code to /appleauth/auth/verify/trusteddevice/securitycode:</p><pre>{<br>  &quot;securityCode&quot;: {<br>    &quot;code&quot;: &quot;123456&quot;<br>  }<br>}</pre><p>Then we trust the session via /appleauth/auth/2sv/trust so we don&#39;t have to go through 2FA every single time.</p><p><strong>Step 5: Account Login</strong></p><p>Finally, we hit /setup/ws/1/accountLogin to get the full session with all the webservice URLs we need, including the HideMyEmail endpoint we&#39;re after.</p><p>At this point, we have a fully authenticated session. The hard part is done!</p><h3>The HideMyEmail API</h3><p>Now for the fun part. Once authenticated, interacting with HideMyEmail is surprisingly straightforward compared to the authentication nightmare we just went through. (for this reason probably all the open source projects just had this part)</p><h4>Generating an Email</h4><pre>POST /v1/hme/reserve<br>{<br>  &quot;hme&quot;: &quot;punk_51_estofamos@icloud.com&quot;,<br>  &quot;label&quot;: &quot;My Shopping Account&quot;,<br>  &quot;note&quot;: &quot;Used for online shopping&quot;<br>}</pre><p>Once reserved, the email is permanently linked to your account and will forward messages to your inbox forever (or until you delete it).</p><h4>Listing All Emails</h4><pre>GET /v2/hme/list</pre><p>Returns all your HideMyEmail addresses with metadata like creation date, label, and whether it’s active. Useful for exporting everything you’ve created.</p><h3>Rate Limits</h3><p>Of course, Apple wouldn’t let us go wild. Here’s what I discovered through… extensive testing:</p><ul><li>Per 30 minutes: ~5 emails × family members</li><li>Total per account: ~700 emails</li></ul><p>The “family members” multiplier is interesting — if you have Apple Family Sharing with 5 people, you theoretically get roughly 25 emails per 30 minutes. Not bad for a feature Apple probably didn’t intend to be used this way.</p><p>When you hit the limit, Apple returns:</p><pre>{<br>  &quot;success&quot;: false,<br>  &quot;error&quot;: {<br>    &quot;errorMessage&quot;: &quot;You have reached the limit...&quot;,<br>    ...<br>  }<br>}</pre><h3>Building the CLI</h3><p>With all this knowledge, I built icloud-hme — a proper CLI tool that handles everything:</p><ul><li>Real SRP Authentication — No more cookie copying nightmares</li><li>2FA Support — Works with your trusted devices</li><li>Multi-Account — Switch between multiple iCloud accounts</li><li>Beautiful Output — Powered by Rich, because why should CLIs be ugly?</li><li>Export — CSV or JSON with filtering options</li></ul><h3>See it in Action</h3><p>First, authenticate with your iCloud account:</p><pre>$ icloud-hme auth<br><br>◆ iCloud HME ─────────────────────────────────────────────────────<br><br>  ? iCloud email: your@icloud.com<br>  ? Password: ********<br><br>  ● Two-factor authentication required<br>  ? Enter 6-digit code: 123456<br><br>  ✓ Authenticated as Your Name</pre><p>Then generate as many emails as you want:</p><pre>$ icloud-hme generate -n 5<br><br>  Generating 5 email(s) • PERMANENT<br><br>  ──────────────────────────────────────────────────────────────────<br><br>  ✓ punk_51_estofamos@icloud.com<br>  ✓ bicep_angora.32@icloud.com<br>  ✓ extinct.daze_7p@icloud.com<br>  ✓ minimos_orzo.06@icloud.com<br>  ✓ flak-din-1q@icloud.com<br><br>  ──────────────────────────────────────────────────────────────────<br><br>  ✓ Generated 5/5 permanent email(s)</pre><p>Need to export everything? Easy:</p><pre>$ icloud-hme export --format csv<br><br>  ✓ Found 29 emails to export<br>  ? Save to (without extension): my_emails<br><br>  ✓ Exported to my_emails.csv</pre><p>You can install the module via</p><pre>pip install icloud-hme</pre><p>or via the source code, <a href="https://github.com/glizzykingdreko/icloud-hme">be sure to check the github repo</a></p><h3>Connect with me</h3><p>If you enjoyed this article, follow me on GitHub and on Medium to receive notifications whenever I post or open-source something.</p><ul><li><a href="https://github.com/glizzykingdreko">GitHub</a></li><li><a href="https://mobile.twitter.com/glizzykingdreko">Twitter</a></li><li><a href="/@glizzykingdreko">Medium</a></li><li><a href="mailto:glizzykingdreko@protonmail.com">Email</a></li><li><a href="https://www.buymeacoffee.com/glizzykingdreko">Buy me a coffee ❤️</a></li><li><a href="https://takionapi.tech">Start bypassing Datadome</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3c88d082888c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Breaking Down Datadome Captcha WAF]]></title>
            <link>https://medium.com/@glizzykingdreko/breaking-down-datadome-captcha-waf-d7b68cef3e21?source=rss-ab5cacaa6f79------2</link>
            <guid isPermaLink="false">https://medium.com/p/d7b68cef3e21</guid>
            <category><![CDATA[encryption]]></category>
            <category><![CDATA[web-scraping]]></category>
            <category><![CDATA[datadome]]></category>
            <category><![CDATA[takion-api]]></category>
            <category><![CDATA[bypass]]></category>
            <dc:creator><![CDATA[glizzykingdreko]]></dc:creator>
            <pubDate>Mon, 26 May 2025 20:28:33 GMT</pubDate>
            <atom:updated>2025-05-26T21:10:08.937Z</atom:updated>
            <content:encoded><![CDATA[<p>Let’s walk through, step by step, the latest Datadome Captcha/Geetest WAF to understand how to access sites protected by it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*eWHGliBaPYQsZVB7mKe81Q.png" /></figure><h3>You have been blocked!</h3><p>Below is the response you’ll see when a request is blocked by the Datadome Captcha WAF while scraping a protected site:</p><pre>&lt;html lang=&quot;en&quot;&gt;<br>  &lt;head&gt;<br>    &lt;title&gt;datadome.co&lt;/title&gt;<br>    &lt;style&gt;<br>      ...<br>    &lt;/style&gt;<br>  &lt;/head&gt;<br>  &lt;body style=&quot;margin:0&quot;&gt;<br>    &lt;p id=&quot;cmsg&quot;&gt;Please enable JS and disable any ad blocker&lt;/p&gt;<br>    &lt;script data-cfasync=&quot;false&quot;&gt;<br>      var dd = {<br>        &#39;rt&#39;: &#39;c&#39;,<br>        &#39;cid&#39;: &#39;AHrlqAAAAAMAseGpalIFikoAyV2i2w==&#39;,<br>        &#39;hsh&#39;: &#39;14D062F60A4BDE8CE8647DFC720349&#39;,<br>        &#39;t&#39;: &#39;fe&#39;,<br>        &#39;qp&#39;: &#39;&#39;,<br>        &#39;s&#39;: 44330,<br>        &#39;e&#39;: &#39;a1dea4f437d7f7234cf4ab0017373492e7438d099a0632bc3dd4ac787bf0ffa3&#39;,<br>        &#39;host&#39;: &#39;geo.captcha-delivery.com&#39;,<br>        &#39;cookie&#39;: &#39;Y1XRfldQv9mO1z2TBDqSmbztAi_H6BR04bz14NTujEm~6G_7X6eHyn9i71KhHxsv86WUIZGokIBSyX9bulEARTINIkeWdhjKGUu4Rm7pkbnPpTfSwfC4ntcQPF6rcA5z&#39;<br>      }<br>    &lt;/script&gt;<br>    &lt;script data-cfasync=&quot;false&quot; src=&quot;https://ct.captcha-delivery.com/c.js&quot;&gt;&lt;/script&gt;<br>  &lt;/body&gt;<br>&lt;/html&gt;</pre><p>Using the returned dm dictionary, the linked JavaScript generates the actual challenge URL and injects it as an iframe on the page. Once the iframe is embedded, you’ll either encounter the captcha to solve or a “You have been blocked” message. This means one of two things:</p><ul><li>Your IP address is flagged as bad.</li><li>Your request flow or headers deviate from a normal browser flow, triggering Datadome’s bot detection.</li></ul><p>To avoid this, always test your proxies in a real browser first, to confirm they can solve the challenge and navigate the site, and mirror the exact request sequence and headers from that browser session in your script.</p><h4>The request</h4><p>After solving the challenge, the following GET request is sent:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3FD9f4H7Dsg46eAb1Z7PNg.png" /></figure><p>Upon successful solving, a Datadome cookie is returned. Most of the values in this request are simply parsed from the page. The only important element is the ddCaptchaEncodedPayload, which we will examine and break down later in this article. It is essentially a dictionary containing various details, referred to as <strong>signals</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*evUKQh8aiXDbsfel4PZF3A.png" /></figure><h3>How Datadome promotes itself</h3><blockquote>“It’s not just about human or bot — it’s about intent. Our AI detects malicious vs. legitimate intent in real time, whether it is from a bot or a human.”</blockquote><p>Their company calls itself “the leader in cyberfraud protection” and boasts blocking “billions” of attacks by processing over a trillion signals per day across 25+ global points of presence. It focuses on its high-speed AI engine: for example, an April 2025 release claims it can “identify, categorize, adapt, and respond to traffic in less than 2 milliseconds.”</p><blockquote>“Most bot detection tools rely on static, rule-based logic that can’t keep pace with emerging threats. DataDome’s AI engine is different. It continuously learns and adapts in real time using both supervised and unsupervised models, …”</blockquote><p>Marketing collateral often contrasts this with legacy defenses; blogs claim rule-based WAFs are “antiquated” and “no match for advanced bots.”<br>In one blog, DataDome even calls itself “the only bot and online fraud protection solution delivered as a service.”</p><p>Their CEO claims the machine-learning engine “assesses every request” instead of relying on static rules (Source: s<a href="https://techcrunch.com/2023/03/30/datadome-raises-42m-series-c-bot-detection/#:~:text=Fabre%20founded%20DataDome%20in%202015,website%2C%20mobile%20app%20or%20API">techcrunch.com</a>). <br>They also assert they prevent content theft, account takeovers, ad fraud, and DDoS “in real time.”</p><p>Before we begin our deep analysis, let’s keep in mind that this company <strong>has been funded with a total of $81 million</strong>.</p><h3>History of the challenge</h3><p>This WAF page was first introduced <strong>around five years ago</strong> during the “golden age of sneaker games.” When it appeared on sites like Slamjam and Starcow, the only way to solve it was via reCAPTCHA.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1012/1*fyQWQBbdRRHksT7gcgHQ7g.jpeg" /></figure><p>It was later replaced with a Geetest implementation, and then with a custom Geetest-style slide captcha or an audio challenge. <br>The audio option has never been ideal, as cookies obtained that way often receive a lower trust score, triggering a second challenge or a quick block.</p><h3>Use cases</h3><p>Currently, Datadome is still used by some retailers, most of the European football teams’ purchasing websites, and some credit-card gift-card websites. Here are some examples:</p><ul><li><a href="https://tickets.rolandgarros.com/fr">https://tickets.rolandgarros.com/</a></li><li><a href="https://www.pokemoncenter.com/">https://www.pokemoncenter.com/</a></li><li><a href="https://www.liverpoolfc.com/tickets">https://www.liverpoolfc.com/tickets</a></li><li><a href="https://mygift.giftcardmall.com/">https://mygift.giftcardmall.com/</a></li><li><a href="https://www.giftcards.com/">https://www.giftcards.com/</a></li><li><a href="https://www.uefa.com/euro2024/ticketing/">https://www.uefa.com/</a></li><li><a href="https://www.arsenal.com/tickets">https://www.arsenal.com/</a></li><li><a href="https://www.google.com/url?sa=t&amp;source=web&amp;rct=j&amp;opi=89978449&amp;url=https://www.vinted.com/%3Fsrsltid%3DAfmBOopz7WemYuVya8Tq0Wng2arWNrTxIQcGSU_BnMOGv7oZrsMRFQJM&amp;ved=2ahUKEwiLgceQ57eNAxWQErkGHR1mITYQFnoECAoQAQ&amp;usg=AOvVaw2r6rH4dKGuWLjYexz_tixW">https://www.vinted.com</a>/</li><li><a href="https://www.thefork.com/">https://www.thefork.com/</a></li><li><a href="https://www.etsy.com/">https://www.etsy.com/</a></li><li><a href="https://www.soundcloud.com/">https://www.soundcloud.com/</a></li><li><a href="https://www.seatgeek.com/">https://www.seatgeek.com/</a> (and all websites under it)</li></ul><p><em>And the list goes on…</em></p><h3>Javascript obfuscation</h3><p>nside the iframe page, you’ll find a long, minified line containing the captcha’s actual JavaScript.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*u7lbxbZNmksbaId_dkqSSg.png" /></figure><p>When beautified, this file reveals a fairly simple obfuscation built on array- and function-based techniques.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TMZxS1TmBEwCkFlK0-s6BQ.png" /></figure><p>It’s quite lengthy because it actually consists of eight distinct modules/files, as shown in the attached image.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sp7sYcsYuO-bKUmnpxZ0xQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/610/1*DBqc874I-pC3xRW-gEqQFg.png" /></figure><p>Each file serves a specific, organized purpose and contains its own set of functions.</p><h4>Loop-Switch Constructs Obfuscation</h4><p>One noteworthy aspect is the unique way they “obfuscate” for-loops and switch statements. It’s entirely pointless and trivial to reverse, but I hadn’t seen this technique before.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fIy112T22zlbe7qCjzEOmg.png" /></figure><p><strong>What it does</strong> <br>Instead of writing:</p><pre>case 23</pre><p>the code builds a two-dimensional lookup table s and drives the switch state via s[x][y], so every case looks like:</p><pre>case s[263][471]:</pre><p>Where the table generation function looks like this:</p><pre><br>// dynamic table function generation<br>var s = function (e, t) {<br>  var a, n;<br>  for (t = [], e = 0; e &lt; 128; e++) t[e] = new Array(512);<br>  for (a = 0; a &lt; 512; a++) for (n = 0; n &lt; 128; n++) t[n][a] = t[Ze(128, a, 337, 163, 349, 30, n)];<br>  return t[30];<br>}();<br><br>// and his helper<br>function Ze(e, t, a, n, c, i, r) {<br>  return (t * c ^ r * n ^ i * a) &gt;&gt;&gt; 0 &amp; e - 1;<br>}</pre><p><strong>Inspecting the table at runtime<br></strong>If you log s[yyy][zzz] in your browser console, you won’t get a number, you’ll see an Array object (one row of that lookup matrix).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/954/1*dwqXRC18OKmLPwo2ZgBAtw.png" /></figure><p><strong>Why it’s a dumb obfuscation<br></strong>By running the same table-generator and mapping functions in a sandbox (for example, Node’s vm), you can reconstruct the entire lookup table, defeating the obfuscation.</p><pre>// 1. Spin up a sandbox and rebuild the exact same table<br>const vm = require(&#39;vm&#39;);<br>const context = vm.createContext({});<br><br>vm.runInContext(`<br>  // dynamic table generation and his helper<br>`, context);<br><br>// 2. Build a reverse map from each row object back to its [x,y] indices<br>const s = context.s;<br>const rowMap = new Map();<br>s.forEach((row, x) =&gt; {<br>  row.forEach((cell, y) =&gt; {<br>    // we key off the *exact* Array instance stored at s[x][y]<br>    rowMap.set(cell, [x, y]);<br>  });<br>});<br><br>// 3. Helper to recover the original numeric state<br>function stateLocation(x, y) {<br>  return rowMap.get(s[x][y]);<br>}<br><br>// 4. Proof it works:<br>console.log(stateLocation(263, 471)); // e.g. 42</pre><p><strong>Cleaning it up<br></strong>A simple AST traversal based on this logic can replace each case s[x][y] with the original numeric literal, restoring a normal switch statement.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Fou00fn_Cp03IgN6TOcriw.png" /></figure><p>Quick and easy, but a nice case study.</p><h3>Dynamicity of the script</h3><p>It’s pretty strange that a company founded with more than $80 million in funding still <strong>hasn’t introduced a fully dynamic script for each session</strong>, like most of the “big” antibot providers currently do.</p><p>Instead, what they’ve done is implement a daily rotation of the files, meaning the iframe’s script changes every day at a specific time.</p><p>This rotation was introduced about one year ago, unless there’s been a major update or patch, the version number remains the same, with only a couple of static IDs modified to identify the exact challenge being solved.</p><h4>Dynamic signals names</h4><p>A few months ago, a major change was introduced — first on the Captcha challenge, then on the interstitial as well: dynamic keys for the signals. Every day, the keys in the signals dictionary change to a random six-character string. If you don’t match them correctly, the solving will be invalid.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cGM3MC1o13CqeI2thLlSlg.png" /><figcaption>new dynamic key system</figcaption></figure><p>This has been a clever technique to block most solving API providers, but <strong>someone could have stored all</strong> of the daily <strong>scripts</strong> “just to be sure” over the past five years. They <strong>could then perform </strong>a <strong>quick semantic search</strong> to identify renamed signals, new or removed entries, or other modifications. :P</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/482/1*6fBfzxwy7Zr1_3QEtu_eIw.png" /><figcaption>some Datadome files stored</figcaption></figure><p>Currently, this dynamic-key mechanism has knocked most providers out of the game or forced them to switch to <strong>browser-based solutions</strong>, which in my opinion are <strong>the worst way</strong> to deliver a service due to:</p><ul><li>Slow solving times and heavy resource usage</li><li>Lock-in to specific user agents, browsers, OS versions, timestamps, or fingerprints, forcing clients to match exactly</li><li>Developers often having no clue what the antibot checks, making debugging or fixing site-specific issues difficult</li><li>The need for new browser patches on every challenge update, resulting in instability for long-term or critical projects</li></ul><p>All of this stems from not having figured out a scalable way to scrape and identify signal names on a daily basis.</p><h4>WASM Challenge: boring_challenge</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1JFotP5X-C5j_uWF6Zt0fw.png" /><figcaption>extracted call of the “boring_challenge” from original script</figcaption></figure><p>Recently, a <strong>WASM-based challenge</strong> was introduced as part of one of the signals. The main function, called <strong>boring_challenge</strong>, essentially forces your browser to run a <strong>tiny Rust-compiled state machine</strong> repeatedly until it spits out a number.</p><ol><li>Base64-decode a compact Wasm blob and synchronously compile it into a WebAssembly.Module.</li><li>Set up the wasm-bindgen imports (grow an externref table with [undefined, null, true, false]).</li><li>Instantiate the module (which zeroes some globals via its __wbindgen_start).</li><li>Pick a random 32-bit seed (between 10 million and 20 million) and a concurrency hint (your CPU core count).</li><li>Call boring_challenge(BigInt(seed), BigInt(concurrency)), which jumps into a massive, nested loop of bit-twiddling, XORs, shifts, rotates and magic constants—all hard-coded in an obfuscated lookup-table state machine.</li><li>Exit only when that state machine finally reaches a terminal value, returning a 64-bit result that your script converts back to a Number.</li></ol><p>There’s <strong>no real “captcha”</strong> here, just pure proof-of-work. The server can cheaply re-invoke the same function on its side to verify you did the grind, but your browser must burn CPU cycles to solve it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VdKWnvedKIJ0rt-vMDmvHA.png" /><figcaption>decompiled .wat file</figcaption></figure><p>It’s trivial to reverse (we just decompile and run it ourselves). It is basically more a <strong>is more of a “CPU tax”</strong> than a real fingerprint, maybe introduced to create problems ot headless browser (I assume ?).</p><p>You can learn more about it here into my open-sourced repo</p><p><a href="https://github.com/glizzykingdreko/datadome-wasm">datadome-wasm</a></p><h4>Dynamic hash challenge</h4><p>After the WASM introduction, <strong>the latest “feature”</strong> introduced is a<strong> dynamic hash challenge</strong>, where some browser details, already provided in other signals, are assembled into a list and then hashed using a specific dynamic challenge hash.</p><p>The resulting list then feeds into a dynamic chain of operations that looks like this:</p><pre>((((((inputValue[0] &gt;&gt;&gt; 0 ^ 555683) &gt;&gt;&gt; 0 &gt;&gt; 4 &gt;&gt;&gt; 0)<br>  + (((956305 &amp; inputValue[1] &gt;&gt;&gt; 0) &gt;&gt;&gt; 0 &amp; (inputValue[2] &gt;&gt;&gt; 0)<br>     + (inputValue[1] &gt;&gt;&gt; 0) &gt;&gt;&gt; 0) &gt;&gt;&gt; 0) &gt;&gt;&gt; 0)<br>  + ((2488139776 ^ (inputValue[1] &gt;&gt;&gt; 0 &lt;&lt; 1 &gt;&gt;&gt; 0)<br>     + (inputValue[0] &gt;&gt;&gt; 0 &gt;&gt; 6 &gt;&gt;&gt; 0) &gt;&gt;&gt; 0) &gt;&gt;&gt; 0) &gt;&gt;&gt; 0<br>  ^ (((699654 + (inputValue[0] &gt;&gt;&gt; 0) &gt;&gt;&gt; 0) - 1111820 &gt;&gt;&gt; 0)<br>     - ((968080 - (inputValue[0] &gt;&gt;&gt; 0) &gt;&gt;&gt; 0 ^ 864233) &gt;&gt;&gt; 0) &gt;&gt;&gt; 0)<br>  - ((((792526 &amp; inputValue[2] &gt;&gt;&gt; 0) &gt;&gt;&gt; 0<br>       | (298058 &amp; inputValue[1] &gt;&gt;&gt; 0) &gt;&gt;&gt; 0) &gt;&gt;&gt; 0)<br>     - (((inputValue[1] &gt;&gt;&gt; 0) + (inputValue[1] &gt;&gt;&gt; 0) &gt;&gt;&gt; 0<br>        ^ 622410 - (inputValue[1] &gt;&gt;&gt; 0) &gt;&gt;&gt; 0) &gt;&gt;&gt; 0) &gt;&gt;&gt; 0) &gt;&gt;&gt; 0) &gt;&gt;&gt; 0<br>  &amp; ((11187856 + (410903 + (inputValue[1] &gt;&gt;&gt; 0) &gt;&gt;&gt; 0) &gt;&gt;&gt; 0)<br>     + (((inputValue[0] &gt;&gt;&gt; 0 | 0) &gt;&gt;&gt; 0 ^ 706164<br>        - (inputValue[1] &gt;&gt;&gt; 0) &gt;&gt;&gt; 0) &gt;&gt;&gt; 0) &gt;&gt;&gt; 0 &lt;&lt; 9 &gt;&gt;&gt; 0)<br>  - (((441672 - (inputValue[2] &gt;&gt;&gt; 0) &gt;&gt;&gt; 0)<br>     + ((inputValue[0] &gt;&gt;&gt; 0) - (inputValue[2] &gt;&gt;&gt; 0) &gt;&gt;&gt; 0) &gt;&gt;&gt; 0)<br>     + (((inputValue[1] &gt;&gt;&gt; 0) - 617963 &gt;&gt;&gt; 0)<br>        + ((inputValue[2] &gt;&gt;&gt; 0) - 798365 &gt;&gt;&gt; 0) &gt;&gt;&gt; 0) &gt;&gt;&gt; 0 &gt;&gt; 8 &gt;&gt;&gt; 0) &gt;&gt;&gt; 0) &gt;&gt;&gt; 0<br>  ^ 351641146) &gt;&gt;&gt; 0</pre><p>It’s an interesting approach, but unfortunately it’s quite easy to identify and extract, and because it relies solely on math-based calculations, a simple evaluation suffices.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YAzbzdX49G70NinAeRtQAQ.png" /><figcaption>extracted dynamic challenges from different files using a simple babel traverse</figcaption></figure><h4>Integrity checks of the script</h4><p>To this day, no integrity checks have been added, making it easy to patch for debugging purposes.</p><h4>Understanding more about the versions changes</h4><p>For learning purposes, check out my now-outdated, open-sourced deobfuscation modules for DataDome (both Interstitial and Captcha):</p><ul><li><a href="https://github.com/glizzykingdreko/Datadome-Deobfuscator">Datadome-Deobfuscator</a> (Oct 2023)</li><li><a href="https://github.com/glizzykingdreko/Datadome-Interstitial-Deobfuscator">Datadome-Interstitial-Deobfuscator</a> (Jan 2024)</li><li><a href="https://github.com/glizzykingdreko/Datadome-Captcha-Deobfuscator">Datadome-Captcha-Deobfuscator</a> (Jan 2024)</li></ul><h3>Image solving</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/768/1*aGnw4Fumrimf1T_LvkpBEw.png" /><figcaption>displayed challenge captcha</figcaption></figure><p>The images returned by the Datadome Captcha are quite easy and quick to solve using just a few filters and mathematical operations. I’ve already open-sourced a still-working base Python script to get started here: <a href="https://github.com/glizzykingdreko/Datadome-GeeTest-Captcha-Solver">Datadome-GeeTest-Captcha-Solver</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/280/1*wSNzPXc1SV-14lQt3U8ssg.png" /><figcaption>solved challenge captcha</figcaption></figure><h4>Movements computation</h4><p>The actual key challenge is ensuring the provided movements match what DataDome expects. <br>DataDome analyzes movements in two lists</p><ul><li><strong>_initialCoordsList</strong> which captures movements from page load to the slide-button click</li><li><strong>_coordsList</strong> which contains the slide movements</li></ul><p>These two lists are then <strong>computed into 31 signals</strong>, based on curvature, length, straightness, and other metrics, to flag abnormal inputs.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/696/1*t8H9e2K8xSCgHtpj5zOHtg.png" /><figcaption>some computed movements signals</figcaption></figure><p>Honestly, <strong>their checks are strict and effective</strong> at stopping most browser-based automated scripts, <strong>though a good ML model</strong> fed with plenty of data can <strong>still do the trick</strong> :P.</p><p>To help with this part of the process, I open-sourced <a href="https://github.com/glizzykingdreko/Datadome-Movements-Display">Datadome-Movements-Display</a> which visualizes the raw movement lists before computation, letting you compare your generated patterns against genuine browser data.</p><h3>Signals encryption: ddCaptchaEncodedPayload</h3><p>When adding a signal to the final payload, a custom encoding method is used based on the website hash.</p><pre>e(`THcQWT`, i.left)<br>e(`ds6frg`, i.right)<br>e(`zzUlTA`, i.up)<br>e(`uJkDwZ`, i.down);</pre><h3>Encryption Process Overview</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qTCy1fIeOfeZo8UG_40fsQ.jpeg" /><figcaption>encryption process</figcaption></figure><p><strong>Initialization<br></strong>The system is seeded with a hash, a client identifier (cid), and an optional salt. These parameters initialize a pseudo-random number generator (PRNG) that drives subsequent steps.</p><p><strong>Buffer Construction<br></strong>Each signal (key-value pair) is obfuscated and XOR-ed with PRNG-generated bytes. Marker bytes ({, }) and separators (:) are also XOR-obfuscated and appended to delineate structure.</p><p><strong>XOR w/PNRG 2nd Round<br></strong>The entire buffer undergoes an additional XOR pass using a second PRNG sequence derived from the cid and salt. This dual-layer approach ensures each byte’s final value depends intricately on multiple dynamic parameters.</p><p><strong>Custom Base64-like Encoding<br></strong>After XOR, the buffer is encoded into a string using a custom Base64-like algorithm. Additional XOR operations with a decrementing salt value are applied. A unique character mapping guarantees URL-safe transmission, further complicating decryption.</p><p>The decryption process simply reverses these steps once you understand them.</p><p>Without going too deep into technical detail, so as not to lose uninterested readers, I’ve open-sourced a deep dive into the encryption and decryption logic here, both for NodeJS and Python:</p><ul><li><a href="https://github.com/glizzykingdreko/datadome-encryption">datadome-encryption</a></li><li><a href="https://github.com/glizzykingdreko/datadome-encryption-python">datadome-encryption-python</a></li></ul><h3>So how could be Datadome actually solved?</h3><p>Let’s walk through the process step by step. I’ll assume you’re using a requests-based approach, because a browser-based solution requires constant patching for each update, high resource usage, and offers little control over what’s happening.</p><ol><li><strong>Identify and construct the challenge URL</strong> from the initial response.</li><li><strong>Load the challenge page.</strong></li><li><strong>Parse the required details</strong> from the loaded challenge.</li><li><strong>Extract, sort, and interpret the dynamic keys.</strong></li><li><strong>Solve the image challenge.</strong></li><li><strong>Assemble your </strong><strong>signals dictionary</strong>, browser details, solved challenges, and computed movements.</li><li><strong>Encrypt the payload.</strong></li><li><strong>Send it to the DataDome endpoint.</strong></li><li><strong>Retrieve the cookie</strong> (if the solving was successful).</li><li><strong>Reload the target page.</strong></li></ol><h3>Conclusion</h3><p>In conclusion, this was just a case study. I’m not saying that DataDome is a bad antibot, some of their techniques are unique and interesting, even if they’re easy to bypass, but rather highlighting how easy and “cheap” their WAF is, and raising questions about <strong>how the millions they’ve received from investors have been spent</strong>.</p><p>Perhaps they should remove the article <a href="https://datadome.co/bot-management-protection/how-to-bypass-datadome/">How to Bypass DataDome (And Why It’s Not That Simple)</a></p><h3>Need DataDome Bypass Solutions?</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Q6vPYRHwTd4JyErDtwoRDA.jpeg" /></figure><p>If you need a reliable DataDome bypass solution for your project, turn to the experts who truly understand the technology. My company, <strong>TakionAPI</strong>, offers professional anti-bot bypass APIs with proven effectiveness against DataDome and other bot-defense systems.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2Fp6HlpCczORc%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3Dp6HlpCczORc&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2Fp6HlpCczORc%2Fhqdefault.jpg&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/9103b79c2a55ce7b50865babfda445d2/href">https://medium.com/media/9103b79c2a55ce7b50865babfda445d2/href</a></iframe><p>You can check and run the example file from the video <a href="https://docs.takionapi.tech/datadome/examples">here</a>.</p><p>No more worrying about understanding, reversing, and solving the challenge yourself, or about keeping it up to date every day. One simple API call does it all.</p><p>We provide free trials, example implementations, and setup assistance to make the entire process easy and smooth. Check our straightforward <a href="https://docs.takionapi.tech">documentation here</a>, start <a href="https://dashboard.takionapi.tech">your trial here</a>, or for custom development and support, contact us <a href="https://takionapi.tech/discord">on Discord</a>.</p><p>Visit TakionAPI.tech for real, high-quality anti-bot bypass solutions, we know what we’re doing.</p><h3>Connect with me</h3><p>If you enjoyed this article, follow me on GitHub and on Medium to receive notifications whenever I post or open-source something.</p><ul><li><a href="https://github.com/glizzykingdreko">GitHub</a></li><li><a href="https://mobile.twitter.com/glizzykingdreko">Twitter</a></li><li><a href="https://medium.com/@glizzykingdreko">Medium</a></li><li><a href="mailto:glizzykingdreko@protonmail.com">Email</a></li><li><a href="https://www.buymeacoffee.com/glizzykingdreko">Buy me a coffee ❤️</a></li><li><a href="https://takionapi.tech">Start bypassing Datadome</a></li></ul><h3>Sources</h3><ul><li><a href="https://techcrunch.com/2023/03/30/datadome-raises-42m-series-c-bot-detection/#:~:text=Fabre%20founded%20DataDome%20in%202015,website,%20mobile%20app%20or%20API">TechCrunch</a></li><li><a href="https://datadome.co">Datadome website</a></li><li><a href="https://datadome.co/bot-management-protection/how-to-bypass-datadome/">How to Bypass DataDome (And Why It’s Not That Simple)</a> <em>— Datadome propaganda</em></li><li><a href="https://github.com/glizzykingdreko/datadome-wasm">datadome-wasm</a></li><li><a href="https://github.com/glizzykingdreko/datadome-encryption">datadome-encryption</a></li><li><a href="https://github.com/glizzykingdreko/datadome-encryption-python">datadome-encryption-python</a></li><li><a href="https://github.com/glizzykingdreko/Datadome-GeeTest-Captcha-Solver">Datadome-GeeTest-Captcha-Solver</a></li><li><a href="https://github.com/glizzykingdreko/Datadome-Movements-Display">Datadome-Movements-Display</a></li><li><a href="https://takionapi.tech">TakionAPI</a></li><li><a href="https://docs.takionapi.tech">TakionAPI DOCS</a></li><li><a href="https://github.com/glizzykingdreko/Datadome-Deobfuscator">Datadome-Deobfuscator</a> <em>(Oct 2023 — outdated)</em></li><li><a href="https://github.com/glizzykingdreko/Datadome-Interstitial-Deobfuscator">Datadome-Interstitial-Deobfuscator</a> <em>(Jan 2024 — outdated)</em></li><li><a href="https://github.com/glizzykingdreko/Datadome-Captcha-Deobfuscator">Datadome-Captcha-Deobfuscator</a><em> (Jan 2024 — outdated)</em></li><li><a href="https://github.com/glizzykingdreko/Datadome-Interstital-Encryptor">Datadome-Interstital-Encryptor</a> <em>(outdated)</em></li><li><a href="https://medium.com/@campo1312/how-to-detect-block-and-manage-datadome-c6e94c74a4f4">How to detect, block and manage DataDome</a> <em>(outdated)</em></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d7b68cef3e21" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How I Track Support Tickets with a Simple Channel Marker Bot]]></title>
            <link>https://medium.com/@glizzykingdreko/how-i-track-support-tickets-with-a-simple-channel-marker-bot-8a92b41f54c1?source=rss-ab5cacaa6f79------2</link>
            <guid isPermaLink="false">https://medium.com/p/8a92b41f54c1</guid>
            <category><![CDATA[to-do-list]]></category>
            <category><![CDATA[open-source]]></category>
            <category><![CDATA[management]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[discord-bot]]></category>
            <dc:creator><![CDATA[glizzykingdreko]]></dc:creator>
            <pubDate>Wed, 16 Apr 2025 11:47:31 GMT</pubDate>
            <atom:updated>2025-04-16T11:49:47.905Z</atom:updated>
            <content:encoded><![CDATA[<p>Managing support tickets in Discord gets messy fast. Threads pile up, people don’t respond, and some channels sit idle even though they still need attention. I needed a quick way to visually mark tickets so I wouldn’t forget about them, no databases, no Trello boards, no third-party dashboards.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Z3DlHilZ0Rh0yg8s7FJTJw.png" /></figure><p>That’s why I built <strong>Discord To Do Bot, </strong>a small utility that toggles an emoji in a channel’s name using a slash command. It does one thing, and it does it reliably.</p><h3>Why I Built It</h3><p>I run a support server where tickets are created as separate channels. The problem: once I’ve replied to a few, I forget which ones I still need to revisit. I needed a visual system that tells me, at a glance, which tickets are pending and which ones are handled, without digging through chat logs or using pinned messages.</p><p>My first instinct was to edit the channel name manually, adding a symbol like 🟣 to the front. That worked, but it was tedious. And repetitive. So I automated it.</p><h3>What the Bot Does</h3><p>The bot responds to a simple slash command: /mark.<br>When I run it, it checks if the emoji is already in the channel name:</p><ul><li>If it is → it removes it</li><li>If it’s not → it adds it in front</li></ul><p>Now when I scroll through the ticket list, any channel starting with the marker means <em>“come back to this.”</em> No replies, no notes — just a name.</p><p>There are also other commands:</p><ul><li>/setemoji to change the marker (admin only)</li><li>/markinfo to check config and permissions</li><li>/checkmark to see if a channel is still under cooldown</li></ul><h3>Handling Rate Limits (Because Discord Isn’t Forgiving)</h3><p>Discord lets you rename a channel <strong>twice every 10 minutes</strong>. Exceed that and you’ll hit a 429 error. Most bots ignore this and get rate-limited.</p><p>This one tracks each rename per channel in memory and blocks edits until the cooldown resets. It gives you a clear message and tells you exactly how many seconds you need to wait. The /checkmark command also gives you visibility into this without guessing.</p><h3>Setup (Takes 2 Minutes)</h3><p>Clone the repo and set it up like any basic Python bot:</p><pre>git clone https://github.com/glizzykingdreko/discord-to-do-bot<br>cd discord-to-do-bot<br>pip install -r requirements.txt<br>cp .env.example .env<br># edit your token and config<br>python bot.py</pre><p>You’ll need to enable <em>Message Content Intent</em> in your Discord Developer Portal and invite the bot with Manage Channelspermission.</p><h3>Use Case: Support Workflow</h3><p>Let’s say a ticket is created: ticket-12345.</p><p>If I know I need to follow up later, I run:</p><pre>/mark</pre><p>The channel becomes:</p><pre>🟣-ticket-12345</pre><p>Once it’s resolved, I run the command again and it’s back to normal.</p><p>This flow makes it impossible to lose track of pending tickets.</p><h3>Other Use Cases</h3><p>Even though I built this for support management, the logic applies anywhere:</p><ul><li>Project channels waiting for review</li><li>Event prep channels</li><li>Moderation queues</li><li>Temporary threads needing cleanup</li></ul><p>The prefix gives context without creating noise. You just rename the channel — that’s it.</p><h3>Conclusion</h3><p>I didn’t want a full task system. I just wanted something fast and reliable that wouldn’t break under Discord’s rate limits.</p><p><strong>Discord To Do Bot</strong> is now a small part of how I manage support, but it saves me a lot of time and mental overhead.</p><p>The source is here if you want to use or extend it:<br>→ <a href="https://github.com/glizzykingdreko/discord-to-do-bot">github.com/glizzykingdreko/discord-to-do-bot</a></p><p>You’ll know exactly which threads are still waiting , even if you didn’t reply yet. The README.md of the repo also provide you more infos.</p><h3>Follow &amp; Contact Me</h3><p>If you enjoyed this article or need custom help with hCaptcha solving, feel free to follow me on:</p><ul><li><strong>GitHub</strong>: <a href="https://github.com/glizzykingdreko">glizzykingdreko</a></li><li><strong>Medium</strong>: <a href="/@glizzykingdreko">glizzykingdreko</a></li></ul><p>Or reach out directly:</p><ul><li><strong>Discord</strong>: glizzykingdreko</li><li><strong>Email</strong>: glizzykingdreko@protonmail.com</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8a92b41f54c1" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>