-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathindex.php
38 lines (32 loc) · 985 Bytes
/
index.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
<?php
// Include the browserrecon application
include('inc_browserrecon.php');
// Do the web browser fingerprinting
$browser = browserrecon(getfullheaders());
if($_SERVER['QUERY_STRING'] == 'pic'){
$font = 2;
$width = imagefontwidth($font) * strlen($browser);
$height = imagefontheight($font);
$im = imagecreate($width, $height);
$x = imagesx($im) - $width ;
$y = imagesy($im) - $height;
$background_color = imagecolorallocate($im, 242, 242, 242);
$text_color = imagecolorallocate($im, 0, 0, 0);
$trans_color = $background_color;
imagecolortransparent($im, $trans_color);
imagestring($im, $font, $x, $y, $browser, $text_color);
if(function_exists('imagegif')){
header('Content-type: image/gif');
imagegif($im);
}elseif (function_exists('imagejpeg')){
header('Content-type: image/jpeg');
imagejpeg($im, '', 0.5);
}elseif(function_exists('imagepng')){
header('Content-type: image/png');
imagepng($im);
}
imagedestroy($im);
}else{
echo $browser;
}
?>