DZone Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world
Search & Replace Iframe Hacked Files On Webserver
// If you've suffered iframe injections in your index.html and index.php files then this grep/sed command will come in handy for clearing the majority of them out. // Please be careful and test first with just the grep command to ensure you don't clear out anything you need. // Does NOT backup files.
grep -lr -e '<iframe src="http://.*</iframe>' * | xargs sed -i 's/<iframe src="http:\/\/.*<\/iframe>//g'