Find this useful? Enter your email to receive occasional updates for securing PHP code.
Signing you up...
Thank you for signing up!
PHP Decode
$_F=__FILE__;$_X='PyBxPy9jL3g2Knh2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2..
Decoded Output download
?><?php
/*
=====================================================
DataLife Engine - by SoftNews Media Group
-----------------------------------------------------
https://dle-news.ru/
-----------------------------------------------------
Copyright (c) 2004-2023 SoftNews Media Group
=====================================================
This code is protected by copyright
=====================================================
File: find_relates.php
-----------------------------------------------------
Use: Search for relates news
=====================================================
*/
if(!defined('DATALIFEENGINE')) {
header( "HTTP/1.1 403 Forbidden" );
header ( 'Location: ../../' );
die( "Hacking attempt!" );
}
if( !$is_logged ) die( "error" );
if( !isset($_REQUEST['user_hash']) OR !$_REQUEST['user_hash'] OR $_REQUEST['user_hash'] != $dle_login_hash ) {
die( "error" );
}
function strip_data($text)
{
$quotes = array("`", " ", "
", "
", ".", ",", ";", ":", "&", "(", ")", "[", "]", "{", "}", "=", "*", "^", "%", "$", "<", ">", "+", "-");
$goodquotes = array("'", '"');
$repquotes = array("\'", '\"');
$bom = pack('H*', 'EFBBBF');
$text = preg_replace("/^$bom/", '', $text);
$text = stripslashes($text);
$text = trim(strip_tags($text));
$text = str_replace($quotes, ' ', $text);
$text = str_replace($goodquotes, $repquotes, $text);
return $text;
}
$query = isset($_POST['title']) ? dle_substr(strip_data($_POST['title']), 0, 250, $config['charset']) : '';
if (!$query) die();
if ($config['full_search']) {
$arr = explode(' ', $query);
$query = array();
foreach ($arr as $word) {
$wordlen = dle_strlen(trim($word), $config['charset']);
if ($wordlen >= $config['search_length_min']) {
$word = $db->safesql($word);
$word = '"' . $word . '"';
$query[] = $word;
}
}
if (count($query)) $query = '+' . implode(" +", $query);
else $query = '';
} else {
$arr = explode(' ', $query);
$query = array();
foreach ($arr as $word) {
$wordlen = dle_strlen(trim($word), $config['charset']);
if ($wordlen >= $config['search_length_min']) $query[] = $db->safesql(addslashes($word));
}
if (count($query)) $query = implode("%", $query);
else $query = '';
}
if( !$query ) die();
$buffer = "";
$full_s_addfield = "";
$id = intval( $_POST['id'] );
$mode = intval( $_POST['mode'] );
if ( $mode ) {
if( !$user_group[$member_id['user_group']]['allow_adds'] ) die( "error" );
} else {
if( !$user_group[$member_id['user_group']]['allow_admin'] ) die( "error" );
}
if( $id ) $where = " AND id != '" . $id . "'";
else $where = "";
if ($config['full_search']) {
$find_where = "MATCH(p.title, p.short_story, p.full_story, p.xfields) AGAINST ('{story}' IN BOOLEAN MODE)";
$full_s_addfield = ", " . $find_where . " as score";
$full_s_addfield = str_replace("{story}", $query, $full_s_addfield);
} else {
$find_where = "p.short_story LIKE '%{story}%' OR p.full_story LIKE '%{story}%' OR p.xfields LIKE '%{story}%' OR p.title LIKE '%{story}%'";
}
$find_where = str_replace("{story}", $query, $find_where);
$sql = "SELECT p.id, p.title, p.date, p.category, p.alt_name{$full_s_addfield} FROM " . PREFIX . "_post p WHERE p.approve=1{$where}";
if ($config['full_search']) {
$sql .= " AND {$find_where} ORDER by score DESC LIMIT 5";
} else {
$sql .= " AND ({$find_where}) ORDER by date DESC LIMIT 5";
}
$db->query($sql);
while ( $related = $db->get_row() ) {
$related['date'] = strtotime( $related['date'] );
$related['category'] = intval( $related['category'] );
$news_date = date( 'd-m-Y', $related['date'] );
if( $config['allow_alt_url'] ) {
if( $config['seo_type'] == 1 OR $config['seo_type'] == 2 ) {
if( $related['category'] and $config['seo_type'] == 2 ) {
$full_link = $config['http_home_url'] . get_url( $related['category'] ) . "/" . $related['id'] . "-" . $related['alt_name'] . ".html";
} else {
$full_link = $config['http_home_url'] . $related['id'] . "-" . $related['alt_name'] . ".html";
}
} else {
$full_link = $config['http_home_url'] . date( 'Y/m/d/', $related['date'] ) . $related['alt_name'] . ".html";
}
} else {
$full_link = $config['http_home_url'] . "index.php?newsid=" . $related['id'];
}
if ( dle_strlen($related['title'], $config['charset']) > 65 ) $related['title'] = dle_substr ($related['title'], 0, 65, $config['charset'])." ...";
if ( $user_group[$member_id['user_group']]['allow_all_edit'] ) {
$d_link = "<a title=\"{$lang['edit_rel']}\" href=\"?mod=editnews&action=editnews&id={$related['id']}\" target=\"_blank\"><i class=\"fa fa-pencil-square-o position-left\"></i></a><a title=\"{$lang['edit_seldel']}\" onclick=\"confirmDelete('?mod=editnews&action=doeditnews&ifdelete=yes&id={$related['id']}&user_hash={$dle_login_hash}', '{$related['id']}'); return false;\" href=\"?mod=editnews&action=doeditnews&ifdelete=yes&id={$related['id']}&user_hash={$dle_login_hash}\" target=\"_blank\"><i class=\"fa fa-trash-o position-left text-danger\"></i></a>";
} else $d_link = "";
if ( $mode ) $d_link = "";
$buffer .= "<div style=\"padding:2px;\">{$d_link}{$news_date} - <a href=\"" . $full_link . "\" target=\"_blank\">" . stripslashes( $related['title'] ) . "</a></div>";
}
$db->close();
if( $buffer ) echo "<div class=\"findrelated\">" . $buffer . "</div>";
else echo "<div class=\"findrelated\">" . $lang['related_not_found'] . "</div>";
?>
Did this file decode correctly?
Original Code
$_F=__FILE__;$_X='PyBxPy9jL3g2Knh2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnhsc29Sb1hMbklsZVtoTFtJbC1sRUJsemZuUk9JUXdsdUkwTG9sYlZmbS9seC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0teGxjUlIvdzo2NjBhSS1bSVF3SFZtNngtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLXhsV2YvQlZMaGNSbChTKWxKZ2cKLUpnSl1semZuUk9JUXdsdUkwTG9sYlZmbS94dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dn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SXZcIi9vMDBMW2g6Si9qO1wiIC4kMF9hTFs8Wi4kW0lRd18wb1JJWmwtbHFvbGNWSW52XCIibEhsJG5tYWFfYUxbPGxIbCJcImxSb1ZoSVJ2XCJfRWFvWzxcIiAibEhsd1JWTC93YW93Y0l3KGwkVklhb1JJMHsnUkxSYUknOGwpbEhsInE2byBxNjBMayAiO3h4Wnh4JDBFLSBTYWZ3SSgpO3h4TG4obCRFbW5uSVZsKWxJU2NmbCJxMExrbFNhb3d3dlwibkxbMFZJYW9SSTBcIiAibEhsJEVtbm5JVmxIbCJxNjBMayAiO3hJYXdJbElTY2ZsInEwTGtsU2Fvd3d2XCJuTFswVklhb1JJMFwiICJsSGwkYW9baHsnVklhb1JJMF9bZlJfbmZtWzAnOGxIbCJxNjBMayAiO3h4PyA=';$_D=strrev('edoced_46esab');eval($_D('JF9YPWJhc2U2NF9kZWNvZGUoJF9YKTskX1g9c3RydHIoJF9YLCdLd2h4ZmRSQjk0Ckl2Q3V9bTBiZWcyRkxTc1dRUERqSlVHIDVNTmFdekV5cTZUPEhjb1l7MzhPcHJaVjdYbGk+Lm5bazE9dEEvJywnUXNnCm9SdHk1VzRlPTlNQnVkR0UwVDFpY0RDd1hWeDJBVT5QbUZsM1NiWTwvcWsuaGE4W0hdTjZqfXJKTCB6N3tmbnZaSUtPcCcpOyRfUj1zdHJfcmVwbGFjZSgnX19GSUxFX18nLCInIi4kX0YuIiciLCRfWCk7ZXZhbCgkX1IpOyRfUj0wOyRfWD0wOw=='));
Function Calls
strtr | 1 |
strrev | 1 |
str_replace | 1 |
base64_decode | 2 |
Stats
MD5 | 19b98bc02daf3d56a76d4bcf17964a91 |
Eval Count | 2 |
Decode Time | 65 ms |