在我的wordpress网站主页上有人注入脚本

问题描述 投票:0回答:2

我有WordPress网站。在我的主页中有人在我的帖子div之后添加了一些脚本我试图找出如何删除它但脚本是动态的,

我想我的网站是有人破解的

在这里,我将分享由某人function 7a3() {var h = document.head;if (!h) { h = document.getElementsByTagName(“head”); h = h[0]; }var s = document.createElement(“style”);s.type = “text/css”;var c = “#swboc-10o{display:flex; overflow:hidden; margin:0px}#home-right-bottom #swboc-10o>*{width:497px; flex-shrink:0; margin:0}#swboc-10o>#swboc-10{margin-left:-497px; flex-shrink:1; background-color:rgb(255, 255, 255); width:100%}@media only screen and (max-width: 1024px) and (min-width: 960px) {#swboc-10o{float: left; margin: 0 25px;}}“;if(s.styleSheet) s.styleSheet.cssText = c; else s.appendChild(document.createTextNode(c)); h.appendChild(s);}注入的脚本

<script>function erewhonf75() {var h = document.head;if (!h) { h = document.getElementsByTagName("head"); h = h[0]; }var s = document.createElement("style");s.type = "text/css";var c = "#erewhon-f75o{display:flex; overflow:hidden; margin:10px 0px}#erewhon-f75o>*{width:407px; flex-shrink:0; margin:0}#erewhon-f75o>#erewhon-f75{margin-left:-407px; flex-shrink:1; background-color:rgb(255, 255, 255); width:100%}";if(s.styleSheet) s.styleSheet.cssText = c; else s.appendChild(document.createTextNode(c)); h.appendChild(s);}</script> 

和HTML标签是

  <div><a href="https://cialrx.com/">Cialis 10 mg</a> proved to be a really reliable drug that helps me in dealing with women. I accept it two or three hours before the meeting. When it starts to work, I feel a rush of blood to my face, a small stuffiness in my nose, but eventually it all descends to the genitals. The effect is only positive, lasting several days.</div><p id="erewhon-f75">Erewhon Santa Monica features a beautiful patio, terraced courtyard, and a street-level view of Erewhon’s open kitchen. Erewhon has been independent and family-owned for fifty years. We are proud to work with innovative and passionate vendors and farmers to bring you a unique mix of products, held to the highest standards. Hope to see you soon!</p></div>
<script>erewhonf75();</script></li></ul></div></div>

我没有这个脚本和HTML div

我被搜索了所有项目,但我找不到任何东西在我身边,任何人都知道我的网站会发生什么

javascript wordpress security code-injection
2个回答
1
投票

你最好的选择是使用像Wordfence这样的东西进行扫描(它是一个插件,有一个免费版本)。大多数代码注入都是通过eval(base64_decode)片段完成的。它可能在你的functions.php文件中,但它们可能会炸毁每个php文件。

底线:安装Wordfence或任何其他扫描工具,并按照它给出的指示。确保更新所有插件和Wordpress版本。如果在git中跟踪主题代码,您也可以比较代码并从master中拉出以删除所有废话。


-2
投票

试试文件style.css a[href="https://cialrx.com/"]{ display: none; }

并更改密码和登录。

© www.soinside.com 2019 - 2024. All rights reserved.