Login   Register  
PHP Classes
elePHPant
Icontem

File: example.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Ahmed Hosny  >  Malware Scanner  >  example.php  >  Download  
File: example.php
Role: Example script
Content type: text/plain
Description: Example
Class: Malware Scanner
Scan for files for know dangerous contents
Author: By
Last change:
Date: 3 years ago
Size: 738 bytes
 

Contents

Class file image Download
<?php

require_once "scanner.php";
$scanner = new malware_scanner;

// Setting the path to start scan ..
$scanner->path "/var/www/mycmd";

// Setting list of signatures ..
$scanner->signatures = Array("/Hello\,I\'m\-virus\!/");

// Try to chmod() when fail to read or write ..
$scanner->auto_chmod TRUE;

// Don't scan files have .pdf extension ..
$scanner->set_condition("file""/\.pdf$/"FALSE);

// Start the scan ..
$scanner->scan();

// Print detailed log ..
var_dump($scanner->log);

print 
"<hr />";

// Print list of infected files ..
var_dump($scanner->infected);

print 
"<hr />";

// Print list of repaired files ..
var_dump($scanner->repaired);

print 
"<hr />";

// Print list of errors ..
var_dump($scanner->errors);

?>