CN106446662A - 一种识别验证码作弊程序的方法 - Google Patents

一种识别验证码作弊程序的方法 Download PDF

Info

Publication number
CN106446662A
CN106446662A CN201610935245.2A CN201610935245A CN106446662A CN 106446662 A CN106446662 A CN 106446662A CN 201610935245 A CN201610935245 A CN 201610935245A CN 106446662 A CN106446662 A CN 106446662A
Authority
CN
China
Prior art keywords
identifying code
character string
verification code
character
program
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201610935245.2A
Other languages
English (en)
Other versions
CN106446662B (zh
Inventor
张伟荣
季统凯
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Zhongke Shoushi Technology Co ltd
Original Assignee
G Cloud Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by G Cloud Technology Co Ltd filed Critical G Cloud Technology Co Ltd
Priority to CN201610935245.2A priority Critical patent/CN106446662B/zh
Publication of CN106446662A publication Critical patent/CN106446662A/zh
Application granted granted Critical
Publication of CN106446662B publication Critical patent/CN106446662B/zh
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/30Authentication, i.e. establishing the identity or authorisation of security principals
    • G06F21/31User authentication
    • G06F21/36User authentication by graphic or iconic representation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/30Authentication, i.e. establishing the identity or authorisation of security principals
    • G06F21/31User authentication

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

本发明涉及网站开发技术领域,具体涉及一种识别验证码作弊程序的方法。本发明所述的方法是先生成带有深浅两组颜色字符的验证码,并通过css和Javascript使用滤镜翻转验证码字符颜色,进而欺骗验证码作弊程序,识别出验证码作弊程序。本发明解决了验证码难以被真实用户识别,容易被程序作弊破解,识别作弊程序的问题。

Description

一种识别验证码作弊程序的方法
技术领域
本发明涉及网站开发技术领域,具体涉及一种识别验证码作弊程序的方法。
背景技术
目前验证码作为识别真实用户和程序作弊破解的一种手段,正被大量使用。但有的验证码为了防止被程序识别破解,使字符严重变形,互相重叠,以至于真实用户都难以识别。
发明内容
本发明解决的技术问题在于提供一种识别验证码作弊程序的方法,解决了验证码难以被真实用户识别,容易被程序作弊破解,能够识别作弊程序的问题。
本发明解决上述技术问题的技术方案是:
所述的方法是先生成带有深浅两组颜色字符的验证码,并通过css和Javascript使用滤镜翻转验证码字符颜色,进而欺骗验证码作弊程序,识别出验证码作弊程序。
所述的方法具体包含以下几个步骤:
步骤一、生成两组各不相同的,包含随机数字和字母的字符,定义为字符串A和字符串B;
步骤二、创建一个背景色为白色的图片,在图片上写入字符串A和字符串B,字符串A使用很明显的深颜色,字符串B使用暗淡的颜色;
步骤三、将字符串A和字符串B保存在服务器;
步骤四、将图片输出,显示在页面中,作为验证码使用;
步骤五、通过css和Javascript,在验证码上面加一个滤镜层,使验证码的字符颜色反转,使深颜色变成淡颜色,淡颜色变成深颜色;
步骤六、判断用户输入的验证码,如果等于字符串A,则判断为作弊破解程序。
本发明的有益效果:欺骗验证码作弊破解程序而不影响真实用户,并且能判断哪些信息是验证码作弊破解程序输入的,从而达到验证码防作弊,识别作弊程序的目的。
附图说明
下面结合附图对本发明进一步说明:
图1为本发明的方法流程图。
图2为生成的验证码图片。
图3为加滤镜后的验证码图片。
具体实施方式
如图1所示,本发明采用如下步骤:
步骤一、生成两组各不相同的,包含随机数字和字母的字符,每组字符串长度大于等于4,定义为字符串A和字符串B;
步步骤二、创建一个背景色为白色的图片,在图片上写入步骤一得到的字符串A和字符串B,字符串A使用很明显的深颜色,如深红色、深棕色,字符串B使用在白色背景色下肉眼不容易察觉的暗淡颜色,如淡灰色、淡黄色;
步骤三、将步骤一得到的字符串A和字符串B保存在服务器,跟当前用户对应起来,如存放在session中;
步骤四、将图片作适当的扭曲、加斑点等操作,然后作为图片输出,显示在页面中,作为验证码使用;此时的验证码如图2所示。
步骤五、通过css和Javascript,获取验证码图片的坐标和大小,根据坐标和大小,在验证码上面加一个大小跟验证码大小相同的滤镜层,刚好完全覆盖验证码图片。该滤镜层使验证码的字符颜色反转,使深颜色变成淡颜色,淡颜色变成深颜色。加过滤镜后的验证码如图3所示。通过该操作,呈现在真实用户眼前的是颜色非常明显的B字符串,A字符串此时颜色非常暗淡,不易察觉。而作弊程序因为只直接读取验证码,没有滤镜层效果,所以识别出来的是原本深颜色的字符串A,字符串B因为颜色暗淡被过滤掉了;
步骤六、判断用户输入的验证码,如果等于字符串B,则为真实用户的正确输入。如果等于字符串A,则可以判断为作弊破解程序,可以对该IP地址或用户进行封禁处理。如果不等于字符串A且不等于字符串B,则判断为输入错误,重新生成新的验证码图片显示。

Claims (2)

1.一种识别验证码作弊程序的方法,其特征在于:所述的方法是先生成带有深浅两组颜色字符的验证码,并通过css和Javascript使用滤镜翻转验证码字符颜色,进而欺骗验证码作弊程序,识别出验证码作弊程序。
2.根据权利要求1所述的识别验证码作弊程序的方法,其特征在于:所述的方法具体包含以下几个步骤:
步骤一、生成两组各不相同的,包含随机数字和字母的字符,定义为字符串A和字符串B;
步骤二、创建一个背景色为白色的图片,在图片上写入字符串A和字符串B,字符串A使用很明显的深颜色,字符串B使用暗淡的颜色;
步骤三、将字符串A和字符串B保存在服务器;
步骤四、将图片输出,显示在页面中,作为验证码使用;
步骤五、通过css和Javascript,在验证码上面加一个滤镜层,使验证码的字符颜色反转,使深颜色变成淡颜色,淡颜色变成深颜色;
步骤六、判断用户输入的验证码,如果等于字符串A,则判断为作弊破解程序。
CN201610935245.2A 2016-10-25 2016-10-25 一种识别验证码作弊程序的方法 Active CN106446662B (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610935245.2A CN106446662B (zh) 2016-10-25 2016-10-25 一种识别验证码作弊程序的方法

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610935245.2A CN106446662B (zh) 2016-10-25 2016-10-25 一种识别验证码作弊程序的方法

Publications (2)

Publication Number Publication Date
CN106446662A true CN106446662A (zh) 2017-02-22
CN106446662B CN106446662B (zh) 2019-03-01

Family

ID=58178033

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610935245.2A Active CN106446662B (zh) 2016-10-25 2016-10-25 一种识别验证码作弊程序的方法

Country Status (1)

Country Link
CN (1) CN106446662B (zh)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH06311356A (ja) * 1993-04-26 1994-11-04 Fuji Photo Film Co Ltd 二値画像データの処理方法
CN101201939A (zh) * 2007-12-20 2008-06-18 腾讯科技(深圳)有限公司 图片验证码生成方法和图片验证码生成系统
CN102768754A (zh) * 2012-08-03 2012-11-07 网易(杭州)网络有限公司 一种图片验证码的实现方法和装置
CN104200150A (zh) * 2014-09-01 2014-12-10 湖北盛天网络技术股份有限公司 验证码处理方法和装置

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH06311356A (ja) * 1993-04-26 1994-11-04 Fuji Photo Film Co Ltd 二値画像データの処理方法
CN101201939A (zh) * 2007-12-20 2008-06-18 腾讯科技(深圳)有限公司 图片验证码生成方法和图片验证码生成系统
CN102768754A (zh) * 2012-08-03 2012-11-07 网易(杭州)网络有限公司 一种图片验证码的实现方法和装置
CN104200150A (zh) * 2014-09-01 2014-12-10 湖北盛天网络技术股份有限公司 验证码处理方法和装置

Also Published As

Publication number Publication date
CN106446662B (zh) 2019-03-01

Similar Documents

Publication Publication Date Title
CN106790105B (zh) 基于业务数据的爬虫识别拦截方法及系统
KR101001132B1 (ko) 웹 어플리케이션의 취약성 판단 방법 및 시스템
CN104966211B (zh) 一种自动识别渠道关系的方法及系统
CN108989269B (zh) 获取验证码的方法、装置和系统
CN105844140A (zh) 一种可识别验证码的网站登录暴力破解方法及系统
CN107360137A (zh) 用于验证码识别的神经网络模型的构建方法和装置
CN109005145A (zh) 一种基于自动特征抽取的恶意url检测系统及其方法
CN107369034A (zh) 一种用户调研诚信判断的方法和装置
CN108596892A (zh) 一种基于改进LeNet-5模型的焊缝缺陷识别方法
CN111680694A (zh) 文字图像中有色印章的滤除方法及装置
CN106874768A (zh) 渗透测试的方法及装置
CN107295023A (zh) 一种网络安全漏洞扫描系统及方法
CN110266675A (zh) 一种基于深度学习的xss攻击自动化检测方法
CN107508832A (zh) 一种设备指纹识别方法及系统
CN102360409A (zh) 一种生成验证码的方法、验证的方法及其装置
CN106778280A (zh) 一种填充式远程漏洞PoC编写方法及漏洞检测方法
CN102750464A (zh) 一种基于用户标识的验证码方法
CN111126440A (zh) 一种基于深度学习的一体化工控蜜罐识别系统及方法
CN113132410A (zh) 一种用于检测钓鱼网址的方法
CN109902459A (zh) Web页面的人机识别验证方法、系统、设备和存储介质
CN106446662A (zh) 一种识别验证码作弊程序的方法
CN106559222A (zh) 穷举法解密中目标口令规则集获取方法与系统
CN104240093A (zh) 一种二维码防伪方法
CN109495275A (zh) 生成随机验证码的设置方法
CN103312695B (zh) 一种图片验证码的实现方法

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information
CB02 Change of applicant information

Address after: 523808 19th Floor, Cloud Computing Center, Chinese Academy of Sciences, No. 1 Kehui Road, Songshan Lake Hi-tech Industrial Development Zone, Dongguan City, Guangdong Province

Applicant after: G-Cloud Technology Co., Ltd.

Address before: 523808 No. 14 Building, Songke Garden, Songshan Lake Science and Technology Industrial Park, Dongguan City, Guangdong Province

Applicant before: G-Cloud Technology Co., Ltd.

GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20201112

Address after: No.9-1213, Liangli Third Street, East District, Tongzhou District, Beijing 100023

Patentee after: Zhongke Ruitong Technology Co., Ltd

Address before: 523808 19th Floor, Cloud Computing Center, Chinese Academy of Sciences, No. 1 Kehui Road, Songshan Lake Hi-tech Industrial Development Zone, Dongguan City, Guangdong Province

Patentee before: G-CLOUD TECHNOLOGY Co.,Ltd.

TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20211221

Address after: 100043 room a-1678, 2f, building 3, yard 30, Shixing street, Shijingshan District, Beijing (cluster registration)

Patentee after: Beijing Zhongke Shoushi Technology Co.,Ltd.

Address before: 100023 no.9-1213, Liangli Third Street, East District, economic development zone, Tongzhou District, Beijing

Patentee before: Zhongke Ruitong Technology Co., Ltd