Metrics
0
Watch 35 Star 98 Fork 40

Kevin6188 / captcha_serverLuaApache-2.0

Sign up for free
Explore and code with more than 2 million developers,Free private repositories !:)
Sign up
图形验证码服务器 spread retract

Clone or download
Cancel
Notice: Creating folder will generate an empty file .keep, because not support in Git
Loading...
README.md

#描述

最近在云栖社区的雨客的博客上看到了一个设计图形验证码的案例,经过试验和目前OpenResty的最新功能,对原来代码进行了调整(采用OpenResty自带的Redis库、替换了原来有问题的随机数种子设置逻辑),另外也增加了独立删除验证码的接口,后续可能会视需要增加图形验证码的分片存储等功能

#代码结构

lua_scripts 接口的实现逻辑脚本

lualib 替换lua-uuid库的lua脚本实现

nginx nginx配置文件

#依赖

gd图形处理库http://www.boutell.com/gd/http/gd-2.0.33.tar.gz

nginx sysguard模块https://github.com/alibaba/nginx-http-sysguard/archive/master.zip

OpenRestyhttp://openresty.org/download/openresty-1.9.15.1.tar.gz

Lua-Resty-UUIDhttps://github.com/dcshi/lua-resty-UUID/archive/master.zip

Lua-GD[http://jaist.dl.sourceforge.net/project/lua-gd/lua-gd/lua-gd-2.0.33r2 (for Lua 5.1)/lua-gd-2.0.33r2.tar.gz]

Redishttp://download.redis.io/releases/redis-3.2.3.tar.gz

#使用方法

请求验证码: http://192.168.10.112:9000/captcha-require http://192.168.10.112:9000/captcha-require?picgid=abcd1234 http://192.168.10.112:9000/captcha-require?picgid=abcd1234&picwidth=100&picheight=40

验证验证码: http://192.168.10.112:9000/captcha-check?picgid=abcd1234&picstr=1234 直接返回true或者false

#安装说明

https://git.oschina.net/kevin158/captcha_server/blob/master/INSTALL.md

#联系

堂吉诃德

421093703@qq.com

Comments ( 1 )

You need to Sign in for post a comment

Lua
1
https://gitee.com/kevin158/captcha_server.git
git@gitee.com:kevin158/captcha_server.git
kevin158
captcha_server
captcha_server
master

Help Search