某人在我的 wordpress 网站主页中注入了脚本

Injected script by someone in my worpdress site home page

我有 WordPress 网站。在我的主页有人在我的 post 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

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

您最好的选择是 运行 使用 Wordfence 之类的工具进行扫描(它是一个插件,并且有免费版本)。大多数代码注入都是通过 eval(base64_decode)snippets 完成的。它可能在您的 functions.php 文件中,但他们可能会破坏每个 php 文件。

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

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

并更改密码和登录。