-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathexample.php
More file actions
39 lines (25 loc) · 725 Bytes
/
example.php
File metadata and controls
39 lines (25 loc) · 725 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
<?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->load_signatures("file", "sigs");
// 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);
?>