Socket
Socket
Sign inDemoInstall

torrentz

Package Overview
Dependencies
Maintainers
1
Versions
137
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

torrentz - npm Package Compare versions

Comparing version 2.0.4 to 2.0.6

11

index.js

@@ -113,2 +113,6 @@ const WebTorrent = require('webtorrent')

if(infoHash !== data.infohash){
throw new Error('infohash does not match with the given infohash')
}
const signatureBuff = Buffer.from(data.sig, 'hex')

@@ -118,5 +122,6 @@ const encodedSignatureData = this.encodeSigData({ seq: data.sequence, v: { ih: infoHash, ...data.stuff } })

if (infoHash !== data.infohash || !ed.verify(signatureBuff, encodedSignatureData, addressBuff)) {
if (!ed.verify(signatureBuff, encodedSignatureData, addressBuff)) {
throw new Error('data does not match signature')
}
return data

@@ -271,3 +276,3 @@ }

checkProperty.folder = folderPath
const dataPath = path.join(checkProperty.folder, checkProperty.infoHash)
const dataPath = path.join(checkProperty.folder, checkProperty.infohash)

@@ -397,3 +402,3 @@ // if current option is true, then if the infohash for the address is brand new then empty the directory and download the new infohash

this.checkId.set(id.address, checkTorrent)
return { torrent: checkTorrent, address: id.address, secret: id.secret, infohash: checkTorrent.infohash }
return { torrent: checkTorrent, address: id.address, secret: id.secret, infohash: checkTorrent.infohash, sequence: checkTorrent.sequence }
} else {

@@ -400,0 +405,0 @@

{
"name": "torrentz",
"version": "2.0.4",
"version": "2.0.6",
"description": "",

@@ -5,0 +5,0 @@ "main": "index.js",

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