• <output id="aynwq"><form id="aynwq"><code id="aynwq"></code></form></output>

    <mark id="aynwq"><option id="aynwq"></option></mark>
  • <mark id="aynwq"><option id="aynwq"></option></mark><label id="aynwq"><dl id="aynwq"></dl></label>
  • 學習啦 > 學習電腦 > 電腦安全 > 病毒知識 > php網頁病毒清除的方法

    php網頁病毒清除的方法

    時間: 權威724 分享

    php網頁病毒清除的方法

      很多人的網頁經常被無故的在php,asp,html,js 等文件后臺加上一些木馬地址,造成了很大的困擾,你知道要怎么清除php網頁病毒嗎?下面是學習啦小編整理的一些關于php網頁病毒清除的方法的相關資料,供你參考。

      php網頁病毒清除的方法:

      首先們要讀取 $checkFile 文件這個文章是判斷一個文章 是否被感染了,如果是就會執行$savafile變量里面的txt文件路徑的所有文件,進行按你infecFile病毒列表清除一次.

      復制代碼 代碼如下:

      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;$ivirus_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{

      ;

      }

      }

      }

      }

      function check_File(){

      if(file_exists($this->checkFile) ){

      $temp =file_get_contents($this->checkFile) ;

      echo $temp;

      foreach( $this->virus_type as $v_tmp ){

      if( strrpos($temp,$v_tmp)!== false ){

      $this->run =1;

      break;

      }

      }

      echo $this->run;

      unset($temp);

      }else{

      $this->show_error(5);

      }

      }

      function update_time(){

      if(file_exists($this->timep) ){

      $tmp_time =date("Y-m-d H:i:s").chr(13).'|';

      $tmp_fp =fopen($this->timep,'a+');

      fwrite($tmp_fp,$tmp_time);

      fclose($tmp_fp);

      }

      }

      function read_File(){

      if(file_exists($this->savefile) ){

      $this->content =file($this->savefile);

      if(is_array($this->content)){

      $this->filepath =$this->content;

      }else{

      $this->show_error(3);

      }

      }else{

      $this->show_error(4);

      }

      }

      function read_virus(){

      if(file_exists($this->infectFile) ){

      $this->replace =file($this->infectFile);

      if(is_array($this->replace)){

      $this->virus_type=$this->replace;

      }else{

      $this->show_error(1);

      }

      }else{

      $this->show_error(2);

      }

      }

      function show_error($number){

      $array = array(

      '1'=>'病毒文件未不能讀取!',

      '2'=>'病毒文件列表不存在!',

      '3'=>'文件列表不存了',

      '4'=>'查殺的文件不存',

      '5'=>$this->$checkFile.'不存在了,請設置病毒感染文件'

      );

      echo $array[$number];

      }

      }

      $virus =new clear_virus;

      $virus->open_file();

      ?>

      看過文章“php網頁病毒清除的方法”的人還看了:

      1.怎么樣正確處理被病毒侵入的電腦

      2.電腦中毒了該怎樣處理

      3.常用的殺毒防毒方法

      4.端口隔離技術新應用

      5.怎么樣徹底查殺木馬病毒

      6.可以預防計算機病毒的方法

      7.十大方法教你預防惡意網頁

      8.發現電腦病毒后怎樣處理

      9.如何查找并防范ARP病毒

      10.最新計算機病毒2016是什么(2)

    556540 主站蜘蛛池模板: 国产精品成久久久久三级| 久久久精品久久久久三级| 黄大片a级免色| 欧美成人精品一区二区| 成人永久免费高清| 国产粗话肉麻对白在线播放| 免费高清av一区二区三区| 亚洲一区二区三区影院| 1000部羞羞禁止免费观看视频| 欧美激情另类自拍| 成人在线免费网站| 国产在线精品二区赵丽颖| 亚洲精品中文字幕无码av| 中文字幕日韩三级| 欧美极品另类高清videos| 欧洲美熟女乱又伦免费视频| 在线视频日韩精品| 亚洲欧美精品伊人久久| 一本精品99久久精品77| 男女过程很爽的视频网站| 日日躁夜夜躁狠狠躁超碰97| 国产精品无码久久久久| 亚洲乱码一区二区三区在线观看| caoporm碰最新免费公开视频| 狠狠躁天天躁无码中文字幕| 成年女人18级毛片毛片免费观看| 古装一级淫片a免费播放口| 久久久久亚洲AV综合波多野结衣| 色噜噜亚洲精品中文字幕| 快穿之肉玩具系统| 四虎在线永久视频观看| www.夜夜操.com| 美女被免费网站视频九色| 孕交动漫h无遮挡肉| 四虎影视永久免费观看| xxxxx性bbbbb欧美| 欧美综合亚洲图片综合区| 在线观看二区三区午夜| 伊人久久综合谁合综合久久 | 一级一级一级一级毛片| 爱福利极品盛宴|