@profullstack/threatcrush 0.13.80 → 0.13.81
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/daemon.js +9 -1
- package/dist/daemon.js.map +1 -1
- package/dist/index.js +9 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -50272,6 +50272,8 @@ var TorExitBlockEnforcer = class {
|
|
|
50272
50272
|
opts;
|
|
50273
50273
|
timer = null;
|
|
50274
50274
|
applied = false;
|
|
50275
|
+
/** Set once if nft is not installed here; stops retrying and logging. */
|
|
50276
|
+
unavailable = false;
|
|
50275
50277
|
runNft;
|
|
50276
50278
|
log;
|
|
50277
50279
|
intervalMs;
|
|
@@ -50287,6 +50289,7 @@ var TorExitBlockEnforcer = class {
|
|
|
50287
50289
|
}
|
|
50288
50290
|
/** Apply (or tear down) the block to match the current setting and list. */
|
|
50289
50291
|
async sync() {
|
|
50292
|
+
if (this.unavailable) return;
|
|
50290
50293
|
if (!this.opts.enabled()) {
|
|
50291
50294
|
await this.teardown();
|
|
50292
50295
|
return;
|
|
@@ -50300,6 +50303,11 @@ var TorExitBlockEnforcer = class {
|
|
|
50300
50303
|
}
|
|
50301
50304
|
this.applied = true;
|
|
50302
50305
|
} catch (err) {
|
|
50306
|
+
if (err.code === "ENOENT") {
|
|
50307
|
+
this.unavailable = true;
|
|
50308
|
+
this.log("[tor] nft is not installed; the proactive Tor exit block is unavailable on this host");
|
|
50309
|
+
return;
|
|
50310
|
+
}
|
|
50303
50311
|
this.log(`[tor] could not apply the proactive Tor exit block: ${err.message}`);
|
|
50304
50312
|
}
|
|
50305
50313
|
}
|
|
@@ -52492,7 +52500,7 @@ async function runDaemon() {
|
|
|
52492
52500
|
sshIntrusion.start();
|
|
52493
52501
|
const torBlock = new TorExitBlockEnforcer({
|
|
52494
52502
|
exits: torExits,
|
|
52495
|
-
enabled: () => remediation.blockTorSsh
|
|
52503
|
+
enabled: () => remediation.blockTorSsh,
|
|
52496
52504
|
log: logLine
|
|
52497
52505
|
});
|
|
52498
52506
|
torBlock.start();
|