PHP Classes

File: src/index.php

Recommend this page to a friend!
  Classes of Marco Cesarato   PHP Malware Scanner Free Tool   src/index.php   Download  
File: src/index.php
Role: Example script
Content type: text/plain
Description: Example script
Class: PHP Malware Scanner Free Tool
Scan PHP files to find malicious code
Author: By
Last change: Update of src/index.php
Date: 2 years ago
Size: 1,025 bytes
 

Contents

Class file image Download
<?php

/**
 * PHP Antimalware Scanner.
 *
 * @author Marco Cesarato <cesarato.developer@gmail.com>
 * @license http://opensource.org/licenses/gpl-3.0.html GNU Public License
 *
 * @see https://github.com/marcocesarato/PHP-Antimalware-Scanner
 */

namespace AMWScan;

use
Phar;

// Autoload
spl_autoload_register(function ($name) {
   
$namespace = __NAMESPACE__ . '\\';
   
$classname = trim($name, '\\');
    if (
strpos($classname, $namespace) === 0) {
       
$file = str_replace(__NAMESPACE__ . '\\', '', $name) . '.php';
       
$file = str_replace(['\\', '/'], DIRECTORY_SEPARATOR, $file);
        if (
Phar::running() === '') {
           
$file = __DIR__ . '/' . $file;
        }
        require_once
$file;
    }
});

// Settings
ini_set('memory_limit', '1G');
ini_set('xdebug.max_nesting_level', 500);
ob_implicit_flush(false);
set_time_limit(-1);

// Errors
error_reporting(0);
ini_set('display_errors', 0);
ini_set('display_startup_errors', 0);

if (
Scanner::isCli()) {
   
$app = new Scanner();
   
$app->run();
}