Launch Week Day 5: Introducing Reachability for PHP.Learn More
Socket
Book a DemoSign in
Socket

clam-js

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

clam-js

Control a ClamAV daemon over TCP or Unix Domain Sockets.

latest
npmnpm
Version
0.2.1
Version published
Weekly downloads
27
58.82%
Maintainers
1
Weekly downloads
 
Created
Source

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);
});

Keywords

virus

FAQs

Package last updated on 05 Feb 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts