0byt3m1n1
Path:
/
data
/
17
/
1
/
18
/
11
/
1670011
/
user
/
1801231
/
htdocs
/
customtanningbed_dot_com_bc
/
[
Home
]
File: security_key.php
<?php session_start(); include_once("config.php"); function make_seed() { list($usec, $sec) = explode(' ', microtime()); return (float) $sec + ((float) $usec * 100000000000); } srand(make_seed()); $Stri = ""; $Stri = substr(md5(rand(0,999999999999)),0,6); /* for($i=0;$i<=10;$i+=2){ $str = substr($rand,$i,2); if($str < 0) $str = $str * -1; $mod = bcmod("$str", "26"); $Stri .= chr($mod+97); } */ if(!$_REQUEST[string_security]) { $string = strtoupper($Stri); } else { $string=$_REQUEST[string_security]; } $_SESSION['security_key'] = $string; $sql="update `secure` set `key`='$string'"; mysql_query($sql); $w = 150; $h = 30; $im = imagecreate($w, $h); $bg = imagecolorallocate($im, 255, 255, 180); $textcolor = imagecolorallocate($im, 153, 153, 153); imagettftext($im, 22, 0, 8, 24, $textcolor, "Fonts/timesbi.ttf", $string);//courbd for ($i=0;$i<=$w;$i+=10) { if ($i==$w) $i--; imageline($im,$i,0,$i,$h,$textcolor); } for ($i=0;$i<=$h;$i+=10) { if ($i==$h) $i--; imageline($im,0,$i,$w,$i,$textcolor); } srand(make_seed()); $file = md5(rand(0,9999)); header("Content-type: image/png"); imagepng($im); imagedestroy($im); ?>