Socket
Socket
Sign inDemoInstall

clamscan

Package Overview
Dependencies
Maintainers
1
Versions
61
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

clamscan - npm Package Compare versions

Comparing version 0.2.2 to 0.4.0

HISTORY.md

21

index.js

@@ -166,9 +166,13 @@ /*!

if(err || stderr) {
if(err.code === 1) {
callback(null, file, true);
} else {
if(self.settings.debug_mode)
console.log(err);
callback(err, file, null);
}
if(err) {
if(err.hasOwnProperty('code') && err.code === 1) {
callback(null, file, true);
} else {
if(self.settings.debug_mode)
console.log(err);
callback(err, file, null);
}
} else {
console.error(stderr);
}
} else {

@@ -213,2 +217,5 @@ var result = stdout.trim();

fs.readdir(path, function(err,all_files) {
for (var i in all_files) {
all_files[i] = path.replace(/\/$/,'') + '/' + all_files[i];
}
if(!err) {

@@ -215,0 +222,0 @@ self.do_multiscan(all_files,end_cb,file_cb);

{
"name": "clamscan",
"version": "0.2.2",
"version": "0.4.0",
"author": "Kyle Farris <kfarris@chomponllc.com> (http://chomponllc.com)",

@@ -5,0 +5,0 @@ "description": "Use Node JS to scan files on your server with ClamAV's clamscan binary. This is especially useful for scanning uploaded files provided by un-trusted sources.",

@@ -7,8 +7,2 @@ ## NodeJS Clamscan Virus Scanning Utility

## Changelog
### 0.2.1
BUG FIX: ClamAV returns an exit code 1 when it detects a virus but `exec` was interpreting that response as an error. Checking the response with type-sensitive equivalence resolves this bug.
## Dependencies

@@ -20,7 +14,7 @@

sudo yum install clamscan
sudo yum install clamav
Debian-based distros:
sudo apt-get install clamscan
sudo apt-get install clamav

@@ -48,3 +42,3 @@ As for OSX, I've not tried it, but, here's a promising looking site: http://www.clamxav.com/index.php . I would stick with linux varieties, though...

```javascript
var clam = require('clamscan');
var clam = require('clamscan')();
```

@@ -51,0 +45,0 @@

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc