Download the PHP package extrameile/em-antivirus without Composer

On this page you can find all versions of the php package extrameile/em-antivirus. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package em-antivirus

Extrameile Antivirus

This extension checks all files which are added or replaced in the TYPO3 backend with an Antivirus service like ClamAV or ESET. Other Antivirus systems can be added by providing them as a scan service which implements the ScanServiceInterface. In development context, you might not have a compatible scanner installed, so there is a "DevelopmentAvService" which only scans if an uploaded file includes the word "virus" in its content.

All available scanners will be executed, an exception occurs if no scanner was available and no file will be accepted. This way you could also add multiple upload filters for content checks.

Does it work with every upload?

No, this extension connects to the FAL Upload Event and processes the file. The TYPO3 Core backend uses the FAL, but if you use non FAL file fields in your TCA it will not run. You need to implement a check and call the service yourself. Also frontend forms are not handled out of the box if they do not use the FAL upload process (EXT:form does, Powermail does not). If you don't use FAL you need to call the service yourself, e.g. by calling the the provided utility class.

The first parameter is the complete file path and name of the file to be scanned, the second parameter defines if FlashMessages should be generated or not. There are 2 possible exceptions that can be thrown.

\Extrameile\EmAntivirus\Exception\NoScannerFoundException If no scanner can be found for execution. \Extrameile\EmAntivirus\Exception\VirusDetectedException If the scanner found one or more infections in given file.

HowTo configure ClamAV

On a standard system, with clamav installed at one of the searchable paths no configuration is needed. If the binary is not in the search path or if open_basedir restrictions are set then the executable can not be found. You need to configure the path in your LocalConfiguration. The detection in TYPO3 Report Module only works properly, if no open_basedir restrictions are set.

HowTo configure ESET

Depending on the used version of eset, the executable names will differ. In older versions, it was called "eset_scan", in newer versions "cls" seems to be used. Both use the same parameters and have the same return codes. The eset_scan binary is found automagically if in search path and the open_basedir restrictions are not set. Otherwise, you need to add them in your LocalConfiguration.

HowTo use TYPO3_CONF_VARS for configuring executables

If TYPO3 can not find your executables, as they aren't in the search path or if open_basedir restrictions are set, you can configure the correct place of the executables inside your LocalConfiguration (or AdditionalConfiguration).

Please be aware that if you use the binSetup configuration, the TYPO3 reports module will show green "antivirus available" regardless if the executable exists or not.

The following configuration allows you to add more binary search paths for searching the executables:

Additional binPath

clamscan path

Or you need to provide the complete path and filename of the executable. Example for ClamAV:

eset_scan path

Example for ESET FileSecurity with eset_scan:

cls path

Example for ESET FileSecurity with cls:

HowTo Test the functionality

After completing the setup, upload an eicar testfile and the scanner should kick in. Be aware that you might have to disable your local virus scanner to download the file! The files can be found here https://www.eicar.org/?page_id=3950 The file will be blocked right after the upload is done, an error message will show up and it will not be moved to your chosen upload folder.


All versions of em-antivirus with dependencies

PHP Build Version
Package Version
Requires typo3/cms-core Version ^8.7.0 || ^9.5.0 || ^10.4.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package extrameile/em-antivirus contains the following files

Loading the files please wait ....