emoji-captcha-api/README.md

39 lines
1.4 KiB
Markdown
Raw Permalink Normal View History

2023-05-04 01:17:03 +00:00
# Emoji CAPTCHA
> 🚨 This is forked from https://github.com/moderent/emoji-captcha and rewrited
> with [Axum](https://lib.rs/crates/axum) instead
> [Actix-Web](https://lib.rs/crates/actix-web) (2x perfomance boost in most
> scenarious unexpected reason)
### A CAPTCHA implementation based on identifying emojis
This was exclusively developed to be used in Telegram, but might be used
anywhere else.
2023-05-04 01:22:32 +00:00
Mirror on my
[<img src="https://git.zeldon.ru/assets/img/logo.svg" align="center" width="20" height="20"/> Git](https://git.zeldon.ru/zeldon/emoji-captcha-api)
2023-05-04 01:17:03 +00:00
## Brief Description
1. The client sends an HTTP request to the server.
2. The server returns a generated photo that has 6 emojis inside it, along with:
- A custom header called `x-emojis` that includes the code points of the six
emojis in the photo plus 2 random ones in hex, shuffled, splitted by ";",
and the parts of each of them splitted by "-".
- A custom header called `x-correct-emojis` that only includes the code
points of the 6 emojis in the photo.
3. The client displays the photo returned by the server, along with the emojis
provided in the `x-emojis` in a way the user can pick them.
4. The client compares the first six emojis that the user picked with
`x-correct-emojis`.
## Credits
This wouldn't be possible without the inspirations from the CAPTCHA system at
[@PyrogramLounge](https://t.me/PyrogramLounge).