File: bin/build

Recommend this page to a friend!
  Classes of Marco Cesarato  >  PHP Malware Scanner Free Tool  >  bin/build  >  Download  
File: bin/build
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 bin/build
Date: 1 month ago
Size: 955 bytes


Class file image Download
#!/usr/bin/env php

 * Antimalware Scanner
 * @author Marco Cesarato <>
 * @copyright Copyright (c) 2019
 * @license GNU Public License
 * @link

define('ROOT', dirname(__DIR__));

ROOT . '/vendor/autoload.php';

$input = ROOT . '/src/';
$output = ROOT . '/dist/scanner.phar';
$finalOutput = ROOT . '/dist/scanner';

// clean up
if (file_exists($output)) {
if (
file_exists($output . '.gz')) {
unlink($output . '.gz');
if (
file_exists($finalOutput)) {
// create phar
$p = new Phar($output);

// creating our library using whole directory

// pointing main file which requires all classes
$p->setDefaultStub('index.php', '/index.php');

rename($output, $finalOutput);

"$output successfully created";

For more information send a message to info at phpclasses dot org.