TaoGOGO

欢迎您光临,这就是TaoGOGO的网络小窝!
CSS3实现网页圆角的完美方法»
«桌面所有图标消失的解决方法集锦

php版字体扭曲的验证码及web验证码破解

最近对验证码破解比较感兴趣,找到这个比较好的文章,不敢独享,给大家看看:

1.比较难破解的验证码网站
最近在看一些验证码的知识,看起来很不起眼的东西,想要做的美观,不被人破解,还是有一定难度的
比如yahoo,微软和gmail等,他们验证码都有一些相视的地方如字体紧凑,扭曲,简介明了等以下为注册链接地址

google注册地址:https://www.google.com/accounts/NewAccount?service=mail
微软msn注册地址:https://accountservices.passport.net/reg.srf?roid=2&sl=1&vv=700&lc=2052
yahoo注册地址:https://member.cn.yahoo.com/cnreg/reginfo.html?id=20001&prop=&done=

每一个环节多破解它都有一定的难度,我也在网上找了一写比较好的破解文章在这与大家分享。

2.如何破解验证码
比较不错的文章链接,他们做的很好,尤其是geekso

http://www.geekso.com/Valite/
http://www.geekso.com/post/393/
http://huaidan.org/archives/2085.html

3.如何制作字体扭曲的验证码

<?php
$string="welcome to my webside";
getAuthImage($string);
function getAuthImage( $string , $im_x = 120 , $im_y = 60) {
ob_start();
$im_x = 120;
$im_y = 60;

$im = imagecreatetruecolor ($im_x, $im_y);
imagefill($im, 0, 0, imagecolorallocate($im,255,255,255) );

//注意以下字体文件需要有
$stringColor = imagecolorallocate($im, 17, 158, 20);
imagettftext ($im, 24, rand(-6 , 6), $im_x*0.1, $im_y*0.7, $stringColor, '/usr/local/share/fonts/georgia.ttf', $string);

//扭曲,变形

$distortion_im = imagecreatetruecolor ($im_x*1.5 , $im_y);
imagefill($distortion_im, 0, 0, imagecolorallocate($distortion_im,255,255,255) );
for ( $i=0; $i<$im_x; $i++) {
for ( $j=0; $j<$im_y; $j++) {
$rgb = imagecolorat($im, $i , $j);
if( (int)($i+20+sin($j/$im_y*2*M_PI)*10) <= imagesx($distortion_im) && (int)($i+20+sin($j/$im_y*2*M_PI)*10) >=0 ) {
imagesetpixel ($distortion_im, (int)($i+20+sin($j/$im_y*2*M_PI-M_PI*0.4)*8) , $j , $rgb);
}
}
}

//pixel

for($i=0; $i <= 64; $i++) {
$pointcolor = imagecolorallocate($distortion_im, 17, 158, 20);
imagesetpixel($distortion_im, rand(0, imagesx($distortion_im)), rand(0, imagesy($distortion_im)), $pointcolor);
}


ob_clean();
header('Content-type: image/jpeg');
imagejpeg ($distortion_im);
imagedestroy($im);
imagedestroy($distortion_im);
}

?>

想收藏或者和大家分享这篇好文章→ 分享家:Addthis中国

相关阅读:

Tags: php 验证码 验证码破解 |Comments:(11)|read:(455)

11 to "php版字体扭曲的验证码及web验证码破解"

  1. WooGooo
    回复 # 106004
    2009-12-07 at 12:57

    字体扭了是不好破解,因为人都认不出来!
    就像Google,yahoo的验证,有时候我要刷新好几次!
    呵呵,我还是喜欢做算术

  2. kangzj
    回复 # 105007
    2009-12-07 at 13:08

    备案那个网站的验证码最变态,人都不认识。。。

  3. houkai
    回复 # 105008
    2009-12-07 at 17:14

    怎么玩起php了 用python弄个呀!

  4. TaoGOGO
    回复 # 105009
    2009-12-07 at 18:03

    @WooGooo 最近做了个刷票的小软件 ,无奈那个汉字验证码只能靠人来输入~准备学习一下这个方面的东西

  5. TaoGOGO
    回复 # 106005
    2009-12-07 at 18:04

    @kangzj 他们那些人的脑筋不是一般的XX……

  6. TaoGOGO
    回复 # 105010
    2009-12-07 at 18:04

    @houkai 我对php研究的多……python还远征呢……

  7. ngshaozhu
    回复 # 108001
    2009-12-13 at 21:42

    去年还买过几本PHP的书来看,但今年来很少在碰了,现在很多都忘记了。还有Python也扔了好多
    坚持不下去,老是给自己找借口

  8. TaoGOGO
    回复 # 110001
    2009-12-15 at 16:29

    @ngshaozhu 一直想学Python,可惜也是坚持不了多久……╮(╯▽╰)╭一起努力啊

  9. lostab
    回复 # 111003
    2009-12-19 at 16:15

    @TaoGOGO
    Me too.

  10. TaoGOGO
    回复 # 112001
    2009-12-21 at 12:21

    @lostab 哈哈,英语不错

  11. lostab
    回复 # 111007
    2009-12-22 at 22:35

    @TaoGOGO
    英语...四级勉强才过.
    学日语的.

 

Leave a Reply




请输入计算结果:6+9

:) lol 8) mrgreen evil arrow :( more »

Tao公告

一定要努力啊,要做生活的强者!不要懈怠!@2009.12.22

搜索

G Show!