PHP code example of ollyxar / php-malware-detector

1. Go to this page and download the library: Download ollyxar/php-malware-detector library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

ollyxar / php-malware-detector example snippets




(new Scanner())->run();

// First parameter is a scan directory
// Second parameter is an array of file extensions to scan
(new Scanner('/var/some_other_direcrory_to_scan'), ['php', 'txt', 'php5'])->run();
bash
# Install Composer
curl -sS https://getcomposer.org/installer | php
bash
php composer.phar 
bash
php /path_to/scanner.php > "log.txt"