clam_chowder
Nicely application-level wrapper for anti-virus software. now supports on clamd only.
Installing
Put this line in your Gemfile:
gem 'clam_chowder'
then bundle:
% bundle
Usage
response = ClamChowder::Scanner.new.scan_io(file_stream)
Infected?
When the file was infected with a virus, that return true and non-it return false.
response.infected?
# => true
Virus Name
response.virus_name
# => 'Eicar-Test-Signature'
Status
When the file was infected with a virus, that return 'OK' and non-it return 'FOUND'.
response.status
# => 'OK'
Stub Mode
clam_chowder prepares a stub mode.
in stub mode consider infected a virus with written as virus in file.
How to use
ClamChowder.default_backend = :stub
if you use stub-mode when with the production environment on rails.
# config/initializers/clam_chowder.rb
ClamChowder.default_backend = Rails.env.production? ? :clamd : :stub
Supported versions
- Ruby 2.0.0
- Ruby 2.1.8
- Ruby 2.2.4
- Ruby 2.3.1
Dependencies
- clamd >= 1.0.1
Tested environments
- MacOSX Mountain Lion
- Ubuntu 12.04 LTS
License
clam_chowder is available under the MIT LICENSE