Socket
Socket
Sign inDemoInstall

clamscan

Package Overview
Dependencies
0
Maintainers
3
Versions
57
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.2.0 to 2.2.1

2

package.json
{
"name": "clamscan",
"version": "2.2.0",
"version": "2.2.1",
"author": "Kyle Farris <kyle.farris@infotechinc.com> (https://infotechinc.com)",

@@ -5,0 +5,0 @@ "description": "Use Node JS to scan files on your server with ClamAV's clamscan/clamdscan binary or via TCP to a remote server or local UNIX Domain socket. This is especially useful for scanning uploaded files provided by un-trusted sources.",

@@ -568,6 +568,6 @@ # NodeJS Clamscan Virus Scanning Utility

clamscan.scanStream(stream, (err, isInfected) => {
clamscan.scanStream(stream, (err, { isInfected. viruses }) => {
if (err) return console.error(err);
if (isInfected) return console.log("Stream is infected! Booo!");
console.log("Stream is not infected! Yay!");
if (isInfected) return console.log('Stream is infected! Booo!', viruses);
console.log('Stream is not infected! Yay!');
});

@@ -574,0 +574,0 @@ ```

@@ -1,5 +0,8 @@

const fs = require('fs');
const p = require('path');
const fs = require('node:fs');
const p = require('node:path');
// walk $PATH to find bin
const isMac = process.platform === 'darwin';
const isGithub = process.env.CI ? true : false;
// Walk $PATH to find bin
const which = (bin) => {

@@ -29,3 +32,3 @@ const path = process.env.PATH.split(p.delimiter);

clamdscan: {
socket: '/var/run/clamd.scan/clamd.sock', // - can be set to null
socket: isMac ? '/opt/homebrew/var/run/clamd.sock' : '/var/run/clamd.scan/clamd.sock', // - can be set to null
host: '127.0.0.1', // required for testing (change for your system) - can be set to null

@@ -36,3 +39,3 @@ port: 3310, // required for testing (change for your system) - can be set to null

localFallback: false,
// configFile: '/etc/clamd.d/scan.conf' // set if required
// configFile: isMac ? '/opt/homebrew/etc/clamav/clamd.conf' : '/etc/clamd.d/scan.conf', // set if required
},

@@ -44,4 +47,4 @@ // preference: 'clamdscan', // not used if socket/host+port is provided

// Force specific socket when on GitHub Actions
if (process.env.CI) config.clamdscan.socket = '/var/run/clamav/clamd.ctl';
if (isGithub) config.clamdscan.socket = '/var/run/clamav/clamd.ctl';
module.exports = config;

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

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