<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                ??一站式輕松地調用各大LLM模型接口,支持GPT4、智譜、豆包、星火、月之暗面及文生圖、文生視頻 廣告
                **php網頁病毒清除辦法** 你的網頁是不是經常被無故的在php,asp,html,js 等文件后臺加上一些木馬地址呢?我以前有個站就是這樣,所以一恨之下寫了這段代碼,文章雖然有一點浪費資源了,但是總比我們手動清除要好吧,下面我為講講程序的清除病毒的原理吧. 首先們要讀取 $checkFile 文件這個文章是判斷一個文章 是否被感染了,如果是就會執行$savafile變量里面的txt文件路徑的所有文件,進行按你infecFile病毒列表清除一次. ``` > 1. <?php? > 2. ?Class?clear\_virus{? > 3. ??//public?$content; > 4. ??public$infectFile?='virus.txt';//病毒文件列表文件 > 5. ??public$savefile????="save.txt";//所在查看病毒的文件列表 > 6. ??public$timep??='time.txt';//些記錄清除病毒時間 > 7. ??public$checkFile?='e.php';//這里是設置 > 8. ??public$run???=0;? > 9. ??public$virus\_type;? > 10. ??public$replace??;? > 11. ??public$filepath?;?? > 12. ??public$tag?????????=0;?? > > 14. ??function?open\_file(){? > 15. ???$this\->read\_virus();???? > 16. ???$this\->check\_File();? > 17. ???if($this\->run){?? > 18. ????$this\->update\_time();?? > 19. ????$this\->read\_file()?;????? > 20. ????foreach($this\->filepath?as$tmppath){? > 21. ?????if(file\_exists($tmppath)){? > 22. ??????$tmp\_file?=file\_get\_contents($tmppath);?? > 23. ??????print\_r(?$this\->virus\_type);??????? > 24. ????????for(?$i\=0;$ivirus\_type);$i++?){? > 25. ?????????if(?strrpos($tmp\_file,$this\->virus\_type\[$i\])!==?false){? > 26. ??????????$tmp\_file?=str\_replace($this\->virus\_type\[$i\],'',$tmp\_file);? > 27. ??????????$this\->tag?=1;??????????? > 28. ?????????}?????????? > 29. ????????}? > 30. ????????if(?$this\->tag?){? > 31. ?????????$handle?=fopen($tmppath,'w');? > 32. ?????????fwrite($handle,$tmp\_file);? > 33. ?????????fclose($handle);? > 34. ?????????unset($tmp\_file);?? > 35. ????????}?????? > > 37. ?????}else{? > 38. ??????;? > 39. ?????}??????? > 40. ????}?? > 41. ???}? > 42. ??}? > > 44. ??function?check\_File(){? > 45. ???if(file\_exists($this\->checkFile)?){? > 46. ????$temp?=file\_get\_contents($this\->checkFile)?;? > 47. ????echo$temp;? > 48. ?????foreach(?$this\->virus\_type?as$v\_tmp?){? > 49. ??????if(?strrpos($temp,$v\_tmp)!==?false?){? > 50. ???????$this\->run?=1;? > 51. ???????break;? > 52. ??????}? > 53. ?????}? > 54. ?????echo$this\->run;? > 55. ?????unset($temp);????? > 56. ???}else{? > 57. ????$this\->show\_error(5);? > 58. ???}? > 59. ??}? > > 61. ??function?update\_time(){? > 62. ???if(file\_exists($this\->timep)?){? > 63. ????$tmp\_time?=date("Y-m-d?H:i:s").chr(13).'|';? > 64. ????$tmp\_fp??=fopen($this\->timep,'a+');? > 65. ????fwrite($tmp\_fp,$tmp\_time);? > 66. ????fclose($tmp\_fp);????? > 67. ???}? > > 69. ??}? > > 72. ??function?read\_File(){??? > 73. ???if(file\_exists($this\->savefile)?){???? > 74. ????$this\->content?=file($this\->savefile);????? > 75. ????if(is\_array($this\->content)){????? > 76. ?????$this\->filepath?=$this\->content;?????? > 77. ????}else{? > 78. ?????$this\->show\_error(3);? > 79. ????}? > 80. ???}else{? > 81. ????$this\->show\_error(4);? > 82. ???}?? > 83. ??}? > > 86. ??function?read\_virus(){??? > 87. ???if(file\_exists($this\->infectFile)?){???? > 88. ????$this\->replace?=file($this\->infectFile);????? > 89. ????if(is\_array($this\->replace)){????? > 90. ?????$this\->virus\_type=$this\->replace;?????? > 91. ????}else{? > 92. ?????$this\->show\_error(1);? > 93. ????}? > 94. ???}else{? > 95. ????$this\->show\_error(2);? > 96. ???}?? > 97. ??}? > > 100. ??function?show\_error($number){? > 101. ???$array?=?array(? > 102. ????'1'\=>'病毒文件未不能讀取!',? > 103. ????'2'\=>'病毒文件列表不存在!',? > 104. ????'3'\=>'文件列表不存了',? > 105. ????'4'\=>'查殺的文件不存',? > 106. ????'5'\=>$this\->$checkFile.'不存在了,請設置病毒感染文件' > 107. ???);//開源代碼phpfensi.com > 108. ???echo$array\[$number\];? > 109. ??}? > > 111. ?}? > 112. ?$virus?=new?clear\_virus;? > 113. ?$virus\->open\_file();? > 114. ?> ```
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看