samirdjelal / captcha-rs Goto Github PK
View Code? Open in Web Editor NEWGenerate verification images dynamically
License: MIT License
Generate verification images dynamically
License: MIT License
Currently, captcha-rs is always exporting as PNG which is slow and inefficient for webservers.
CAPTCHAs do not need lossless compression1, and they need to be fast to prevent CPU exhaustion/DoS attacks.
Also since captcha-rs returns the CAPTCHA base64 encoded, it has to be decoded for correctly passing it to web clients which is a waste of CPU and memory.
Heck, JPEG with lossy compression on quality 40 makes it more secure too! โฉ
A very minor issue I noticed while reading the code. CaptchaBuilder::build
doesn't use self.compression
anywhere, it hard-codes the value 40
:
Line 134 in 07376c0
sometimes captchas are not just simple text answers
sometimes (for example for a telegram bot ) we need to generate a 8 random strings and then send them all to user so they can click the buttons instead of writing text
in general it might be useful
Can I configure a set of symbols to be used when generating text?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.