@fanboynz/network-scanner 2.0.17 → 2.0.18

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/lib/nettools.js CHANGED
@@ -418,15 +418,17 @@ async function whoisLookupWithRetry(domain, timeout = 10000, whoisServer = null,
418
418
 
419
419
  // Add delay between retry attempts to prevent rate limiting
420
420
  if (attemptCount > 1) {
421
- if (debugMode) {
422
- if (logFunc) {
423
- logFunc(`${messageColors.highlight('[whois-retry]')} Adding ${whoisDelay}ms delay before retry attempt...`);
424
- } else {
425
- console.log(formatLogMessage('debug', `${messageColors.highlight('[whois-retry]')} Adding ${whoisDelay}ms delay before retry attempt...`));
421
+ if (whoisDelay > 0) {
422
+ if (debugMode) {
423
+ if (logFunc) {
424
+ logFunc(`${messageColors.highlight('[whois-retry]')} Adding ${whoisDelay}ms delay before retry attempt...`);
425
+ } else {
426
+ console.log(formatLogMessage('debug', `${messageColors.highlight('[whois-retry]')} Adding ${whoisDelay}ms delay before retry attempt...`));
427
+ }
426
428
  }
429
+ await new Promise(resolve => setTimeout(resolve, whoisDelay));
427
430
  }
428
431
 
429
- await new Promise(resolve => setTimeout(resolve, whoisDelay));
430
432
  } else if (whoisDelay > 0) {
431
433
  // Add initial delay on first attempt if configured
432
434
  if (debugMode) {
@@ -437,6 +439,13 @@ async function whoisLookupWithRetry(domain, timeout = 10000, whoisServer = null,
437
439
  }
438
440
  }
439
441
  await new Promise(resolve => setTimeout(resolve, whoisDelay));
442
+ } else if (debugMode) {
443
+ // Log when delay is skipped due to whoisDelay being 0
444
+ if (logFunc) {
445
+ logFunc(`${messageColors.highlight('[whois-retry]')} Skipping delay (whoisDelay: ${whoisDelay}ms)`);
446
+ } else {
447
+ console.log(formatLogMessage('debug', `${messageColors.highlight('[whois-retry]')} Skipping delay (whoisDelay: ${whoisDelay}ms)`));
448
+ }
440
449
  }
441
450
 
442
451
  try {
package/nwss.js CHANGED
@@ -1,4 +1,4 @@
1
- // === Network scanner script (nwss.js) v2.0.17 ===
1
+ // === Network scanner script (nwss.js) v2.0.18 ===
2
2
 
3
3
  // puppeteer for browser automation, fs for file system operations, psl for domain parsing.
4
4
  // const pLimit = require('p-limit'); // Will be dynamically imported
@@ -130,7 +130,7 @@ const { navigateWithRedirectHandling, handleRedirectTimeout } = require('./lib/r
130
130
  const { monitorBrowserHealth, isBrowserHealthy, isQuicklyResponsive, performGroupWindowCleanup, performRealtimeWindowCleanup, trackPageForRealtime, updatePageUsage, cleanupPageBeforeReload } = require('./lib/browserhealth');
131
131
 
132
132
  // --- Script Configuration & Constants ---
133
- const VERSION = '2.0.17'; // Script version
133
+ const VERSION = '2.0.18'; // Script version
134
134
 
135
135
  // get startTime
136
136
  const startTime = Date.now();
@@ -2555,7 +2555,7 @@ function setupFrameHandling(page, forceDebug) {
2555
2555
  const netToolsHandler = createNetToolsHandler({
2556
2556
  whoisTerms,
2557
2557
  whoisOrTerms,
2558
- whoisDelay: siteConfig.whois_delay || whois_delay,
2558
+ whoisDelay: siteConfig.whois_delay !== undefined ? siteConfig.whois_delay : whois_delay,
2559
2559
  whoisServer,
2560
2560
  whoisServerMode: siteConfig.whois_server_mode || whois_server_mode,
2561
2561
  debugLogFile,
@@ -2662,7 +2662,7 @@ function setupFrameHandling(page, forceDebug) {
2662
2662
  const netToolsHandler = createNetToolsHandler({
2663
2663
  whoisTerms,
2664
2664
  whoisOrTerms,
2665
- whoisDelay: siteConfig.whois_delay || whois_delay, // Site-specific or global fallback
2665
+ whoisDelay: siteConfig.whois_delay !== undefined ? siteConfig.whois_delay : whois_delay, // Site-specific or global fallback
2666
2666
  whoisServer, // Pass whois server configuration
2667
2667
  whoisServerMode: siteConfig.whois_server_mode || whois_server_mode,
2668
2668
  debugLogFile, // Pass debug log file for whois error logging
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fanboynz/network-scanner",
3
- "version": "2.0.17",
3
+ "version": "2.0.18",
4
4
  "description": "A Puppeteer-based network scanner for analyzing web traffic, generating adblock filter rules, and identifying third-party requests. Features include fingerprint spoofing, Cloudflare bypass, content analysis with curl/grep, and multiple output formats.",
5
5
  "main": "nwss.js",
6
6
  "scripts": {