HEX
Server: Apache
System: Linux msm5694.mjhst.com 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64
User: camjab_ssh (1000)
PHP: 5.3.29
Disabled: NONE
Upload Files
File: /home/httpd/html/porn.tw/public_html/captchaBlack.php
<?php 
include('admin/config.php');
session_start();

   $first = rand(1,10);
	$second = rand(1,10); 
	$captchaString = "$first+$second = ?"; 
    $_SESSION['captchaBlack'] = $first+$second; 

$imgX = 120;
$imgY = 30;
$image = imagecreatetruecolor(120, 30);

$backgr_col = imagecolorallocate($image, 0,0,0);
$border_col = imagecolorallocate($image, 0,0,0);
$text_col = imagecolorallocate($image, 243,234,235);
$noise_color = imagecolorallocate($image, 243,234,235);

imagefilledrectangle($image, 0, 0, 120, 30, $backgr_col);
imagerectangle($image, 0, 0, 119, 29, $border_col);

for( $i=0; $i<($imgX*$imgY)/8; $i++ ) {
         imagefilledellipse($image, mt_rand(0,$imgX), mt_rand(0,$imgY), 1, 1, $noise_color);
}

$font = "$basepath/includes/captchaFont.ttf"; 
$font_size = 18;
$angle = rand(-2,2);
$box = imagettfbbox($font_size, $angle, $font, $captchaString);
$x = (int)($imgX - $box[4]) / 2;
$y = (int)($imgY - $box[5]) / 2;
imagettftext($image, $font_size, $angle, $x, $y, $text_col, $font, $captchaString);

header("Content-type: image/png");
imagepng($image);
imagedestroy ($image);
?>