ssdeep.js
DefinitelyTyped icon, indicating that this package has TypeScript declarations provided by the separate @types/ssdeep.js package

0.0.3 • Public • Published

ssdeep.js - Pure JS implementation of ssdeep

JavaScript library for generating and comparing ssdeep hashes within javascript. Module is written in pure javascript so it will work in NodeJS and the browser.

This code a modified version of huwenshou's ctph.js library with SSDEEP compatible output.

Install

npm install ssdeep.js

Example

var ssdeep = require("ssdeep.js");

var eicarstring = ssdeep.digest("X5O!P%@AP[4\\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*");
console.log("ssdeep1: ", eicarstring);

eicarstring2 = ssdeep.digest("X5O!P%@AP[4\\PZX54(P^)7CC)7}$EICAR-THREATPINCH-ANTIVIRUS-TEST-FILE!$H+H*");
console.log("ssdeep2: ", eicarstring2);

console.log("Similarity:", ssdeep.similarity(eicarstring, eicarstring2));

OUTPUT:

ssdeep1:  3:a+JraNvsgzsVqSwHq9:tJuOgzsko
ssdeep2:  3:a+JraNvsg7QhyqzWwHq9:tJuOg7Q4Wo
Similarity: 70

License

MIT

Package Sidebar

Install

npm i ssdeep.js

Weekly Downloads

951

Version

0.0.3

License

none

Unpacked Size

41.1 kB

Total Files

13

Last publish

Collaborators

  • threatpinch