@fanboynz/network-scanner 1.0.44 → 1.0.46

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/nwss.js CHANGED
@@ -1,4 +1,4 @@
1
- // === Network scanner script (nwss.js) v1.0.44 ===
1
+ // === Network scanner script (nwss.js) v1.0.46 ===
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
@@ -27,6 +27,8 @@ const { createNetToolsHandler, createEnhancedDryRunCallback, validateWhoisAvaila
27
27
  const { loadComparisonRules, filterUniqueRules } = require('./lib/compare');
28
28
  // Colorize various text when used
29
29
  const { colorize, colors, messageColors, tags, formatLogMessage } = require('./lib/colorize');
30
+ // Enhanced mouse interaction and page simulation
31
+ const { performPageInteraction, createInteractionConfig } = require('./lib/interaction');
30
32
  // Domain detection cache for performance optimization
31
33
  const { createGlobalHelpers, getTotalDomainsSkipped, getDetectedDomainsCount } = require('./lib/domain-cache');
32
34
  // Enhanced redirect handling
@@ -35,7 +37,7 @@ const { navigateWithRedirectHandling, handleRedirectTimeout } = require('./lib/r
35
37
  const { monitorBrowserHealth, isBrowserHealthy } = require('./lib/browserhealth');
36
38
 
37
39
  // --- Script Configuration & Constants ---
38
- const VERSION = '1.0.44'; // Script version
40
+ const VERSION = '1.0.46'; // Script version
39
41
 
40
42
  // get startTime
41
43
  const startTime = Date.now();
@@ -390,6 +392,7 @@ Redirect Handling Options:
390
392
  interact: true/false Simulate mouse movements/clicks
391
393
  isBrave: true/false Spoof Brave browser detection
392
394
  userAgent: "chrome"|"firefox"|"safari" Custom desktop User-Agent
395
+ interact_intensity: "low"|"medium"|"high" Interaction simulation intensity (default: medium)
393
396
  delay: <milliseconds> Delay after load (default: 4000)
394
397
  reload: <number> Reload page n times after load (default: 1)
395
398
  forcereload: true/false Force an additional reload after reloads
@@ -429,6 +432,10 @@ FlowProxy Protection Options:
429
432
  Advanced Options:
430
433
  evaluateOnNewDocument: true/false Inject fetch/XHR interceptor in page (for this site)
431
434
  cdp: true/false Enable CDP logging for this site Inject fetch/XHR interceptor in page
435
+ interact_duration: <milliseconds> Duration of interaction simulation (default: 2000)
436
+ interact_scrolling: true/false Enable scrolling simulation (default: true)
437
+ interact_clicks: true/false Enable element clicking simulation (default: false)
438
+ interact_typing: true/false Enable typing simulation (default: false)
432
439
  whois: ["term1", "term2"] Check whois data for ALL specified terms (AND logic)
433
440
  whois-or: ["term1", "term2"] Check whois data for ANY specified term (OR logic)
434
441
  whois_server_mode: "random" or "cycle" Server selection mode: random (default) or cycle through list
@@ -1927,6 +1934,9 @@ function setupFrameHandling(page, forceDebug) {
1927
1934
 
1928
1935
  const interactEnabled = siteConfig.interact === true;
1929
1936
 
1937
+ // Create optimized interaction configuration for this site
1938
+ const interactionConfig = createInteractionConfig(currentUrl, siteConfig);
1939
+
1930
1940
  // --- Runtime CSS Element Blocking (Fallback) ---
1931
1941
  // Apply CSS blocking after page load as a fallback in case evaluateOnNewDocument didn't work
1932
1942
  if (cssBlockedSelectors && Array.isArray(cssBlockedSelectors) && cssBlockedSelectors.length > 0) {
@@ -2080,12 +2090,8 @@ function setupFrameHandling(page, forceDebug) {
2080
2090
 
2081
2091
  if (interactEnabled && !disableInteract) {
2082
2092
  if (forceDebug) console.log(formatLogMessage('debug', `interaction simulation enabled for ${currentUrl}`));
2083
- const randomX = Math.floor(Math.random() * 500) + 50;
2084
- const randomY = Math.floor(Math.random() * 500) + 50;
2085
- await page.mouse.move(randomX, randomY, { steps: 10 });
2086
- await page.mouse.move(randomX + 50, randomY + 50, { steps: 15 });
2087
- await page.mouse.click(randomX + 25, randomY + 25);
2088
- await page.hover('body');
2093
+ // Use enhanced interaction module
2094
+ await performPageInteraction(page, currentUrl, interactionConfig, forceDebug);
2089
2095
  }
2090
2096
 
2091
2097
  const delayMs = siteConfig.delay || 4000;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fanboynz/network-scanner",
3
- "version": "1.0.44",
3
+ "version": "1.0.46",
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": {