Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

clamscan

Package Overview
Dependencies
Maintainers
2
Versions
62
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.0-beta.0 to 1.0.0-beta.1

examples/basic_async_await.js

2

NodeClamTransform.js

@@ -25,3 +25,3 @@ /*

console.log("Transforming for ClamAV...", chunk.toString())
// console.log("Transforming for ClamAV...", chunk.toString())

@@ -28,0 +28,0 @@ cb();

{
"name": "clamscan",
"version": "1.0.0-beta.0",
"version": "1.0.0-beta.1",
"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.",

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

const fake_virus_url = 'https://secure.eicar.org/eicar_com.txt';
const fake_virus_url2 = 'https://secure.eicar.org/eicarcom2.zip';

@@ -1091,2 +1092,14 @@ // Promisify some stuff

it('should not allow a infected file to passthrough without cancelling the stream', () => {
const in_file = fs.createReadStream(bad_scan_file);
const out_file = fs.createWriteStream(passthru_file);
in_file.pipe(clamscan.passthrough()).pipe(out_file);
// out_file.on('end', () => {
// console.log("Done!");
// out_file.destroy();
// })
});
// it('should allow a uninfected file to passthrough without cancelling the stream', () => {

@@ -1103,14 +1116,2 @@ // const in_file = fs.createReadStream(good_scan_file);

// });
it('should not allow a infected file to passthrough without cancelling the stream', () => {
const in_file = fs.createReadStream(bad_scan_file);
const out_file = fs.createWriteStream(passthru_file);
in_file.pipe(clamscan.passthrough()).pipe(out_file);
// out_file.on('end', () => {
// console.log("Done!");
// out_file.destroy();
// })
});
});

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