
Product
Introducing Pull Request Stories to Help Security Teams Track Supply Chain Risks
Socket’s new Pull Request Stories give security teams clear visibility into dependency risks and outcomes across scanned pull requests.
dht-infohash-pub
Advanced tools
This program wraps dht-infohash-crawler in a Node.js command line executive.
Install ØMQ for your platform. And then install ØMQ bindings for Node.js.
npm install zmq
If Node.js is upgraded or downgraded after npm install zmq
, please run npm rebuild
to rebuild ØMQ bindings.
If you experience binding problems like Error: Could not locate the bindings file.
, please change to dht-infohash-pub's directory and run npm rebuild
to rebuild ØMQ bindings.
npm install dht-infohash-pub
Usage:
node dht-infohash-pub.js [options]
Options:
-h, --help output usage information
-V, --version output the version number
-q, --quiet Do not log infohashes to the console
-n, --number <n> Number of crawler instance, default = 2
-a, --dhtaddr <da> DHT network listening address, default = 0.0.0.0
-p, --dhtport <dp> DHT network listening port, default = 6881
-k, --kbucket <k> DHT k-bucket size, default = 128
--zmqaddr <za> ØMQ publishing address, default = 0.0.0.0
--zmqport <zp> ØMQ publishing port, default = 65534
Subscribe to the ØMQ publisher:
const zmq = require('zmq');
const sub = zmq.socket('sub');
sub.on('message', function (...args) {
console.log(`${args.reduce((prev, curr) => prev+curr)}`);
});
sub.connect('tcp://PUBLISHER_IP_ADDRESS:PUBLISHER_PORT');
sub.subscribe('');
Subscribe to the ØMQ publisher, use subscriber side filter:
const zmq = require('zmq');
const sub = zmq.socket('sub');
sub.on('message', function (...args) {
console.log(`${args.reduce((prev, curr) => prev+curr)}`);
});
sub.connect('tcp://PUBLISHER_IP_ADDRESS:PUBLISHER_PORT');
// Only subscribe to infohashes starting from '89abcdef'
['8', '9', 'a', 'b', 'c', 'd', 'e', 'f']
.map(letter => sub.subscribe(letter));
MIT © Hong Yan.
FAQs
Crawls the DHT Network and publishes infohashes using ØMQ.
The npm package dht-infohash-pub receives a total of 3 weekly downloads. As such, dht-infohash-pub popularity was classified as not popular.
We found that dht-infohash-pub demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Socket’s new Pull Request Stories give security teams clear visibility into dependency risks and outcomes across scanned pull requests.
Research
/Security News
npm author Qix’s account was compromised, with malicious versions of popular packages like chalk-template, color-convert, and strip-ansi published.
Research
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.