Socket
Socket
Sign inDemoInstall

clam-js

Package Overview
Dependencies
1
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    clam-js

Control a ClamAV daemon over TCP or Unix Domain Sockets.


Version published
Maintainers
1
Install size
15.2 kB
Created

Readme

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

FAQs

Last updated on 05 Feb 2015

Did you know?

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc