Scans a file for malware and returns whether it contains malware.
Static
createFactory method to create a new instance of ClamAVScanner. You can't use the constructor directly, as we need to initialize the ClamAV scanner asynchronously.
Optional
clamavOptions: Optionsthe options as required by the ClamAV scanner (see
https://www.npmjs.com/package/clamscan). This is simply passed through to
ClamAV, expect for the parameters removeInfected
, quarantineInfected
and scanRecursively
: these are set to false to make sure the behavior
is as @lumieducation/h5p-server expects it.
A light wrapper calling the ClamAV scanner to scan files for malware. It utilizes the
clamscan
package.Note: You need to have a ClamAV running somewhere to use this and you must update ClamAVs virus definitions regularly yourself from outside this class.