Remove Iframe Injected Code
by Kyle on · Posted in
If your index.html and index.php files have suffered from an iframe injection, you can use the following grep/sed command for clearing it out.
Please be careful and test first with just the grep command to ensure you don't clear out anything you don't need.
This command does not backup files!
grep -lr -e '<iframe src="http://.*</iframe>' * | xargs sed -i 's/<iframe src="http:\/\/.*<\/iframe>//g'
![]()