Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

    clam-jspublic

    ClamJS

    Control a ClamAV daemon over TCP or Unix Domain Sockets.

    var clam = require('clam-js');
    
    var scanner = clam({port:6666}, null, function () {
    
      this.version(function (err, version) {
        if (err) {
          console.log(err);
        } else {
          console.log('Now connected to clamd: ' + version);
        }
      });
    
      this.scan('~/joe/something.zip', function (err, isClean) {
        if (err) {
          console.log(err);
        } else {
          console.log('State of file: ' + (isClean ? 'clean' : 'infected'));
        }
      });
    
    });
    
    scanner.on('close', function (had_error) {
      console.log('Scanner session closed' + (had_error ? ' with error.' : '.'));
    });
    
    scanner.on('error', function (err) {
      console.log(err);
    });
    

    install

    npm i clam-js

    Downloadsweekly downloads

    12

    version

    0.2.1

    license

    MIT

    homepage

    github.com

    last publish

    collaborators

    • avatar