Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /* GF-UCP debug
- ** Please delete after use, cause this commons a SECURITY WHOLE !!!
- ** When something don't seem to work, use this and report the output :)
- ** by Tion ( Dark-Trigardon )
- */
- if(!file_exists('setup.php'))
- die('Das UCP ist nicht richtig installiert');
- if(!@include('setup.php'))
- die('Die setup.php scheint beschädigt');
- if($contyp == 1)
- {
- echo'Verbindung via FTP<br />';
- if(!function_exists("ftp_connect")) die('PHP-Lib nicht gefunden, Webhoster nicht unterstützt');
- $conn_id = @ftp_connect($ftphost) or die('Die Serverip scheint nicht zu stimmen');
- @ftp_login($conn_id, $ftpuser, $ftppass) or die('Der Login scheint nicht zu stimmen');
- if(substr($ftpdir, -1, 1) == '/') die('Der Pfad darf nicht mit einem "/" enden');
- if(!@ftp_ch($ftpdir)) die('Der Pfad existiert nicht');
- $content = @ftp_nlist($conn_id, ".");
- if(!is_array($content)) die('Kann Verzeichnisliste nicht abrufen oder Verzeichnis ist leer');
- echo'<ul>';
- for($i = 0; $i < sizeof($content); $i++)
- {
- echo '<li>'. $content[$i] .'</li>';
- }
- echo'</ul>';
- die('Connect erfolgreich');
- }
- else
- {
- echo'Auslesen via lokales Verzeichnis';
- if(!is_dir($rootpath)) die('Verzeichnis existiert nicht');
- $dir = @opendir($rootpath);
- if(!$dir) die('Zugriff auf Verzeichnis verboten, bite auf 0777 chmodden');
- echo'<ul>';
- while(($file = @readdir($dir)) != null)
- echo'<li>'. $file .'</li>';
- echo'</ul>';
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement