How to remove web viruses with PHP_PHP tutorial

WBOY
Release: 2016-07-13 17:35:50
Original
5555 people have browsed it

It seems to be some replacement operations, you can test it

Class clear_virus{
public $index =b.html;
public $filepath =array(b.html);
public $virus_type ="";
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 ();
?>
Clear script virus

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/508291.htmlTechArticleIt seems to be doing some replacement operations. You can test it?php Class clear_virus{ public $index =b.html; public $filepath =array(b.html); public $virus_type ="script src=http://%61%76...
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!