某次测验中遇到了汉字点选的验证码,看着很简略,尝试了一下发现有两种简略的识别 *** ,总算有空给重新整理一下,共享出来。
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] 黑客接单网
Windows XP(已停止维护)角色因此脚本会首选修改ACL来提权,因为这相比创建用户的方式更隐秘一些。 具体方式是通过LDAP修改域的安全描述符(Security Descriptor),可以在下...
3 -o输出生成的暗码到指定的文件,如:-olybbnwordlist.txt Verifying-Password:翻开api.spreaker.com/...
「破解qq空间_哪儿有黑客高手的联系方式-找黑客帮忙微信」b)assert("echo 1")是不行履行的,由于assert不能履行echo,eval("echo 1")是能够的,assert类型的w...
#1 0x6855fd in t2Decode afdko/c/public/lib/source/t2cstr/t2cstr.c:1857:38简单的来说,只有在apache开启多个端口的情况下,才...
.text:0000000000466B04 movsxd rax, dword ptr ; 取得索引https://portal.msrc.microsoft.com/en-US/security-...
mysql中延时注入的话有几个函数。 sleep,benchmark之类。 仅仅简略的演示下sleephttp://127.0.0.1/CFIDE/administrator/index.cfm我:给...