brave-real-playwright-core 1.57.0-patch.10 → 1.57.0-patch.12

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/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # 🦁 brave-real-playwright-core v1.57.0-patch.10
1
+ # 🦁 brave-real-playwright-core v1.57.0-patch.12
2
2
 
3
3
  **Based on Playwright Core v1.57.0**
4
4
 
@@ -48,7 +48,7 @@ await page.goto('https://bot-detector.rebrowser.net/');
48
48
 
49
49
  - **playwright-core**: v1.57.0
50
50
  - **rebrowser-patches**: Latest stealth optimizations
51
- - **Brave optimization**: v1.57.0-patch.10
51
+ - **Brave optimization**: v1.57.0-patch.12
52
52
 
53
53
  ## 🔗 Links
54
54
 
@@ -5,7 +5,7 @@
5
5
  timingRange: '1-5ms',
6
6
  stealthLevel: 'professional',
7
7
  engine: 'playwright',
8
- braveVersion: '1.57.0-patch.10',
8
+ braveVersion: '1.57.0-patch.12',
9
9
  features: {
10
10
  performanceOptimization: true,
11
11
  navigatorSpoofing: true,
@@ -175,18 +175,9 @@
175
175
  configurable: true
176
176
  });
177
177
 
178
- // Remove chrome runtime detection
179
- if (window.chrome) {
180
- if (window.chrome.runtime) {
181
- delete window.chrome.runtime;
182
- }
183
- if (window.chrome.loadTimes) {
184
- delete window.chrome.loadTimes;
185
- }
186
- if (window.chrome.csi) {
187
- delete window.chrome.csi;
188
- }
189
- }
178
+ // NOTE: Do NOT delete window.chrome.runtime - ReCaptcha V3 needs it!
179
+ // Keeping chrome object intact for better ReCaptcha scores
180
+ // Previously this code was deleting chrome.runtime which caused low ReCaptcha scores
190
181
 
191
182
  // Spoof permissions API
192
183
  if (navigator.permissions && navigator.permissions.query) {
@@ -543,13 +534,18 @@
543
534
 
544
535
  // Aggressively delete existing userAgentData
545
536
  try {
546
- delete Navigator.prototype.userAgentData;
547
- } catch {}
537
+ // Try to delete from prototype
538
+ if (Navigator.prototype.userAgentData) {
539
+ delete Navigator.prototype.userAgentData;
540
+ }
541
+ } catch (e) { console.log('[stealth] Failed to delete proto userAgentData:', e.message); }
542
+
548
543
  try {
549
- if (navigator.hasOwnProperty('userAgentData')) {
544
+ // Try to delete from instance
545
+ if (navigator.hasOwnProperty('userAgentData') || 'userAgentData' in navigator) {
550
546
  delete navigator.userAgentData;
551
547
  }
552
- } catch {}
548
+ } catch (e) { console.log('[stealth] Failed to delete instance userAgentData:', e.message); }
553
549
 
554
550
  const userAgentDataInstance = {
555
551
  brands: [
@@ -585,11 +581,53 @@
585
581
  }
586
582
  };
587
583
 
588
- Object.defineProperty(Navigator.prototype, 'userAgentData', {
589
- get: () => userAgentDataInstance,
590
- configurable: false,
591
- enumerable: true
592
- });
584
+ try {
585
+ // Define on INSTANCE directly (more reliable)
586
+ Object.defineProperty(navigator, 'userAgentData', {
587
+ get: () => userAgentDataInstance,
588
+ configurable: false,
589
+ enumerable: true
590
+ });
591
+ console.log('[stealth] userAgentData injected successfully on navigator instance');
592
+ } catch (e) {
593
+ console.error('[stealth] FAILED to inject userAgentData on instance:', e.message);
594
+
595
+ // Fallback to prototype
596
+ try {
597
+ Object.defineProperty(Navigator.prototype, 'userAgentData', {
598
+ get: () => userAgentDataInstance,
599
+ configurable: false,
600
+ enumerable: true
601
+ });
602
+ console.log('[stealth] userAgentData injected successfully on Navigator.prototype');
603
+ } catch (e2) {
604
+ console.error('[stealth] FAILED to inject userAgentData on prototype:', e2.message);
605
+ }
606
+ }
607
+
608
+ // AGGRESSIVE: Proxy navigator if possible
609
+ try {
610
+ // Only if direct injection failed or to be double sure
611
+ if (!navigator.userAgentData) {
612
+ const originalNavigator = navigator;
613
+ const proxyNavigator = new Proxy(originalNavigator, {
614
+ get(target, prop) {
615
+ if (prop === 'userAgentData') return userAgentDataInstance;
616
+ if (prop === 'userAgent') return bulletproofUserAgent;
617
+ return Reflect.get(target, prop);
618
+ }
619
+ });
620
+
621
+ try {
622
+ Object.defineProperty(window, 'navigator', {
623
+ get: () => proxyNavigator,
624
+ configurable: true,
625
+ enumerable: true
626
+ });
627
+ console.log('[stealth] Window.navigator proxied successfully');
628
+ } catch(e) {}
629
+ }
630
+ } catch(e) {}
593
631
  })();
594
632
 
595
633
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "brave-real-playwright-core",
3
- "version": "1.57.0-patch.10",
3
+ "version": "1.57.0-patch.12",
4
4
  "description": "Brave-optimized Playwright Core (v1.57.0) with comprehensive stealth patches and error stack sanitization",
5
5
  "keywords": [
6
6
  "playwright",
@@ -48,16 +48,16 @@
48
48
  ],
49
49
  "brave": {
50
50
  "optimized": true,
51
- "version": "1.57.0-patch.10",
51
+ "version": "1.57.0-patch.12",
52
52
  "basedOn": {
53
53
  "playwright-core": "1.57.0",
54
- "patches-version": "1.57.0-patch.10",
55
- "release-info": "Brave Playwright v1.57.0-patch.10 based on Playwright Core v1.57.0"
54
+ "patches-version": "1.57.0-patch.12",
55
+ "release-info": "Brave Playwright v1.57.0-patch.12 based on Playwright Core v1.57.0"
56
56
  },
57
57
  "versionInfo": {
58
- "braveVersion": "1.57.0-patch.10",
58
+ "braveVersion": "1.57.0-patch.12",
59
59
  "playwrightVersion": "1.57.0",
60
- "fullName": "Brave Playwright Core v1.57.0-patch.10 (Playwright 1.57.0)"
60
+ "fullName": "Brave Playwright Core v1.57.0-patch.12 (Playwright 1.57.0)"
61
61
  },
62
62
  "features": [
63
63
  "error-stack-sanitization",
@@ -139,18 +139,9 @@
139
139
  configurable: true
140
140
  });
141
141
 
142
- // Remove chrome runtime detection
143
- if (window.chrome) {
144
- if (window.chrome.runtime) {
145
- delete window.chrome.runtime;
146
- }
147
- if (window.chrome.loadTimes) {
148
- delete window.chrome.loadTimes;
149
- }
150
- if (window.chrome.csi) {
151
- delete window.chrome.csi;
152
- }
153
- }
142
+ // NOTE: Do NOT delete window.chrome.runtime - ReCaptcha V3 needs it!
143
+ // Keeping chrome object intact for better ReCaptcha scores
144
+ // Previously this code was deleting chrome.runtime which caused low ReCaptcha scores
154
145
 
155
146
  // Spoof permissions API
156
147
  if (navigator.permissions && navigator.permissions.query) {
@@ -507,13 +498,18 @@
507
498
 
508
499
  // Aggressively delete existing userAgentData
509
500
  try {
510
- delete Navigator.prototype.userAgentData;
511
- } catch {}
501
+ // Try to delete from prototype
502
+ if (Navigator.prototype.userAgentData) {
503
+ delete Navigator.prototype.userAgentData;
504
+ }
505
+ } catch (e) { console.log('[stealth] Failed to delete proto userAgentData:', e.message); }
506
+
512
507
  try {
513
- if (navigator.hasOwnProperty('userAgentData')) {
508
+ // Try to delete from instance
509
+ if (navigator.hasOwnProperty('userAgentData') || 'userAgentData' in navigator) {
514
510
  delete navigator.userAgentData;
515
511
  }
516
- } catch {}
512
+ } catch (e) { console.log('[stealth] Failed to delete instance userAgentData:', e.message); }
517
513
 
518
514
  const userAgentDataInstance = {
519
515
  brands: [
@@ -549,11 +545,53 @@
549
545
  }
550
546
  };
551
547
 
552
- Object.defineProperty(Navigator.prototype, 'userAgentData', {
553
- get: () => userAgentDataInstance,
554
- configurable: false,
555
- enumerable: true
556
- });
548
+ try {
549
+ // Define on INSTANCE directly (more reliable)
550
+ Object.defineProperty(navigator, 'userAgentData', {
551
+ get: () => userAgentDataInstance,
552
+ configurable: false,
553
+ enumerable: true
554
+ });
555
+ console.log('[stealth] userAgentData injected successfully on navigator instance');
556
+ } catch (e) {
557
+ console.error('[stealth] FAILED to inject userAgentData on instance:', e.message);
558
+
559
+ // Fallback to prototype
560
+ try {
561
+ Object.defineProperty(Navigator.prototype, 'userAgentData', {
562
+ get: () => userAgentDataInstance,
563
+ configurable: false,
564
+ enumerable: true
565
+ });
566
+ console.log('[stealth] userAgentData injected successfully on Navigator.prototype');
567
+ } catch (e2) {
568
+ console.error('[stealth] FAILED to inject userAgentData on prototype:', e2.message);
569
+ }
570
+ }
571
+
572
+ // AGGRESSIVE: Proxy navigator if possible
573
+ try {
574
+ // Only if direct injection failed or to be double sure
575
+ if (!navigator.userAgentData) {
576
+ const originalNavigator = navigator;
577
+ const proxyNavigator = new Proxy(originalNavigator, {
578
+ get(target, prop) {
579
+ if (prop === 'userAgentData') return userAgentDataInstance;
580
+ if (prop === 'userAgent') return bulletproofUserAgent;
581
+ return Reflect.get(target, prop);
582
+ }
583
+ });
584
+
585
+ try {
586
+ Object.defineProperty(window, 'navigator', {
587
+ get: () => proxyNavigator,
588
+ configurable: true,
589
+ enumerable: true
590
+ });
591
+ console.log('[stealth] Window.navigator proxied successfully');
592
+ } catch(e) {}
593
+ }
594
+ } catch(e) {}
557
595
  })();
558
596
 
559
597