Comparing version 1.3.3 to 1.4.0
{ | ||
"name": "clamscan", | ||
"version": "1.3.3", | ||
"version": "1.4.0", | ||
"author": "Kyle Farris <kyle.farris@infotechinc.com> (https://infotechinc.com)", | ||
@@ -21,3 +21,2 @@ "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.", | ||
}, | ||
"dependencies": {}, | ||
"keywords": [ | ||
@@ -24,0 +23,0 @@ "clamav", |
@@ -113,3 +113,3 @@ [![NPM Version][npm-version-image]][npm-url] [![NPM Downloads][npm-downloads-image]][npm-url] [![Node.js Version][node-image]][node-url] [![Build Status][travis-image]][travis-url] | ||
scan_log: null, // Path to a writeable log file to write scan results into | ||
debug_mode: false // Whether or not to log info/debug/error msgs to the console | ||
debug_mode: false, // Whether or not to log info/debug/error msgs to the console | ||
file_list: null, // path to file containing list of files to scan (for scan_files method) | ||
@@ -133,3 +133,3 @@ scan_recursively: true, // If true, deep scan folders recursively | ||
reload_db: false, // If true, will re-load the DB on every call (slow) | ||
active: true // If true, this module will consider using the clamdscan binary | ||
active: true, // If true, this module will consider using the clamdscan binary | ||
bypass_test: false, // Check to see if socket is available when applicable | ||
@@ -149,3 +149,3 @@ }, | ||
scan_log: '/var/log/node-clam', // You're a detail-oriented security professional. | ||
debug_mode: true // This will put some debug info in your js console | ||
debug_mode: true, // This will put some debug info in your js console | ||
file_list: '/home/webuser/scan_files.txt', // path to file containing list of files to scan | ||
@@ -546,6 +546,5 @@ scan_recursively: false, // Choosing false here will save some CPU cycles | ||
- `good_files` (array) List of the full paths to all files that are _clean_. | ||
- `bad_files` (array) List of the full paths to all files that are _infected_. | ||
- `errors` (object) Per-file errors keyed by the filename in which the error happened. (ex. `{'foo.txt': Error}`) | ||
- `viruses` (array) List of all the viruses found (feature request: associate to the bad files). | ||
- `file` (string) **NULL** as no file path can be provided with the stream | ||
- `is_infected` (boolean) **True**: File is infected; **False**: File is clean. **NULL**: Unable to scan. | ||
- `viruses` (array) An array of any viruses found in the scanned file. | ||
@@ -584,3 +583,3 @@ ### Examples | ||
```javascript | ||
clamscan.scan_stream(stream).then(is_infected => { | ||
clamscan.scan_stream(stream).then(({is_infected}) => { | ||
if (is_infected) return console.log("Stream is infected! Booo!"); | ||
@@ -587,0 +586,0 @@ console.log("Stream is not infected! Yay!"); |
@@ -22,3 +22,3 @@ const fs = require('fs'); | ||
clamdscan: { | ||
socket: '/var/run/clamd.scan/clamd.sock', // required for testing (change for your system e.g. '/var/run/clamd.scan/clamd.sock') - can be set to null | ||
socket: '/var/run/clamav/clamd.ctl', // required for testing (change for your system e.g. '/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 | ||
@@ -25,0 +25,0 @@ port: 3310, // required for testing (change for your system) - can be set to null |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
224630
23
3391
669
9