2025/3/23 14:17:37
当前为
// ==UserScript== // @name Bypass CDP Detection // @namespace http://fulicat.com // @author Jack.Chan ([email protected]) // @version 1.0.0 // @run-at document-start // @match *://*/* // @match file:///* // @grant none // @description 2025/3/23 14:17:37 // @license MIT // ==/UserScript== ;(function() { var originalError = Error; // Lock down the stack property on Error.prototype to prevent modification Object.defineProperty(Error.prototype, 'stack', { configurable: false, enumerable: true, writable: false, value: (function() { try { throw new originalError(); } catch (e) { return e.stack; } })() }); // Proxy the Error constructor to prevent any instance-specific stack modifications window.Error = new Proxy(originalError, { construct(target, args) { var instance = new target(...args); // Freeze the instance to prevent any modifications return Object.freeze(instance); } }); // alert('bypass_CDP_detection injected'); })();