-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathBypass_Debugger(Proxy).js
71 lines (62 loc) · 2.45 KB
/
Bypass_Debugger(Proxy).js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
// ==UserScript==
// @name Bypass_Debugger(Proxy)
// @namespace https://github.com/0xsdeo/Bypass_Debugger
// @version 2025-1-02
// @description Bypass new Function --> debugger && constructor --> debugger && eval --> debugger
// @author 0xsdeo
// @match http://*/*
// @icon data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==
// @grant none
// ==/UserScript==
(function () {
'use strict';
let temp_eval = eval;
let temp_toString = Function.prototype.toString;
Function.prototype.toString = function () {
if (this === eval) {
return 'function eval() { [native code] }';
} else if (this === Function) {
return 'function Function() { [native code] }';
} else if (this === Function.prototype.toString) {
return 'function toString() { [native code] }';
} else if (this === Function.prototype.constructor) {
return 'function Function() { [native code] }';
}
return temp_toString.apply(this, arguments);
}
window.eval = function () {
if (typeof arguments[0] == "string") {
arguments[0] = arguments[0].replaceAll(/debugger/g, '');
}
return temp_eval(...arguments);
}
let Bypass_debugger = Function;
Function.prototype.constructor = function () {
for (let i = 0; i < arguments.length; i++) {
if (typeof arguments[i] == "string") {
arguments[i] = arguments[i].replaceAll(/debugger/g, '');
}
}
return Bypass_debugger(...arguments);
}
Function.prototype.constructor.prototype = Function.prototype;
let handler = {
apply: function (target, thisArg, argumentsList) {
for (let i = 0; i < argumentsList.length; i++) {
if (typeof argumentsList[i] == "string") {
argumentsList[i] = argumentsList[i].replaceAll(/debugger/g, '');
}
}
return Bypass_debugger(...argumentsList);
},
construct: function (target, argumentsList, newTarget) {
for (let i = 0; i < argumentsList.length; i++) {
if (typeof argumentsList[i] == "string") {
argumentsList[i] = argumentsList[i].replaceAll(/debugger/g, '');
}
}
return Bypass_debugger(...argumentsList);
},
};
Function = new Proxy(Function, handler);
})();