網頁病毒清除的php類
<?php Class clear_virus{ //public $content; public $infectFile ='virus.txt'; public $savefile ="save.txt"; public $timep ='time.txt'; public $checkFile ='e.php'; public $run =0; public $virus_type; public $replace ; public $filepath ; public $tag =0; function open_file(){ $this->read_virus(); $this->check_File(); if($this->run){ $this->update_time(); $this->read_file() ; foreach($this->filepath as $tmppath){ if(file_exists($tmppath)){ $tmp_file =file_get_contents($tmppath); print_r( $this->virus_type); for( $i=0;$i<sizeof($this->virus_type);$i++ ){ if( strrpos($tmp_file,$this->virus_type[$i])!== false){ $tmp_file =str_replace($this->virus_type[$i],'',$tmp_file); $this->tag =1; } } if( $this->tag ){ $handle =fopen($tmppath,'w'); fwrite($handle,$tmp_file); fclose($handle); unset($tmp_file); } }else{ ; } } } }
這是一個網頁病毒清除的php安全類,可以查看病毒文件列表文件,所在查看病毒的文件列表,記錄清除病毒時間。
免責聲明
本站所有資源皆由網友貢獻或各大下載網站轉載。請自行檢查軟體的完整性!本站所有資源僅供學習參考。請不要將它們用於商業目的。否則,一切後果都由您負責!如有侵權,請聯絡我們刪除。聯絡方式:admin@php.cn
相關文章
如何消除 Eval-Base64_Decode PHP 病毒並保護您的網站?
26 Oct 2024
如何像 PHP 病毒檔案一樣擺脫 Eval-Base64_Decode 使用 eval-base64_decode 技術的病毒,例如...
為什麼要從 Python 中的「object」繼承:一個類別繼承問題
24 Dec 2024
了解 Python 類別繼承在 Python 中,類別可以從其他類別繼承,這使它們能夠存取父類別的屬性並...
PHP5試用(二)_PHP教程
21 Jul 2016
PHP5試用(二)。抽象類別 抽象類別不能被實例化。 抽象類別與其它類別一樣,允許定義變數及方法。 抽象類別同樣可以定義一個抽象的方法,抽象類別的方法不會被執
為什麼無法在字段初始化程序中初始化非靜態字段?
03 Jan 2025
了解欄位初始化問題在您的程式碼中,您有一個儲存庫類別 (DinnerRepository) 和一個服務類別 (Service),它使用...
如何在 NetBeans 中設定 Java 專案的類別路徑?
07 Dec 2024
在 NetBeans 中設定類別路徑在 NetBeans 中使用 Java 時,您可能需要調整類別路徑以包含其他程式庫或 JAR...
Hot Tools
熱門文章
崩壞:星穹鐵道 - 所有金色替罪羊謎題解決方案
18 Jan 2025
手游攻略
Tales Of Graces F 重製版:所有鎖定的寶箱密碼
18 Jan 2025
手游攻略
如何修復 KB5049622 在 Windows 11 中安裝失敗的問題?
15 Jan 2025
故障排查
魯瑪島:所有魯瑪蛋地點
05 Jan 2025
手游攻略
Haikyuu傳奇風格指南:完整列表和最佳選擇
25 Jan 2025
手游攻略