ホームページ  >  記事  >  バックエンド開発  >  PHP_PHP チュートリアルによる Web ページ ウイルスの駆除

PHP_PHP チュートリアルによる Web ページ ウイルスの駆除

WBOY
WBOYオリジナル
2016-07-13 17:37:58907ブラウズ

いくつかの置換操作を実行するだけでテストできます

<font face="NSimsun"><?php<br /> クラスクリア_ウイルス{<br /> パブリック $index =b.html;<br /> public $filepath =array(b.html);<br /> public $virus_type ="<script src=http://ave3.cn></script>";<br> 関数 open_file(){<br> if(file_exists($this->index)){<br> $tmp =file_get_contents($this->index);<br> if( strrpos($tmp,$this->virus_type)!== false){<br> $temp =str_replace($this->virus_type,,$tmp);<br> $handle =fopen($this->index,w);<br> fwrite($handle,$temp);<br> fclose($handle);<br> }その他{<br> echo $this->virus_find;<br> }<br> }<br> }<br> }<br> $virus =新しいclear_virus;<br> $virus->open_file();<br> ?><br> </font>スクリプトウイルスを削除する

www.bkjia.comtru​​ehttp://www.bkjia.com/PHPjc/486534.html技術記事いくつかの置換操作を実行するだけで、test?php Class clear_virus{ public $filepath =array(b.html); ことができます。 ..
声明:
この記事の内容はネチズンが自主的に寄稿したものであり、著作権は原著者に帰属します。このサイトは、それに相当する法的責任を負いません。盗作または侵害の疑いのあるコンテンツを見つけた場合は、admin@php.cn までご連絡ください。