收藏 分享(赏)

易语言验证码识别技术带源码(Easy language code identification technology with source code).doc

上传人:dreamzhangning 文档编号:2790377 上传时间:2018-09-27 格式:DOC 页数:24 大小:26.96KB
下载 相关 举报
易语言验证码识别技术带源码(Easy language code identification technology with source code).doc_第1页
第1页 / 共24页
易语言验证码识别技术带源码(Easy language code identification technology with source code).doc_第2页
第2页 / 共24页
易语言验证码识别技术带源码(Easy language code identification technology with source code).doc_第3页
第3页 / 共24页
易语言验证码识别技术带源码(Easy language code identification technology with source code).doc_第4页
第4页 / 共24页
易语言验证码识别技术带源码(Easy language code identification technology with source code).doc_第5页
第5页 / 共24页
点击查看更多>>
资源描述

1、易语言验证码识别技术带源码(Easy language code identification technology with source code)The simulation wizard is the first publicly available software to validate the code recognition technology,The use of simulation wizard produced a large number of free, commercial group software, for many complex BT verifica

2、tion code can be successfully identified.But the code still needs exquisite skills and patience. Please keep this in mind.Verification code identification is not suitable for impetuous people to do.Verification of code is a special technique, and any open authentication code will soon fail.Because t

3、he code is open, related sites will soon change the verification code.So Ill just introduce the principle.Here, the verification code recognition technology is purely based on technical research purposes.This technology is also used to make more websites take more effective precautions.The verificat

4、ion code recognition technology to prohibit any person by spamming information presented here.The verification code introduced in this paper is suitable for more complex picture verification code, and is also the method adopted by most websites.Some of the sites verification code is very simple, for

5、 example, in the web page directly display the verification code character, not the picture, or the file name of the picture is directly on the verification code characters.Or there are other rules to follow, or there are other obvious vulnerabilities can be used (for example, by rewriting access to

6、 the source code of the verification page, so that the verification code does not refresh).This kind of verification code recognition is very simple, as long as master the web library, element library function, you dont need to use the method described below.First, download the verification code sam

7、pleOpen the c:test folder and select “view thumbnails.“,Then run the LAScript script again, and each time you run it, check out the automatically generated images under c:test, and change the characters on the picture to the filenameFor example, when the picture shows 5, the file name is changed to

8、5.jpg.If you change the complex verification code, you can use more than a few samples for each character, the first character is the verification code character, second characters can be any character.For example: 5a.jpg, 5b.jpg, 5c.jpg. And so on.The more samples you have, the stronger your abilit

9、y to identify.IMG = image.new ();- download the image without a suffix to display the specified *.bmp formatImg:getURL (“http:/www.*.com/test.asp“, “*.png“);Assert (img:ok (), “download validation code failed“);Img:Crop (4, 3, 56, 18)Img:save (“c:testtest.jpg“) - save to hard disk- resolution pictur

10、es, specify a row and the four columnImg2, img3, img4, img5 = img:split (1,4);Img2:save (“c:test0001.jpg“)Img3:save (“c:test0002.jpg“)Img4:save (“c:test0003.jpg“)Img5:save (“c:test0004.jpg“)Image.del (IMG);How to determine the name of the picture suffixIn the entire verification code recognition pro

11、cess, the format and suffix must not be wrong, otherwise it will fail.Usually: ASP verification code is BMP format, PHP verification code is PNG format, other verification code is a lot of jpg format.Simple, on the verification code, right-click the “save the picture as“, you can see the format (not

12、 necessarily accurate).In addition, you can open the file header in binary with UltraEdit and so onFirst download:STR = web.getURL (“http:/www.*.com/test.asp“)String.save (STR, “c:test.bin“)Then open the test.bin with UE to see the header of the file (the first line)JPG file header has JFIF wordsPNG

13、 file header has PNG wordsGIF file header has GIF wordsIf you dont know, dont specify the suffix at this pointImg:getURL (“http:/vwww.*.com/test.asp“, “ “)So you can download itTwo. Generate sample database of verification codeCopy the code below and paste it into the script block of the FAP program

14、, and click “replay“ to run“,Finally, click “read the source code“.You can see the generated validation code samples in the “data block“ at the bottom of the ApeML source code.To copy the content of the data block, the FAP simulation program that needs to be identified by the verification code cover

15、s the data block.Local, tkey, =A=0, B=0, C=0, D=0, F=0, G=0, H=0, I=0, J=0, K=0, L=0, M=0, N=0, O=0, P=0, Q=0, R=0, S=0, Z=0, T=0, E=0, U=0, V=0, W=0, X=0, Y=0;Add all numeric keys to the dictionaryFor I =0,9,1 doTkeytoString (I) = 0;End;If a character has more than one sample, such as 5A.jpg 5B.jpg

16、 5C.jpgFor K, V in pairs (tkey) doIf (#k) =2) then - if not the key elements of two charactersTkeyk “A“=0;Tkeyk “B“=0;Tkeyk “C“=0;Tkeyk=nil; delete single character nameEnd;End;The -k parameter is the key, and the V parameter represents the value of a typical tkeyle iterator callback functionLoadtke

17、y = function (k, V)Local img = image.new ();Img:load (“C:test“, “k“, “.Jpg“);Assert (img:ok (), “C:test“k “.jpg“. “n is not a valid picture“);Img:bpp (1);Img:bpp (24);- remove the clutter on the verification code by the last two sentencesImg:Crop (1, 0, 9, 10) - prune a single characterImg:median (2

18、) - median filter to further remove clutterTkeyk= string.encode (img:getBytes (“*.jpg“), “); - because it is converted to a string or binary, so Base64 is encodedImage.del (IMG);End;- traverse all the elements of table tkey, and call loadtkey to load the picture fileFor K, V in pairs (tkey) doLoadtk

19、ey (k, V);End;Save all the pictures to the data islands,Ape:saveTable (tkey, “verification code sample“)Three, verification code recognitionAdd the following code to the init script block in the front of the FAP simulation program- read Base64 encoded picture data from data blockCodekey = ape:loadTa

20、ble (“verification code sample“);Local timg = ; - this is an array of images, used to image data reduction after the verification code sample storageThere must be a conversion, because codekey is just an ordinary string encoded by Base64, and timg will be a real picture object (binary data)Restore t

21、o picture objectToImage = function (k, V)Local img = image.new ();Local STR = string.decode (V, “); - first Base64 decoding, converting pure text into binary dataImg:setBytes (STR, “*.jpg“) - restore binary data to imagesTimgk = img;End;- loading verification code samplesTkey = ape:loadTable (“verif

22、ication code sample“);For K, V in pairs (tkey) do - verification samplesToImage (k, V) - convert to imageEnd;Convert the picture validation code to the string functionFunction ImgToString (IMG)Function test (imgX) -test is an inner function that is contained in a functionSleep (0);Local limit = (60

23、* 20) + (60 * 20); minimum similarity local keyword declared as a local variableLocal Chr = “A“; - read characters-testimg is an internal function that is contained in a function. As a callback function of table.foreach, the k parameter represents the key, and the V parameter represents the valueTes

24、timg = function (k, V)Call the image.testXX () function to get the similarity. Similar functions also have image.testX () image.test ()Local n = imgX:testXX (timgk);If (n表。maxn 演(L2) ;长的连通线排到前面结束;表排序(tlines,存储过程) 。把图像全部画成白色的点对于我= 0,W,1对于 j = 0,h,1IMG:SETPOS(I,J,16777215) ;结束;结束;然后把最长的一条连通线画上去对于我,一点

25、ipairs(tlines 1 )做IMG:SETPOS(点 X,Y,0 点。 ) ;结束;如果需要去掉周围的空白如果(庄稼)然后当地 N =表。maxn 演(tlines 1 )排序最长连通线中的所有坐标点存储过程=功能(PT,PT2)返回(PT。xPT2。x) ;左的排前面结束;表。排序(tlines 1 ,存储过程) ;当地的 X,X2 = tlines 1 1 。X,tlines 1 的 X;排序最长连通线中的所有坐标点存储过程=功能(PT,PT2)返回(PT。YPT2。Y) ;上的排前面结束;表。排序(tlines 1 ,存储过程) ;当地的 Y、Y2 = tlines 1 1 1 。Y,tlines N。Y;IMG:作物(x,y,X2 + 1,Y2)结束;结束;

展开阅读全文
相关资源
猜你喜欢
相关搜索
资源标签

当前位置:首页 > 高等教育 > 大学课件

本站链接:文库   一言   我酷   合作


客服QQ:2549714901微博号:道客多多官方知乎号:道客多多

经营许可证编号: 粤ICP备2021046453号世界地图

道客多多©版权所有2020-2025营业执照举报