Advertisement
Guest User

GF-UCP DBG File

a guest
Feb 28th, 2012
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.46 KB | None | 0 0
  1. <?php
  2.     /* GF-UCP debug
  3.     ** Please delete after use, cause this commons a SECURITY WHOLE !!!
  4.     ** When something don't seem to work, use this and report the output :)
  5.     **  by Tion ( Dark-Trigardon )
  6.     */
  7.     if(!file_exists('setup.php'))
  8.         die('Das UCP ist nicht richtig installiert');
  9.     if(!@include('setup.php'))
  10.         die('Die setup.php scheint beschädigt');
  11.     if($contyp == 1)
  12.     {
  13.         echo'Verbindung via FTP<br />';
  14.         if(!function_exists("ftp_connect"))     die('PHP-Lib nicht gefunden, Webhoster nicht unterstützt');
  15.         $conn_id = @ftp_connect($ftphost)       or die('Die Serverip scheint nicht zu stimmen');
  16.         @ftp_login($conn_id, $ftpuser, $ftppass)    or die('Der Login scheint nicht zu stimmen');
  17.         if(substr($ftpdir, -1, 1) == '/')       die('Der Pfad darf nicht mit einem "/" enden');
  18.         if(!@ftp_ch($ftpdir))               die('Der Pfad existiert nicht');
  19.         $content = @ftp_nlist($conn_id, ".");
  20.         if(!is_array($content))             die('Kann Verzeichnisliste nicht abrufen oder Verzeichnis ist leer');
  21.         echo'<ul>';
  22.             for($i = 0; $i < sizeof($content); $i++)
  23.             {
  24.                 echo '<li>'. $content[$i] .'</li>';
  25.             }
  26.         echo'</ul>';
  27.         die('Connect erfolgreich');
  28.        
  29.     }
  30.     else
  31.     {
  32.         echo'Auslesen via lokales Verzeichnis';
  33.         if(!is_dir($rootpath))              die('Verzeichnis existiert nicht');
  34.         $dir = @opendir($rootpath);
  35.         if(!$dir)                   die('Zugriff auf Verzeichnis verboten, bite auf 0777 chmodden');
  36.         echo'<ul>';
  37.         while(($file = @readdir($dir)) != null)
  38.             echo'<li>'. $file .'</li>';
  39.         echo'</ul>';
  40.     }
  41. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement