本文介紹了網站被黑,如何使用 SED/GREP 刪除惡意代碼的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!
問題描述
限時送ChatGPT賬號..
我的一個網站被黑了.在每個 php 文件中都添加了一行代碼.我不會在這里發布完整的代碼,但它的開頭是:
a website of mine is hacked. In every php file a line of code is added. I wont post the complete code here, but it starts with:
<?php if(!isset($GLOBALS["x61156x75156x61"])) { $ua=strtolower($_SERVER["x48124x54120x5f125x53105x52137x41107x45116x54"]); if ((! strstr($ua,"x6d163x69145")) and (! strstr($ua,"x72166x3a61x31"))) $GLOBALS["x61156x75156x61"]=1; } ?><?php $yudqgxmnlr =
并以:
$gzagexgpdc=substr($yudqgxmnlr,(34129-24016),(83-71)); $gzagexgpdc($xarchajboj, $ukumkvvgai, NULL); $gzagexgpdc=$ukumkvvgai; $gzagexgpdc=(759-638); $yudqgxmnlr=$gzagexgpdc-1; ?>
我試過查找并替換一些 ssh 命令,但它似乎不起作用.(閱讀:我對 ssh 知識的缺乏妨礙了).
I've tried finding and replacing with some ssh commands, but it doesnt seem to work. (Read: my lack of ssh knowledge gets in the way).
這是我最近的嘗試:
sed -i '<?php if(!isset*gzagexgpdc-1; ?>//g’ *.php
有人可以幫我嗎?
推薦答案
你可以試試這個:https://github.com/daniyalahmadk/RMCI
只需將該代碼放入框中并點擊提交,它就會從文件中搜索代碼并將它們全部刪除.
Just need to put that code in box and hit submit, it will search code from files and remove them all once.
這篇關于網站被黑,如何使用 SED/GREP 刪除惡意代碼的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!
【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!