Помогите расшифровать PHP-код

12
Nina-S
На сайте с 26.07.2010
Offline
38
976

Здравствуйте.

Помогите, пожалуйста, расшифровать PHP-код.

Выглядит он примерно так:

<?php

$m="J|H|Z|f|c|G|V|j|Z|T|V|........................
R|2|X|1|Y|3|O|E|F|O|a|W|N|0|c|1|p|Y|K|S|k|7|";$m=str_replace("|","",$m);@eval(base64_decode($m));unset($m);
?>

Хочу убрать рекламные ссылки, но у меня ничего не выходит :( Пробовала разные декодеры — не получается.

Буду очень благодарна за помощь.

psics
На сайте с 02.04.2009
Offline
130
#1
Nina-S:
Здравствуйте.
Помогите, пожалуйста, расшифровать PHP-код.
Выглядит он примерно так:

<?php

$m="J|H|Z|f|c|G|V|j|Z|T|V|........................
R|2|X|1|Y|3|O|E|F|O|a|W|N|0|c|1|p|Y|K|S|k|7|";$m=str_replace("|","",$m);@eval(base64_decode($m));unset($m);
?>


Хочу убрать рекламные ссылки, но у меня ничего не выходит :( Пробовала разные декодеры — не получается.

Буду очень благодарна за помощь.

Скажу с опыта можешь спокойно закомментировать. 99,9% это не хорошее для сайта. Вдруг чего не так пойдет разкомментируй

LEOnidUKG
На сайте с 25.11.2006
Offline
1774
#2

/* Information is obtained only for stats purpose. */

function tp_header(){
echo '<style type="text/css">#sidebar{float:left;} div.menu li a{display: block;}</style>';
}
/*********************************************************************************************/
$tp_template['core']='20130801';
$tp_template['themeid']='45';
$tp_template['themever']='3.00';

$tp_template['footer'] = 'Provided by <a href="http://info.templatestats.com/4503" target="_blank">WP Cloud Hosting</a>, <a href="http://info.templatestats.com/4504" target="_blank">Edinburgh Travel</a>';
$tp_template['sidebar'] = '<li><h4 class="sb1_title">Theme Credit</h4><ul>'.
'<li><a href="http://info.templatestats.com/4501" target="_blank">London Travel</a></li>'.
'<li><a href="http://info.templatestats.com/4502" target="_blank">Rome Hotels</a></li>'.
'</ul></li>';


/*********************************************************************************************/
@tp_prepare();
function tp_prepare(){
Global $tpinfo,$tp_template;
$current=get_option('templatelite_data');

$hash=$tp_template['themeid'].":".$tp_template['core'];
$post_variables = array(
'blog_home'=>get_bloginfo('wpurl'),
'blog_title'=>get_bloginfo('name'),
'theme_id'=>$tp_template['themeid'],
'theme_ver'=>$tp_template['themever'],
'theme_style'=>$tpinfo[$tpinfo['tb_prefix'].'_stylesheet'],
);


if(!isset($current['time']) || $current['time'] < time()-259200 || !isset($current['hash']) || $current['hash']!=$hash){ /*min 72 hours*/
if(!isset($current)) $current=array();
$current['time']=time();
$current['hash']=$hash;
$checking=tp_checking($post_variables);

if($checking===FALSE){
$current['time']=time()-172800; /* check after 1 day if stats server not response*/
}

update_option("templatelite_data",$current);
}
}

function tp_checking($post_variables){
$url="http://www.templatestats.com/api/api.v4.php";
//$url="http://templatestats:88/api/api.v4.php";

$response = wp_remote_post( $url, array(
'method' => 'POST',
'timeout' => 20,
'redirection' => 5,
'httpversion' => '1.0',
'blocking' => true,
'headers' => array(),
'body' => $post_variables,
'cookies' => array())
);
if( is_wp_error( $response ) ) {
return false;
}else{
return true;
}

}

function theme_sb_credit(){
global $tp_template;
echo $tp_template['sidebar'];
}

function theme_credit(){
global $tp_template;
echo $tp_template['footer'];
}

function tp_sidebar(){
global $tp_template;
ob_start();
include TEMPLATEPATH."/sidebar.php";

$tp_content=ob_get_clean();
$tmp1=strip_tags($tp_content);
$tmp2=strip_tags($tp_template['sidebar']);

if(empty($tp_template['sidebar']) || strpos($tmp1,$tmp2) !== false ){
echo $tp_content;
}
}
function tp_footer(){
global $tp_template;
ob_start();
include TEMPLATEPATH."/footer.php";

$tp_content=ob_get_clean();
$tmp1=strip_tags($tp_content);
$tmp2=strip_tags($tp_template['footer']);

if( empty($tp_template['footer']) || strpos($tmp1,$tmp2) !== false ){
echo $tp_content;
}
}
add_action('get_sidebar','tp_sidebar');
add_action('get_footer','tp_footer');
✅ Мой Телеграм канал по SEO, оптимизации сайтов и серверов: https://t.me/leonidukgLIVE ✅ Качественное и рабочее размещение SEO статей СНГ и Бурж: https://getmanylinks.ru/ ✅ Настройка и оптимизация серверов https://getmanyspeed.ru/
Nina-S
На сайте с 26.07.2010
Offline
38
#3

LEOnidUKG, огромное спасибо! Вы волшебник! :)

Ragnarok
На сайте с 25.06.2010
Offline
239
#4

LEOnidUKG, поделитесь рецептом деобфускации

//TODO: перестать откладывать на потом
psics
На сайте с 02.04.2009
Offline
130
#5
LEOnidUKG:
/* Information is obtained only for stats purpose. */

function tp_header(){
echo '<style type="text/css">#sidebar{float:left;} div.menu li a{display: block;}</style>';
}
/*********************************************************************************************/
$tp_template['core']='20130801';
$tp_template['themeid']='45';
$tp_template['themever']='3.00';

$tp_template['footer'] = 'Provided by <a href="http://info.templatestats.com/4503" target="_blank">WP Cloud Hosting</a>, <a href="http://info.templatestats.com/4504" target="_blank">Edinburgh Travel</a>';
$tp_template['sidebar'] = '<li><h4 class="sb1_title">Theme Credit</h4><ul>'.
'<li><a href="http://info.templatestats.com/4501" target="_blank">London Travel</a></li>'.
'<li><a href="http://info.templatestats.com/4502" target="_blank">Rome Hotels</a></li>'.
'</ul></li>';


/*********************************************************************************************/
@tp_prepare();
function tp_prepare(){
Global $tpinfo,$tp_template;
$current=get_option('templatelite_data');

$hash=$tp_template['themeid'].":".$tp_template['core'];
$post_variables = array(
'blog_home'=>get_bloginfo('wpurl'),
'blog_title'=>get_bloginfo('name'),
'theme_id'=>$tp_template['themeid'],
'theme_ver'=>$tp_template['themever'],
'theme_style'=>$tpinfo[$tpinfo['tb_prefix'].'_stylesheet'],
);


if(!isset($current['time']) || $current['time'] < time()-259200 || !isset($current['hash']) || $current['hash']!=$hash){ /*min 72 hours*/
if(!isset($current)) $current=array();
$current['time']=time();
$current['hash']=$hash;
$checking=tp_checking($post_variables);

if($checking===FALSE){
$current['time']=time()-172800; /* check after 1 day if stats server not response*/
}

update_option("templatelite_data",$current);
}
}

function tp_checking($post_variables){
$url="http://www.templatestats.com/api/api.v4.php";
//$url="http://templatestats:88/api/api.v4.php";

$response = wp_remote_post( $url, array(
'method' => 'POST',
'timeout' => 20,
'redirection' => 5,
'httpversion' => '1.0',
'blocking' => true,
'headers' => array(),
'body' => $post_variables,
'cookies' => array())
);
if( is_wp_error( $response ) ) {
return false;
}else{
return true;
}

}

function theme_sb_credit(){
global $tp_template;
echo $tp_template['sidebar'];
}

function theme_credit(){
global $tp_template;
echo $tp_template['footer'];
}

function tp_sidebar(){
global $tp_template;
ob_start();
include TEMPLATEPATH."/sidebar.php";

$tp_content=ob_get_clean();
$tmp1=strip_tags($tp_content);
$tmp2=strip_tags($tp_template['sidebar']);

if(empty($tp_template['sidebar']) || strpos($tmp1,$tmp2) !== false ){
echo $tp_content;
}
}
function tp_footer(){
global $tp_template;
ob_start();
include TEMPLATEPATH."/footer.php";

$tp_content=ob_get_clean();
$tmp1=strip_tags($tp_content);
$tmp2=strip_tags($tp_template['footer']);

if( empty($tp_template['footer']) || strpos($tmp1,$tmp2) !== false ){
echo $tp_content;
}
}
add_action('get_sidebar','tp_sidebar');
add_action('get_footer','tp_footer');

другими словами тебе в футер и сайдбар добавляет ссылки. Это тема из паблика вероятнее... ну и выводы сами по себе напрашиваются...

Подскажите как называется тема, мб еще кто то будет искать..

Оптимизайка
На сайте с 11.03.2012
Offline
396
#6
Ragnarok:
поделитесь рецептом деобфускации

Заменить eval на echo и выполнить

⭐ BotGuard (https://botguard.net) ⭐ — защита вашего сайта от вредоносных ботов, воровства контента, клонирования, спама и хакерских атак!
LEOnidUKG
На сайте с 25.11.2006
Offline
1774
#7
Оптимизайка:
Заменить eval на echo и выполнить

Нельзя. За это надо бить руками.

Заменять eval надо только на file_put_contents

psics
На сайте с 02.04.2009
Offline
130
#8

проверьте эти посты на всякий случай с id

6202

3101

32

Оптимизайка
На сайте с 11.03.2012
Offline
396
#9
LEOnidUKG:
Нельзя. За это надо бить руками.

В данном конкретном случае, почему?

samimages
На сайте с 31.05.2009
Offline
427
#10

Оптимизайка, видимо в воспитательных целях))), т.к. паблик-совет, локально препятствий нет конечно.

Опыт как иммунитет — приобретается в муках! Аудит семантики от 15К [долго] - ЛС
12

Авторизуйтесь или зарегистрируйтесь, чтобы оставить комментарий