@fanboynz/network-scanner 1.0.83 → 1.0.84
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 +2 -2
- package/package.json +1 -1
- package/regex-samples.md +132 -6
package/nwss.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// === Network scanner script (nwss.js) v1.0.
|
|
1
|
+
// === Network scanner script (nwss.js) v1.0.84 ===
|
|
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
|
|
@@ -123,7 +123,7 @@ const { navigateWithRedirectHandling, handleRedirectTimeout } = require('./lib/r
|
|
|
123
123
|
const { monitorBrowserHealth, isBrowserHealthy } = require('./lib/browserhealth');
|
|
124
124
|
|
|
125
125
|
// --- Script Configuration & Constants ---
|
|
126
|
-
const VERSION = '1.0.
|
|
126
|
+
const VERSION = '1.0.84'; // Script version
|
|
127
127
|
|
|
128
128
|
// get startTime
|
|
129
129
|
const startTime = Date.now();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fanboynz/network-scanner",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.84",
|
|
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": {
|
package/regex-samples.md
CHANGED
|
@@ -1,10 +1,130 @@
|
|
|
1
|
-
|
|
1
|
+
# EasyPrivacy Generic Strings - JSON Regex Conversion
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Tracking and analytics patterns converted to JSON-safe regex. Always validate before using.
|
|
4
|
+
|
|
5
|
+
Test patterns at:
|
|
4
6
|
* https://regex101.com/
|
|
5
7
|
* https://regexr.com/
|
|
6
8
|
|
|
7
|
-
|
|
9
|
+
## Event & Impression Tracking
|
|
10
|
+
|
|
11
|
+
| Pattern | JSON Regex |
|
|
12
|
+
|:--------|:-----------|
|
|
13
|
+
| `&EventType=DataDealImpression&` | `&EventType=DataDealImpression&` |
|
|
14
|
+
| `?logType=impression&` | `\\?logType=impression&` |
|
|
15
|
+
| `?groupType=engagement&eventType=CLICK&` | `\\?groupType=engagement&eventType=CLICK&` |
|
|
16
|
+
| `?type=page&event=` | `\\?type=page&event=` |
|
|
17
|
+
| `?event=performancelogger:` | `\\?event=performancelogger:` |
|
|
18
|
+
| `*view*pixel&` | `.*view.*pixel&` |
|
|
19
|
+
|
|
20
|
+
## Script Files & Resources
|
|
21
|
+
|
|
22
|
+
| Pattern | JSON Regex |
|
|
23
|
+
|:--------|:-----------|
|
|
24
|
+
| `-adobeDatalayer_bridge.js` | `-adobeDatalayer_bridge\\.js` |
|
|
25
|
+
| `_chartbeat.js` | `_chartbeat\\.js` |
|
|
26
|
+
| `/owa.tracker-combined-min.js` | `\\/owa\\.tracker-combined-min\\.js` |
|
|
27
|
+
| `.v4.analytics.` | `\\.v4\\.analytics\\.` |
|
|
28
|
+
| `/vli-platform/adb-analytics@` | `\\/vli-platform\\/adb-analytics@` |
|
|
29
|
+
|
|
30
|
+
## Tracking Endpoints
|
|
31
|
+
|
|
32
|
+
| Pattern | JSON Regex |
|
|
33
|
+
|:--------|:-----------|
|
|
34
|
+
| `.com/track?v=` | `\\.com\\/track\\?v=` |
|
|
35
|
+
| `/track?cb=` | `\\/track\\?cb=` |
|
|
36
|
+
| `/track.gif?data=` | `\\/track\\.gif\\?data=` |
|
|
37
|
+
| `/track_framework_metrics?` | `\\/track_framework_metrics\\?` |
|
|
38
|
+
| `/track/pageview?` | `\\/track\\/pageview\\?` |
|
|
39
|
+
| `-click-tracker.` | `-click-tracker\\.` |
|
|
40
|
+
|
|
41
|
+
## Service & Tracking IDs
|
|
42
|
+
|
|
43
|
+
| Pattern | JSON Regex |
|
|
44
|
+
|:--------|:-----------|
|
|
45
|
+
| `.svc/?tracking_id=` | `\\.svc\\/\\?tracking_id=` |
|
|
46
|
+
| `/get_site_data?requestUUID=` | `\\/get_site_data\\?requestUUID=` |
|
|
47
|
+
| `/ns.html?id=GTM-` | `\\/ns\\.html\\?id=GTM-` |
|
|
48
|
+
| `/tag/proxy?id=G-` | `\\/tag\\/proxy\\?id=G-` |
|
|
49
|
+
| `/sk-park.php?pid=` | `\\/sk-park\\.php\\?pid=` |
|
|
50
|
+
|
|
51
|
+
## PHP Action Parameters
|
|
52
|
+
|
|
53
|
+
| Pattern | JSON Regex |
|
|
54
|
+
|:--------|:-----------|
|
|
55
|
+
| `.php?action=browse&` | `\\.php\\?action=browse&` |
|
|
56
|
+
| `.php?action_name=` | `\\.php\\?action_name=` |
|
|
57
|
+
| `_stat.php?referer=` | `_stat\\.php\\?referer=` |
|
|
58
|
+
| `/pagelogger/connector.php?` | `\\/pagelogger\\/connector\\.php\\?` |
|
|
59
|
+
|
|
60
|
+
## Analytics & Performance
|
|
61
|
+
|
|
62
|
+
| Pattern | JSON Regex |
|
|
63
|
+
|:--------|:-----------|
|
|
64
|
+
| `/?essb_counter_` | `\\/\\?essb_counter_` |
|
|
65
|
+
| `/_i?referral_url=` | `\\/_i\\?referral_url=` |
|
|
66
|
+
| `/?livehit=` | `\\/\\?livehit=` |
|
|
67
|
+
| `/__ssobj/rum?` | `\\/__ssobj\\/rum\\?` |
|
|
68
|
+
| `/analytics/?event=` | `\\/analytics\\/\\?event=` |
|
|
69
|
+
| `/analytics/visit.php` | `\\/analytics\\/visit\\.php` |
|
|
70
|
+
| `/wpstatistics/v1/hit?` | `\\/wpstatistics\\/v1\\/hit\\?` |
|
|
71
|
+
|
|
72
|
+
## Logging & Experiments
|
|
73
|
+
|
|
74
|
+
| Pattern | JSON Regex |
|
|
75
|
+
|:--------|:-----------|
|
|
76
|
+
| `/?log=experiment&` | `\\/\\?log=experiment&` |
|
|
77
|
+
| `/?log=performance-` | `\\/\\?log=performance-` |
|
|
78
|
+
| `?log=stats-` | `\\?log=stats-` |
|
|
79
|
+
| `?log=xhl-widgets-events&` | `\\?log=xhl-widgets-events&` |
|
|
80
|
+
| `/_/_/logClientError/` | `\\/_\\/_\\/logClientError\\/` |
|
|
81
|
+
| `/hits/logger?` | `\\/hits\\/logger\\?` |
|
|
82
|
+
|
|
83
|
+
## Pixel & Image Tracking
|
|
84
|
+
|
|
85
|
+
| Pattern | JSON Regex |
|
|
86
|
+
|:--------|:-----------|
|
|
87
|
+
| `/anonymous_user_guid.gif?` | `\\/anonymous_user_guid\\.gif\\?` |
|
|
88
|
+
| `/0.gif?` | `\\/0\\.gif\\?` |
|
|
89
|
+
| `_c.gif?c=` | `_c\\.gif\\?c=` |
|
|
90
|
+
| `/urchin.html?` | `\\/urchin\\.html\\?` |
|
|
91
|
+
|
|
92
|
+
## Counters & Views
|
|
93
|
+
|
|
94
|
+
| Pattern | JSON Regex |
|
|
95
|
+
|:--------|:-----------|
|
|
96
|
+
| `/ViewCounter/` | `\\/ViewCounter\\/` |
|
|
97
|
+
| `/prod/ping?` | `\\/prod\\/ping\\?` |
|
|
98
|
+
|
|
99
|
+
## DataLayer & Google Analytics
|
|
100
|
+
|
|
101
|
+
| Pattern | JSON Regex |
|
|
102
|
+
|:--------|:-----------|
|
|
103
|
+
| `?[AQB]&ndh=1&t=` | `\\?[AQB]&ndh=1&t=` |
|
|
104
|
+
| `&l=dataLayer&cx=c` | `&l=dataLayer&cx=c` |
|
|
105
|
+
|
|
106
|
+
## Common Variations & Wildcards
|
|
107
|
+
|
|
108
|
+
| Pattern Type | Example | JSON Regex |
|
|
109
|
+
|:-------------|:--------|:-----------|
|
|
110
|
+
| **Any tracking script** | `*track*.js` | `.*track.*\\.js` |
|
|
111
|
+
| **Any analytics path** | `/*/analytics/*` | `\\/.*\\/analytics\\/.*` |
|
|
112
|
+
| **Any pixel tracking** | `*.gif?*` | `.*\\.gif\\?.*` |
|
|
113
|
+
| **Any log parameter** | `?*log*=*` | `\\?.*log.*=.*` |
|
|
114
|
+
| **Any event parameter** | `?*event*=*` | `\\?.*event.*=.*` |
|
|
115
|
+
|
|
116
|
+
## Advanced Patterns
|
|
117
|
+
|
|
118
|
+
| Use Case | Pattern | JSON Regex |
|
|
119
|
+
|:---------|:--------|:-----------|
|
|
120
|
+
| **Multiple parameters** | `?param1=value¶m2=` | `\\?param1=value¶m2=` |
|
|
121
|
+
| **Optional parameters** | `/path?optional_param` | `\\/path\\?.*optional_param` |
|
|
122
|
+
| **Subdomain tracking** | `tracking.*.com/` | `tracking\\..+\\.com\\/` |
|
|
123
|
+
| **Version in path** | `/v1/track` or `/v2/track` | `\\/v[0-9]+\\/track` |
|
|
124
|
+
| **Hash-based IDs** | `/track?id=abc123` | `\\/track\\?id=[a-zA-Z0-9]+` |
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
| Pattern | JSON Regex |
|
|
8
128
|
|:---------------------------|:------------|
|
|
9
129
|
| `/api/test/` | `\\/api\\/test\\/` |
|
|
10
130
|
| `/rto.js` | `\\/rto\\.js` |
|
|
@@ -18,10 +138,16 @@ Validate using;
|
|
|
18
138
|
| `abcdefghjk.top/` | `^https?:\\/\\/[a-z]{8,19}\\.top\\/$` |
|
|
19
139
|
| `abcdefghjk.top/*` | `^https?:\\/\\/[a-z]{8,19}\\.top\\/.*$` |
|
|
20
140
|
| `abcdefghjk.top/com` | `^https?:\\/\\/[a-z]{8,19}\\.(top\|com)\\/$` |
|
|
21
|
-
| `abcdefghjk.top com/*` | `^https?:\\/\\/[a-z]{8,19}\\.(top\|com)\\/.*$` |
|
|
22
141
|
| `.net/bar/` | `\\.net\\/bar\\/` |
|
|
23
142
|
| `&test_me=` | `&test_me=` |
|
|
24
143
|
| `/new/` `/test/` | `\\/(new\|test)\\/` |
|
|
25
|
-
| `.com` or `.net` | `\\.(com\|net)\\/` |
|
|
26
|
-
|
|
144
|
+
| `.com` or `.net` | `\\.(com\|net)\\/` |
|
|
27
145
|
|
|
146
|
+
## Notes
|
|
147
|
+
- Use `.*` for wildcard matching (matches any characters)
|
|
148
|
+
- Escape dots: `.` ? `\\.`
|
|
149
|
+
- Escape slashes: `/` ? `\\/`
|
|
150
|
+
- Escape question marks: `?` ? `\\?`
|
|
151
|
+
- Use `[a-zA-Z0-9]` for alphanumeric characters
|
|
152
|
+
- Use `+` for one or more characters
|
|
153
|
+
- Use `*` after `.` for zero or more characters
|