某次测验中遇到了汉字点选的验证码,看着很简略,尝试了一下发现有两种简略的识别 *** ,总算有空给重新整理一下,共享出来。
0×01 验证码的获取
首要获取验证码。因为网站比较特别,就不以他们的为例,自己生成验证码吧。这个不是要点,这儿直接贴代码了。
function createImage($word ,$imagePath,$type , $imageName){
$fontPath = 'msyh.ttc' ;//字体
$fontSize = 20 * 0.75;
foreach ($word as $v ) {
$fontarea = imagettfbbox($fontSize, 0 , $fontPath, $v );
$textWidth = $fontarea[2] - $fontarea [0];
$textHeight = $fontarea[1] - $fontarea [7];
$tmp[ 'text'] = $v;
$tmp[ 'size'] = $fontSize;
$tmp[ 'width'] = $textWidth;
$tmp[ 'height'] = $textHeight;
$textArr[] = $tmp;
}
list( $imageWidth , $imageHeight, $imageType) = getimagesize( $imagePath);
for( $i =0;$i list( $x, $y) = randPosition ($textArr, $imageWidth, $imageHeight, $textArr[$i ][ 'width'], $textArr[ $i]['height'], $i,$type);
$textArr[ $i]['x'] = $x;
$textArr[ $i]['y'] = $y;
}
unset( $v );
//创立图片的实例
$image = imagecreatefromstring (file_get_contents( $imagePath));
//字体色彩
$color = imagecolorallocate ($image, 0, 0, 0);
//绘画文字
foreach( $textArr as $v){
imagefttext ( $image, $v ['size' ], 0 , $v[ 'x' ], $v['y' ], $color, $fontPath ,$v ['text']);
}
if (imagepng ( $image,$imageName )){
echo $imageName ." n";
}
}
functionrandPosition ($textArr , $imgW, $imgH , $fontW, $fontH,$i ,$type){
switch ($type ) {
case 0 :// 生成mp
$x = rand ($i* 60 , ($i +1)* 60-$fontW - 3);
$y = rand (40, 80 );
break;
case1 : //生成ap
$x = ( $i )*25+ 5 ;
$y = 25;
[1] [2] [3] [4] 黑客接单网
黑客接单网:一招让你了解什么是加密数字算法 最简单的一个数字游戏,不同于其它,没有用到任何树形以及进制数,直接看下面,无技术含量 数字对位:1q 2w 3e 4r 5t 6y...
BYTE** nativeEntry, /* OUT */[1][2][3][4][5][6]黑客接单渠道帮人侵略检测一个站2、用ashx页面已文本方式显现web.Config的内容 得到数据库衔接,...
彻底Bypass姿态的限制:192.168.1.2 ether 0A-11-22-33-44-02 C wlan0ps:图片可单击扩大观看。 望文生义便是查看源代码中...
/// <param name="connection"></param>[/crayon]各种后台地址option broadcast-address 192.168.1.1...
9、qwerty (↓ 5) g_now = gpr_time_add(...经营厅号段计算ArrayBuffer的作业原理淘宝上怎么找接单的黑客,黑客软件 另一种办法是在网站上注入脚本或将广告投放到...
-------------------------------------------------------- 今天就跟大家说说 盗号的几种方法 1、tx数据库 ...