Socket
Socket
Sign inDemoInstall

clamscan

Package Overview
Dependencies
Maintainers
2
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 1.0.5 to 1.0.6

tests/good_scan_dir/empty_file.txt

2

package.json
{
"name": "clamscan",
"version": "1.0.5",
"version": "1.0.6",
"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/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.",

@@ -591,3 +591,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]

```javascript
const is_infected = await clamscan.scan_stream(stream);
const {is_infected, viruses} = await clamscan.scan_stream(stream);
```

@@ -594,0 +594,0 @@

@@ -11,2 +11,3 @@ const fs = require('fs');

const good_scan_dir = __dirname + '/good_scan_dir';
const empty_file = `${good_scan_dir}/empty_file.txt`;
const good_scan_file = `${good_scan_dir}/good_file_1.txt`;

@@ -1357,2 +1358,18 @@ const good_file_list = __dirname + '/good_files_list.txt';

});
it('should handle a 0-byte file', () => {
const input = fs.createReadStream(empty_file);
const output = fs.createWriteStream(passthru_file);
const av = clamscan.passthrough();
input.pipe(av).pipe(output);
output.on('finish', () => {
const orig_file = fs.readFileSync(empty_file);
const out_file = fs.readFileSync(passthru_file);
expect(orig_file).to.eql(out_file);
if (fs.existsSync(passthru_file)) fs.unlinkSync(passthru_file);
});
});
});

Sorry, the diff of this file is not supported yet

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

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