home *** CD-ROM | disk | FTP | other *** search
/ Cricao de Sites - 650 Layouts Prontos / WebMasters.iso / Servidores / xampp-win32-1.6.7-installer.exe / security / htdocs / security.php < prev    next >
Text File  |  2007-12-20  |  9KB  |  286 lines

  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
  2.     "http://www.w3.org/TR/html4/loose.dtd">
  3. <html>
  4.     <head>
  5.         <meta name="author" content="Kai Oswald Seidler, Kay Vogelgesang, Carsten Wiedmann">
  6.         <link href="xampp.css" rel="stylesheet" type="text/css">
  7.         <script language="JavaScript" type="text/javascript" src="xampp.js"></script>
  8.         <title></title>
  9.     </head>
  10.  
  11.     <body>
  12.         <?php include "lang/".file_get_contents("lang.tmp").".php"; ?>
  13.          <br>
  14.  
  15.         <h1><?php echo $TEXT['security-head']; ?> <?php include ".secureversion"; ?></h1>
  16.  
  17.         <?php echo $TEXT['security-text1']; ?><p>
  18.  
  19.         <?php
  20.             $i = 0;
  21.  
  22.             function line($head, $textok, $info, $running, $notonload, $command) {
  23.                 $host = "127.0.0.1";
  24.                 $timeout = "1";
  25.                 global $i, $TEXT;
  26.                 $curdir = getcwd();
  27.                 list($partwampp, $directorwampp) = spliti('\\\security', $curdir);
  28.                 $htaccess = ".htaccess";
  29.                 $configinc = "config.inc.php";
  30.  
  31.                 $notrun = 0;
  32.                 $status = 0;
  33.                 $notload = 0;
  34.                 $newstatus = "nok";
  35.  
  36.                 global $htxampp;
  37.                 global $phpmyadminconf;
  38.  
  39.                 $htxampp = $partwampp."\htdocs\\xampp\\".$htaccess;
  40.                 $phpmyadminconf = $partwampp."\phpmyadmin\\".$configinc;
  41.                 if ($command == "phpmyadmin") {
  42.                     if (file_exists($phpmyadminconf)) {
  43.                         $datei = fopen($phpmyadminconf, 'r');
  44.                         $status = 1;
  45.  
  46.                         while (!feof($datei)) {
  47.                             $zeile = fgets($datei, 255);
  48.                             @list($left, $right) = split('=', $zeile);
  49.                             if (preg_match("/'auth_type'/i", $left)) {
  50.                                 if (preg_match("/'http'/i", $right)) {
  51.                                     $newstatus = "ok";
  52.                                 } elseif (preg_match("/'cookie'/i", $right)) {
  53.                                     $newstatus = "ok";
  54.                                 }
  55.                                 if ($newstatus == "ok") {
  56.                                     $status = 0;
  57.                                 } else {
  58.                                     $status = 1;
  59.                                 }
  60.                             }
  61.                         }
  62.                         fclose($datei);
  63.                     } else {
  64.                         $notrun = 1;
  65.                     }
  66.                 }
  67.  
  68.                 if ($command == "mysqlroot") {
  69.                     if (($handle = @fsockopen($host, 3306, $errno, $errstr, $timeout)) == true) {
  70.                         @fclose($handle);
  71.                         if (@mysql_connect($host, "root", "")) {
  72.                             $status = 1;
  73.                         } else {
  74.                             $status = 0;
  75.                         }
  76.                     } else {
  77.                         $notrun = 1;
  78.                     }
  79.                 }
  80.  
  81.                 if ($command == "xampp") {
  82.                     if (file_exists($htxampp)) {
  83.                         $status = 0;
  84.                     } else {
  85.                         $status = 1;
  86.                     }
  87.                 }
  88.  
  89.                 if ($command == "php") {
  90.                     if (ini_get('safe_mode')) {
  91.                         $status = 0;
  92.                     } else {
  93.                         $status = 1;
  94.                     }
  95.                 }
  96.  
  97.                 if ($command == "ftp") {
  98.                     if (($handle = @fsockopen($host, 21, $errno, $errstr, $timeout)) == true) {
  99.                         @fclose($handle);
  100.  
  101.                         $conn_id = ftp_connect("127.0.0.1");
  102.                         $login_result = @ftp_login($conn_id, "newuser", "wampp");
  103.                         if (!$conn_id || !$login_result) {
  104.                             $status = 0;
  105.                         } else {
  106.                             $status = 1;
  107.                             ftp_quit($conn_id);
  108.                         }
  109.                     } else {
  110.                         $notrun = 1;
  111.                     }
  112.                 }
  113.  
  114.                 if (extension_loaded("imap")) {
  115.                     if ($command == "pop") {
  116.                         if (($handle = @fsockopen($host, 110, $errno, $errstr, $timeout)) == true) {
  117.                             @fclose($handle);
  118.                             if ($mbox = @imap_open("{localhost/pop3:110}INBOX", "newuser", "wampp")) {
  119.                                 $status = 1;
  120.                                 imap_close($mbox);
  121.                             } else {
  122.                                 $status = 0;
  123.                             }
  124.                         } else {
  125.                             $notrun = 1;
  126.                         }
  127.                     }
  128.                 } else {
  129.                     $notload = 1;
  130.                 }
  131.  
  132.                 if ($i > 0) {
  133.                     echo "<tr valign='bottom'>";
  134.                     echo "<td bgcolor='#ffffff' height='1' style='background-image:url(img/strichel.gif)' colspan='4'></td>";
  135.                     echo "</tr>";
  136.                 }
  137.  
  138.                 echo "<tr bgcolor='#ffffff' valign='middle'><td><img src='img/blank.gif' alt='' width='1' height='20'></td><td class='tabval'>";
  139.                 if ($notload == 1) {
  140.                     echo $notonload;
  141.                 }
  142.                 if (($status == 0) && (($notrun == "") || ($notrun < 1))) {
  143.                     echo $textok;
  144.                 } elseif ($notrun == 1) {
  145.                     echo $running;
  146.                 } else {
  147.                     echo $head;
  148.                 }
  149.  
  150.                 echo "</td>";
  151.                 if (($status == 0) && ($notrun != 1)) {
  152.                     echo "<td>  <span class='green'> ".$TEXT['security-ok']." </span></td>";
  153.                 } elseif ($status == 1) {
  154.                     echo "<td>  <span class='red'> ".$TEXT['security-nok']." </span></td>";
  155.                 } elseif ($notrun == 1) {
  156.                     echo "<td>  <span class='yellow'> ".$TEXT['security-noidea']." </span></td>";
  157.                 } else {
  158.                     echo "<td>  <span class='yellow'> ".$TEXT['security-noidea']." </span></td>";
  159.                 }
  160.                 echo "<td> </td></tr>";
  161.  
  162.                 if ($notrun == 1) {
  163.                     echo "<tr bgcolor='#ffffff'><td></td><td colspan='1' class='small'>$running<br><img src='img/blank.gif' alt='' width='10' height='10' border='0'></td><td></td><td></td></tr>";
  164.                 } elseif ($status) {
  165.                     echo "<tr bgcolor='#ffffff'><td></td><td colspan='1' class='small'>$info<br><img src='img/blank.gif' alt='' width='10' height='10' border='0'></td><td></td><td></td></tr>";
  166.                 }
  167.  
  168.                 $i++;
  169.             }
  170.  
  171.             echo "<table border='0' cellpadding='0' cellspacing='0'>";
  172.             echo "<tr valign='top'>";
  173.             echo "<td bgcolor='#fb7922' valign='top'><img src='img/blank.gif' alt='' width='10' height='0'></td>";
  174.             echo "<td bgcolor='#fb7922' class='tabhead'><img src='img/blank.gif' alt='' width='250' height='6'><br>".$TEXT['security-tab1']."</td>";
  175.             echo "<td bgcolor='#fb7922' class='tabhead'><img src='img/blank.gif' alt='' width='100' height='6'><br>".$TEXT['security-tab2']."</td>";
  176.             echo "<td bgcolor='#fb7922' valign='top'><br><img src='img/blank.gif' alt='' width='1' height='10'></td>";
  177.             echo "</tr>";
  178.  
  179.             line($TEXT['security-checkapache-nok'], $TEXT['security-checkapache-ok'], $TEXT['security-checkapache-text'], "", "", "xampp");
  180.  
  181.             line($TEXT['security-checkmysql-nok'], $TEXT['security-checkmysql-ok'], $TEXT['security-checkmysql-text'], $TEXT['security-checkmysql-out'], "", "mysqlroot");
  182.  
  183.             line($TEXT['security-phpmyadmin-nok'], $TEXT['security-phpmyadmin-ok'], $TEXT['security-phpmyadmin-text'], $TEXT['security-phpmyadmin-out'], "", "phpmyadmin");
  184.  
  185.             line($TEXT['security-checkftppassword-nok'], $TEXT['security-checkftppassword-ok'], $TEXT['security-checkftppassword-text'], $TEXT['security-checkftppassword-out'], "", "ftp");
  186.  
  187.             line($TEXT['security-checkphp-nok'], $TEXT['security-checkphp-ok'], $TEXT['security-checkphp-text'], $TEXT['security-checkphp-out'], "", "php");
  188.  
  189.             if (extension_loaded("imap")) {
  190.                 line($TEXT['security-pop-nok'], $TEXT['security-pop-ok'], $TEXT['security-pop-text'], $TEXT['security-pop-out'], $TEXT['security-pop-notload'], "pop");
  191.             }
  192.  
  193.             echo "<tr valign='bottom'>";
  194.             echo "<td bgcolor='#fb7922'></td>";
  195.             echo "<td bgcolor='#fb7922' colspan='3'><img src='img/blank.gif' alt='' width='1' height='8'></td>";
  196.             echo "<td bgcolor='#fb7922'></td>";
  197.             echo "</tr>";
  198.  
  199.             echo "</table>";
  200.             echo "<p>";
  201.         ?>
  202.         <?php echo $TEXT['security-text2']; ?><p>
  203.         <?php echo $TEXT['security-text3']; ?><br> <p>
  204.         <?php echo $TEXT['security-text4']; ?>
  205.  
  206.         <p>
  207.         <table border="0">
  208.             <tr>
  209.                 <td>ftp</td>
  210.                 <td> </td>
  211.                 <td><b>21</b>/tcp</td>
  212.                 <td> </td>
  213.                 <td># File Transfer [Control] (XAMPP: FTP Default Port)</td>
  214.             </tr>
  215.             <tr>
  216.                 <td>smtp</td>
  217.                 <td> </td>
  218.                 <td><b>25</b>/tcp</td>
  219.                 <td> </td>
  220.                 <td>mail # Simple Mail Transfer (XAMPP: SMTP Default Port)</td>
  221.             </tr>
  222.             <tr>
  223.                 <td>http</td>
  224.                 <td> </td>
  225.                 <td><b>80</b>/tcp</td>
  226.                 <td> </td>
  227.                 <td># World Wide Web HTTP (XAMPP: Apache Default Port)</td>
  228.             </tr>
  229.             <tr>
  230.                 <td>pop3</td>
  231.                 <td> </td>
  232.                 <td><b>110</b>/tcp</td>
  233.                 <td> </td>
  234.                 <td># Post Office Protocol - Version 3 (XAMPP: POP3 Default Port)</td>
  235.             </tr>
  236.             <tr>
  237.                 <td>imap</td>
  238.                 <td> </td>
  239.                 <td><b>143</b>/tcp</td>
  240.                 <td> </td>
  241.                 <td># Internet Message Access Protocol (XAMPP: IMAP Default Port)</td>
  242.             </tr>
  243.  
  244.             <tr>
  245.                 <td>https</td>
  246.                 <td> </td>
  247.                 <td><b>443</b>/tcp</td>
  248.                 <td> </td>
  249.                 <td># http protocol over TLS/SSL (XAMPP: Apache SSL Port)</td>
  250.             </tr>
  251.             <tr>
  252.                 <td>mysql</td>
  253.                 <td> </td>
  254.                 <td><b>3306</b>/tcp</td>
  255.                 <td> </td>
  256.                 <td># MySQL (XAMPP: MySQL Default Port)</td>
  257.             </tr>
  258.             <tr>
  259.                 <td>AJP/1.3</td>
  260.                 <td> </td>
  261.                 <td><b>8009</b></td>
  262.                 <td> </td>
  263.                 <td># AJP/1.3 (XAMPP: Tomcat AJP/1.3 Port)</td>
  264.             </tr>
  265.             <tr>
  266.                 <td>http-alt</td>
  267.                 <td> </td>
  268.                 <td><b>8080</b>/tcp</td>
  269.                 <td> </td>
  270.                 <td># HTTP Alternate (see port 80) (XAMPP: Tomcat Default Port)</td>
  271.             </tr>
  272.         </table>
  273.         <!--
  274.         smtp          25/tcp   # Simple Mail Transfer (XAMPP: SMTP Default Port)
  275.         http          80/tcp   # World Wide Web HTTP (XAMPP: Apache Default Port)
  276.         pop3         110/tcp   # Post Office Protocol - Version 3 (XAMPP: POP3 Default Port)
  277.         imap         143/tcp   # Internet Message Access Protocol (XAMPP: IMAP Default Port)
  278.         https        443/tcp   # http protocol over TLS/SSL (XAMPP: Apache SSL Port)
  279.         mysql        3306/tcp   # MySQL (XAMPP: MySQL Default Port)
  280.         AJP/1.3        8009/tcp   # AJP/1.3 (XAMPP: Tomcat AJP/1.3 Port)
  281.         http-alt    8080/tcp   # HTTP Alternate (see port 80) (XAMPP: Tomcat Default Port)
  282.         -->
  283.         <p> <p>
  284.     </body>
  285. </html>
  286.