Skip to content
This repository has been archived by the owner on Oct 10, 2020. It is now read-only.

ClamAV integration for Laravel 5.5+

License

Notifications You must be signed in to change notification settings

huncrys/laravel-clamav

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ClamAV integration for Laravel 5.5+

Latest Stable Version License

Custom Laravel 5 anti-virus validator for file uploads.

Requirements

You must have ClamAV anti-virus scanner running on the server to make this package work.

You can see the ClamAV installation instructions on the official ClamAV documentation.

For example on an Ubuntu machine, you can do:

# Install clamav virus scanner
sudo apt update && apt install -y clamav-daemon

# Update virus definitions
sudo freshclam

# Start the scanner service
sudo systemctl enable --now clamav-daemon clamav-freshclam

This package is not tested on windows, but if you have ClamAV running (usually on port 3310) it should work.

Installation

Install the package through Composer.

Run composer require crys/laravel-clamav

Add the following to your providers array in config/app.php:

'providers' => [
	// ...

	Crys\Clamav\ServiceProvider::class,
],

Usage

Use it like any Validator rule:

$rules = [
	'my_file_field' => 'clamav',
];

Configuration

By default the package will try to connect the clamav daemon via the default unix socket (/var/run/clamav/clamd.ctl)

But you can set the CLAMAV_HOST environment variable to override this.

About

ClamAV integration for Laravel 5.5+

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 100.0%