springMVC--动态验证码实现
在网站开发过程中我们一般都会为了防止用户连续提交都会提供验证码的功能,简单来说就是生成一个动态图片,在图片中保存一些校验信息,将校验信息放到session中和用户提交的验证码信息进行对比,如果出现错误则要提示验证码错误。
提供一个简单实现的demo。
- @Controller
- @RequestMapping("/auth")
- public class AuthCodeController {
- private char[] codeSequence = { 'A', '1','B', 'C', '2','D','3', 'E','4', 'F', '5','G','6', 'H', '7','I', '8','J',
- 'K', '9' ,'L', '1','M', '2','N', 'P', '3', 'Q', '4', 'R', 'S', 'T', 'U', 'V', 'W',
- 'X', 'Y', 'Z'};
- @RequestMapping("/code")
- public void getCode(HttpServletResponse response,HttpSession session) throws IOException{
- int width = 63;
- int height = 37;
- Random random = new Random();
- //设置response头信息
- //禁止缓存
- response.setHeader("Pragma", "No-cache");
- response.setHeader("Cache-Control", "no-cache");
- response.setDateHeader("Expires", 0);
- //生成缓冲区image类
- BufferedImage image = new BufferedImage(width, height, 1);
- //产生image类的Graphics用于绘制操作
- Graphics g = image.getGraphics();
- //Graphics类的样式
- g.setColor(this.getColor(200, 250));
- g.setFont(new Font("Times New Roman",0,28));
- g.fillRect(0, 0, width, height);
- //绘制干扰线
- for(int i=0;i<40;i++){
- g.setColor(this.getColor(130, 200));
- int x = random.nextInt(width);
- int y = random.nextInt(height);
- int x1 = random.nextInt(12);
- int y1 = random.nextInt(12);
- g.drawLine(x, y, x + x1, y + y1);
- }
- //绘制字符
- String strCode = "";
- for(int i=0;i<4;i++){
- String rand = String.valueOf(codeSequence[random.nextInt(codeSequence.length)]);
- strCode = strCode + rand;
- g.setColor(new Color(20+random.nextInt(110),20+random.nextInt(110),20+random.nextInt(110)));
- g.drawString(rand, 13*i+6, 28);
- }
- //将字符保存到session中用于前端的验证
- session.setAttribute("authCode", strCode.toLowerCase());
- g.dispose();
- ImageIO.write(image, "JPEG", response.getOutputStream());
- response.getOutputStream().flush();
- }
- public Color getColor(int fc,int bc){
- Random random = new Random();
- if(fc>255)
- fc = 255;
- if(bc>255)
- bc = 255;
- int r = fc + random.nextInt(bc - fc);
- int g = fc + random.nextInt(bc - fc);
- int b = fc + random.nextInt(bc - fc);
- return new Color(r,g,b);
- }
- }
@Controller
@RequestMapping("/auth")
public class AuthCodeController {private char[] codeSequence = { 'A', '1','B', 'C', '2','D','3', 'E','4', 'F', '5','G','6', 'H', '7','I', '8','J',
'K', '9' ,'L', '1','M', '2','N', 'P', '3', 'Q', '4', 'R', 'S', 'T', 'U', 'V', 'W',
'X', 'Y', 'Z'}; @RequestMapping("/code")
public void getCode(HttpServletResponse response,HttpSession session) throws IOException{
int width = 63;
int height = 37;
Random random = new Random();
//设置response头信息
//禁止缓存
response.setHeader("Pragma", "No-cache");
response.setHeader("Cache-Control", "no-cache");
response.setDateHeader("Expires", 0); //生成缓冲区image类
BufferedImage image = new BufferedImage(width, height, 1);
//产生image类的Graphics用于绘制操作
Graphics g = image.getGraphics();
//Graphics类的样式
g.setColor(this.getColor(200, 250));
g.setFont(new Font("Times New Roman",0,28));
g.fillRect(0, 0, width, height);
//绘制干扰线
for(int i=0;i<40;i++){
g.setColor(this.getColor(130, 200));
int x = random.nextInt(width);
int y = random.nextInt(height);
int x1 = random.nextInt(12);
int y1 = random.nextInt(12);
g.drawLine(x, y, x + x1, y + y1);
} //绘制字符
String strCode = "";
for(int i=0;i<4;i++){
String rand = String.valueOf(codeSequence[random.nextInt(codeSequence.length)]);
strCode = strCode + rand;
g.setColor(new Color(20+random.nextInt(110),20+random.nextInt(110),20+random.nextInt(110)));
g.drawString(rand, 13*i+6, 28);
}
//将字符保存到session中用于前端的验证
session.setAttribute("authCode", strCode.toLowerCase());
g.dispose(); ImageIO.write(image, "JPEG", response.getOutputStream());
response.getOutputStream().flush();
} public Color getColor(int fc,int bc){
Random random = new Random();
if(fc>255)
fc = 255;
if(bc>255)
bc = 255;
int r = fc + random.nextInt(bc - fc);
int g = fc + random.nextInt(bc - fc);
int b = fc + random.nextInt(bc - fc);
return new Color(r,g,b);
}
}
在jsp文件中请求这个图片地址
- <label><img type="image" src="/auth/code" id="codeImage" style="cursor:pointer;"/></label>
<label><img type="image" src="/auth/code" id="codeImage" style="cursor:pointer;"/></label>
效果:
aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAAXkAAACBCAYAAAAltcr9AAAgAElEQVR4Ae2dCXxU1bnA/7PPZJ3sEwgwLGpcWoKCBq0aVDS4lNjnMmjVWLWkWmtan6/hdZE+20dsa43tq8bqe422lVFRglqJWmtoraSuccO4VAZZMgkkmawzme2+3zkhMEkmQBAEknPbYe4999yz/G/8zjff+c53dM8+86yGOhQBRUARUATGJQGdpmlKyI/LV6s6pQgoAooA6BUERUARUAQUgfFLQAn58ftuVc8UAUVAEVCavPobUAQUAUVgPBNQmvx4fruqb4qAIjDhCSghP+H/BBQARUARGM8ElJAfz29X9U0RUAQmPAEl5Cf8n4ACoAgoAuOZgBLy4/ntqr4pAorAhCeghPyE/xNQABQBRWA8EzCOx8498MAD47Fbqk/jlIDT6WThwoXjtHeqW4eagNLkD/UbUPVPaAJCwM+dO3dCM1CdP7gE9qDJ+6grK6DO1URVkTVuK7zuEnI9FWgVhXHvxyYGGiopqXJQVVNKfvziYrMfkPPSG2YekHJUIYrAwSLQ0zHnYBWtylUEJIE9aPI+vE1OCpzDJHJjJfnFNTSNBaDHTWlJFfaSoi9MwI+leSqvIqAIKALjlcDoQj7goXFdAU7H0K57GuuwFheQPzR59CuPG1fhEh5taeHRJdPR6XSjfFzUekcvRt1RBBQBRUARGDuBOEK+gUohiG0LuId7WGDbKZRL3HjxUO9ex9vfnSMFde6SNbBs/hChXdmwuxGBphpcheV4y9fToWmIqMYjPhtXs/SUU1i6tpKSYQPK7pK+iLN2His5m5/HtH+favW+xCW6lfxznzKrTIqAIqAIfLEE4gj5Qio0jebVl5Oz4q0Bobx+xUCrPPW4G1ewfqewbl65GFasHyK4B83zntoyiopqcFQ3UFvcQFlFPb4hfQvQ5C6nqKia/Oo6qoudQ+7Gv/BS63LgcNVy2Cj9j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5MQJT2RUBRUAROJIIKCF/JL0t1VZFQBFQBMZI4P8BXt0XiSb0abwAAAAASUVORK5CYII=" alt="">
springMVC--动态验证码实现的更多相关文章
- 由12306动态验证码想到的ASP.NET实现动态GIF验证码(附源码)
背景: 12306网站推出“彩色动态验证码机制”,新版验证码不但经常出现字符叠压,还不停抖动,不少人大呼“看不清”,称“那个验证码,是毕加索的抽象画么!”铁总客服则表示:为了能正常购票只能这样.而多家 ...
- C#之asp.net 及MVC 生成动态验证码:
C#之asp.net 及MVC 生成动态验证码: 1.生成验证码字符串 // 随机生成指定长度的验证码字符串private string RandomCode(int length) { string ...
- 动态验证码处理UI自动化获取处理
解决思路两种:1.直接linux catalina.out读取:一分每10s轮询出现新的直接读取返回<br>2.缓存注入cookie,先手动登录获取session 然后通过注入user,p ...
- Django之动态验证码的生成
kind.html <!DOCTYPE html> <html lang="en"> <head> <meta charset=" ...
- java的动态验证码单线设计
1.java的动态验证码我这里将介绍两种方法: 一:根据java本身提供的一种验证码的写法,这种呢只限于大家了解就可以了,因为java自带的模式编写的在实际开发中是没有意义的,所以只供学习一下就可以了 ...
- Servlet仿CSDN动态验证码的生成-带数字和字母
林炳文Evankaka原创作品.转载请注明出处http://blog.csdn.net/evankaka 一.实现的思路: (1)首先,须要创建一个Servlet.该Servlet通过字节型响应给cl ...
- .NET中生成动态验证码
.NET中生成动态验证码 验证码是图片上写上几个字,然后对这几个字做特殊处理,如扭曲.旋转.修改文字位置,然后加入一些线条,或加入一些特殊效果,使这些在人类能正常识别的同时,机器却很难识别出来,以达到 ...
- Linux下使用Google Authenticator配置SSH登录动态验证码
1.一般ssh登录服务器,只需要输入账号和密码.2.本教程的目的:在账号和密码之间再增加一个验证码,只有输入正确的验证码之后,再输入密码才能登录.这样就增强了ssh登录的安全性.3.账号.验证码.密码 ...
- thinkphp 动态验证码
<?php namespace Home\Controller; use Think\Controller; class TestController extends Controller { ...
- iOS本地动态验证码生成-b
用于ios本地动态生成验证码,效果如下: demo.gif 导入CoreGraphics.framework用于绘制图形 封装UIView,便捷使用,代码如下: AuthcodeView.h #imp ...
随机推荐
- mysql 一次性插入的数据量过大报错max_allowed_packet解决方法
查询: show VARIABLES like ‘%max_allowed_packet%‘; 记录下数字(默认是一个7位) 执行语句: ; 重启服务 再查询 该数字 ,如果没变,则修改mysql的m ...
- Python自学--part2
概要 列表.元组操作 字符串操作 字典操作 集合操作 文件操作 字符编码与转码 一.列表.元祖操作 列表是我们最以后最常用的数据类型之一,通过列表可以对数据实现最方便的存储.修改等操作 定义列表 na ...
- python collections模块 之 ChainMap
ChainMap提供了一种多个字典整合的方式,它没有去合并这些字典,而是将这些字典放在一个 maps (一个列表)里,内部实现了很多 dict 的方法,大部分 dict 的方法,ChainMap 都能 ...
- BigNum模板
#include<iostream> #include<cstring> #include<iomanip> #include<algorithm> u ...
- deepfake安装python常用命令
pip install -r requirements.txt -i https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple/ python -m p ...
- Linux产生coredump文件(core)
1.可以使用命令 ulimit -c unlimited 来开启 core dump 功能,并且不限制 core dump 文件的大小: 如果需要限制文件的大小,将 unlimited 改成你想生成 ...
- ROS多线程编程
int main(int argc, char **argv) { ros::init(argc, argv, "multi_sub"); multiThreadListener ...
- 微信小程序注册使用流程
新开发微信小程序使用流程: 平时使用小程序较多,但是具体注册流程简单记录下: 第一步:通过邮箱注册 第二步:在邮箱进行激活 注册后,在邮箱会收到激活信息提示.点击激活地址进行激活. 第三步:信息登记 ...
- 19-10-15-W
暴力终于不跪了$\text{QvQ}$ z总j结 考试开始看到几个大字:Day1 Happy-(××终于不用爆〇了哈哈哈哈!!) 开T1.一看,不是在线仙人球嵌套动态网络路径剖分优化的分支定界贪心剪枝 ...
- linux命令行操作mysql数据库明细
连接数据库==> mysql -uroot -p 输入root密码 进入mysql操作后 下面的命令不要忘了最后结尾的; 1.选择数据库命令: use <数据库名> 2.查看表的引擎 ...