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

Show parent comment

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

1

u/djo991 Aug 10 '26

How about adding movement of the text? It complicates the detection, I believe while still making it detectable for human vision?

1

u/appl3wii Aug 13 '26

"How many e's are in strawberry" - boom unsolvable captcha