<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Ravi Kumar</title>
    <description>The latest articles on DEV Community by Ravi Kumar (@ravi_kumar_7ec5add2202ec2).</description>
    <link>https://dev.to/ravi_kumar_7ec5add2202ec2</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3294042%2F03dc9f4d-a128-4e6a-9d6c-0beb93380033.png</url>
      <title>DEV Community: Ravi Kumar</title>
      <link>https://dev.to/ravi_kumar_7ec5add2202ec2</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/ravi_kumar_7ec5add2202ec2"/>
    <language>en</language>
    <item>
      <title>I Built a Motion CAPTCHA in Go That Is Harder for AI and Crawlers to Read</title>
      <dc:creator>Ravi Kumar</dc:creator>
      <pubDate>Tue, 17 Nov 2026 14:46:28 +0000</pubDate>
      <link>https://dev.to/ravi_kumar_7ec5add2202ec2/i-built-a-motion-captcha-in-go-that-is-harder-for-ai-and-crawlers-to-read-ek3</link>
      <guid>https://dev.to/ravi_kumar_7ec5add2202ec2/i-built-a-motion-captcha-in-go-that-is-harder-for-ai-and-crawlers-to-read-ek3</guid>
      <description>&lt;p&gt;Traditional CAPTCHAs are becoming easier for automated systems to interpret. OCR, computer-vision tools, browser automation, and vision-language models can often process static visual challenges.&lt;/p&gt;

&lt;p&gt;So I built Gotcha: an open-source, self-hosted motion CAPTCHA library for Go.&lt;/p&gt;

&lt;p&gt;Repository: &lt;a href="https://github.com/ravikumariitk/gotcha" rel="noopener noreferrer"&gt;https://github.com/ravikumariitk/gotcha&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  How it works
&lt;/h2&gt;

&lt;p&gt;Gotcha hides a numeric challenge inside moving visual noise.&lt;/p&gt;

&lt;p&gt;A single frame looks like noise, while the answer becomes readable when the animation plays. This makes the challenge harder for basic OCR, single-frame analysis, and simple crawler automation to interpret.&lt;/p&gt;

&lt;p&gt;Gotcha is designed to create friction for automated visual reading. It is not marketed as AI-proof, because determined attackers may still use vision models, optical-flow analysis, browser agents, or other techniques.&lt;/p&gt;

&lt;h2&gt;
  
  
  Features
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Signed and expiring challenge tokens&lt;/li&gt;
&lt;li&gt;Replay protection&lt;/li&gt;
&lt;li&gt;Five-attempt challenge limit&lt;/li&gt;
&lt;li&gt;MP4 rendering when &lt;code&gt;ffmpeg&lt;/code&gt; is available&lt;/li&gt;
&lt;li&gt;PNG-frame fallback when MP4 encoding is unavailable&lt;/li&gt;
&lt;li&gt;Configurable colors and textures&lt;/li&gt;
&lt;li&gt;Self-hosted deployment&lt;/li&gt;
&lt;li&gt;No external CAPTCHA service required&lt;/li&gt;
&lt;li&gt;Standard Go HTTP integration&lt;/li&gt;
&lt;li&gt;MIT licensed&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Installation
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;go get github.com/ravikumariitk/gotcha@v0.1.0
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Basic usage
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight go"&gt;&lt;code&gt;&lt;span class="k"&gt;package&lt;/span&gt; &lt;span class="n"&gt;main&lt;/span&gt;

&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="n"&gt;gotcha&lt;/span&gt; &lt;span class="s2"&gt;"github.com/ravikumariitk/gotcha"&lt;/span&gt;

&lt;span class="k"&gt;func&lt;/span&gt; &lt;span class="nf"&gt;main&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;gotcha&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;ConfigureSecret&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"your-long-random-secret"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

    &lt;span class="n"&gt;challenge&lt;/span&gt; &lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="n"&gt;gotcha&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;NewChallenge&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
        &lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="s2"&gt;"standard"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="n"&gt;gotcha&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;ParseAppearance&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
            &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="kt"&gt;string&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="s2"&gt;"#0ea5e9"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"#f8fafc"&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="s2"&gt;"noise"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="p"&gt;)&lt;/span&gt;

    &lt;span class="n"&gt;valid&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;latency&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;err&lt;/span&gt; &lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="n"&gt;gotcha&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;VerifyCode&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
        &lt;span class="n"&gt;challenge&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;Token&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="s2"&gt;"12345"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="p"&gt;)&lt;/span&gt;

    &lt;span class="n"&gt;_&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;_&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;_&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;valid&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;latency&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;err&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A real application normally exposes two endpoints:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;GET  /challenge
POST /verify
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The browser receives the signed token and motion media from &lt;code&gt;/challenge&lt;/code&gt;, keeps the token in memory, and submits the token with the user’s answer to &lt;code&gt;/verify&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Important security note
&lt;/h2&gt;

&lt;p&gt;Gotcha is a CAPTCHA and abuse-friction layer, not a complete authentication system.&lt;/p&gt;

&lt;p&gt;For production applications, combine it with:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Rate limiting&lt;/li&gt;
&lt;li&gt;MFA or step-up verification&lt;/li&gt;
&lt;li&gt;Account lockout or throttling&lt;/li&gt;
&lt;li&gt;Session security&lt;/li&gt;
&lt;li&gt;Monitoring and alerting&lt;/li&gt;
&lt;li&gt;Server-side authorization&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Challenge state is stored in process memory, so distributed deployments should use request affinity or shared state.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why open source?
&lt;/h2&gt;

&lt;p&gt;The goal is to make the CAPTCHA mechanism transparent and controllable. Developers can inspect the token format, rendering behavior, verification rules, and fallback behavior instead of depending entirely on a third-party CAPTCHA service.&lt;/p&gt;

&lt;p&gt;The motion-noise concept is related to the work documented in &lt;a href="https://github.com/DrMikeMaik/GOTCHA" rel="noopener noreferrer"&gt;DrMikeMaik/GOTCHA&lt;/a&gt;, which explores motion-based human-versus-algorithm challenges and attack techniques.&lt;/p&gt;

&lt;p&gt;Feedback is welcome—especially from Go developers and security researchers interested in testing the rendering approach and its resistance to automated visual analysis.&lt;/p&gt;

&lt;h2&gt;
  
  
  Try it
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;GOTCHA_SECRET&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"$(openssl rand -hex 32)"&lt;/span&gt; go run ./examples/login
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then open:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;http://localhost:8080
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;GitHub: &lt;a href="https://github.com/ravikumariitk/gotcha" rel="noopener noreferrer"&gt;https://github.com/ravikumariitk/gotcha&lt;/a&gt;&lt;/p&gt;

</description>
      <category>go</category>
      <category>opensource</category>
      <category>security</category>
      <category>webdev</category>
    </item>
  </channel>
</rss>
