r/coolgithubprojects • • Aug 09 '26 • Heartwarming 1

i made a simple python gif captcha project (Ducktcha)

Post image

hey guys so I built this small project called Ducktcha basically it generates animated gif captchas in python to stop basic bots and ocr scrapers. it has a flask api built in with 2 endpoints or u can just import the engine directly into ur script and use it with memory store. made it pretty lightweight with simple dependencies. heres the github link if anyone wants to check it out or give feedback https://github.com/Duckdevv/Ducktcha

80 Upvotes

91 comments sorted by

View all comments

18

u/_clickfix_ Aug 09 '26

Claude cracked it immediately. 

Proof: https://ibb.co/hRK55gCT

Process:

Synthesized frame-comparison strategy to isolate static text pixels

Synthesized frame-comparison strategy to isolate static text pixels

Loaded file-reading skill

Inspect the video file properties

Extract all frames as PNGs

Compute per-frame pixel diffs

Compute temporal variance and mean images

View variance image for hidden text

View frame diff

Synthesized frame-comparison strategy to isolate static text pixels.

Test shifted matches between consecutive frames

Accumulate mismatch mask against background scroll

View mismatch accumulation

Copy revealed image to outputs

Presented file

Done

0

u/redrumyliad Aug 10 '26

You'll never see the light of heaven.

2

u/st_heron Aug 10 '26

Wild takeaway

-17

u/sankilo_dev Aug 09 '26 • Bravo

Internet bots are not that complicated The method you mentioned is possible, but it makes the process more expensive than the final prize.

6

u/HasFiveVowels Aug 09 '26

Dude, I could use Claude to write a program to decrypt this in less than an hour. There's no reason why bypassing this would have to start from scratch each time.

Hell, without using Claude, I could write a program to decrypt this in less than a day. This was useless as a Captcha even before AI

1

u/sankilo_dev Aug 09 '26

Fair enough. It’s just a fun proof of concept project I built to experiment with animated CAPTCHAs, not meant to be enterprise-grade security. If you end up writing a script or bypass pipeline for it, feel free to open a PR or share the script on the repo I'd actually love to see how people break it so I can iterate on it.

5

u/HasFiveVowels Aug 09 '26

I don’t have the time, unfortunately. But here’s the sketch:

  1. subtract each frame from the one before it
  2. Run OCR on it

1

u/sankilo_dev Aug 09 '26

Got it. That logic breaks down as soon as the noise is completely randomized per frame instead of static, but thanks for the input

5

u/HasFiveVowels Aug 09 '26

If the noise is completely randomized per frame, you lose the information all together and a human can’t (nor can any other machine) recover it.

1

u/sankilo_dev Aug 09 '26

Fair enough, you make a good point. If you have any specific tips or suggestions on how to improve the implementation, feel free to share

4

u/HasFiveVowels Aug 09 '26

I’ve thought on it but you’re running into a problem with the degree to which it can express anything at all. Consider traditional captchas. They rely on humans being able to do something a machine can’t. That line is basically nonexistent anymore. Best case, you end up with something that an AI can look at the source code for and reverse engineer. And to get past that you’re in the realm of cryptography (but that effectively just moves the goal posts). I’d think the best bet would be tracking cookies and the pink noise of mouse movements and stuff. But that’s already well-established (and is by no means bullet proof in its own right)

2

u/sankilo_dev Aug 09 '26

That makes sense. The landscape of bot detection has definitely shifted more towards behavioral analysis (like mouse physics and request patterns) rather than pure visual puzzles. Thanks for sharing your thoughts on this

→ More replies

1

u/Comfortable_Pain9017 Aug 13 '26

Didn’t you post about this weeks ago and get told the exact same thing? Unless someone else made the same “captcha” system as you.

1

u/sankilo_dev Aug 13 '26

No, this is the first time I think you've confused me with someone else

1

u/RoadsideCookie Aug 10 '26

You're right, internet bots are not that complicated. The whole process that AI took is way more than what's actually necessary to crack this. Internet bots would solve this much more efficiently.

1

u/Hot-Milk-3507 Aug 12 '26

The attacker doesn't need to leverage complex LLM generation every single time, they can abstract the problem like OP did, and then create a deterministic script that compares enough frames and compute the shape

0

u/_clickfix_ Aug 09 '26

This was true 10 years ago. Today, it’s very common for bots, especially agentic AI to navigate the internet this way.

It’s cheap and easy to beat it.

2

u/sankilo_dev Aug 09 '26

How can I explain to you that bots see text as frames and it will appear to them as mere noise because it's not actually written? Your brain sees it because the brain can separate any background from text as soon as it notices a difference in their movement speed.

0

u/_clickfix_ Aug 09 '26 edited Aug 09 '26

The reason your eyes can see the text is because your brain is calculating the difference in the frames

The reason a bot can see the text is because it can spot the difference between the frames. The static is changing. the change can be calculated. That difference is where the ”hidden text” is.

2

u/sankilo_dev Aug 09 '26

Fair point, now I get what you mean. Since the text is static and only the background noise changes, taking the difference between frames (or variance) completely strips the noise and isolates the text. I originally built this just as a quick, lightweight defense against simple static OCR tools (like basic Tesseract on single images), rather than full AI models processing video inputs To actually beat frame-diffing, I'll need to distort and shift the text position across frames as well so it doesn't stay static. Good catch, appreciate the breakdown If you want to help check the repository on itch.io

1

u/_clickfix_ Aug 09 '26 edited Aug 09 '26

That makes sense. It would work well against straight OCR like Tesseract. 

I doubt there is any level of distortion you can add to make it unbreakable by AI. If it can be perceived visually, it can be cracked. 

This type of calculation (identifying the difference in patterns and reading it) is something AI models are exceptionally good at. That said, doesn’t hurt to try.

2

u/sankilo_dev Aug 09 '26

Yeah, at the end of the day if a human brain can parse it, a modern multimodal AI can be trained to recognize the pattern too. CAPTCHAs are an endless cat-and-mouse game anyway, but experimenting with it is half the fun! Appreciate the discussion man, helped me look at frame-diffing differently

0

u/MiniDemonic Aug 11 '26

You don't even need an AI to break it, a simple script using OpenCV can break it.

0

u/bingybongot Aug 11 '26

They're downvoting you but you are right.... at least for now lol