forked from kajweb/stop-debugger
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathextensionSetSingle.html
More file actions
137 lines (137 loc) · 5.48 KB
/
extensionSetSingle.html
File metadata and controls
137 lines (137 loc) · 5.48 KB
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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
<!DOCTYPE html>
<html>
<head>
<title>多种debugger的情况(单文件版)</title>
<link rel="stylesheet" type="text/css" href="./extensionSet.css" />
</head>
<body>
<h1>(单文件版)请打开chrome dev进行调试,<a href="extensionSet.html">复合文件版</a></h1>
<p>本页面展示多种debugger的情况,内容与<a href="https://github.com/kajweb/stop-debugger">github://kajweb/stop-debugger</a>一致</p>
<div class="main-aera">
<p class="bindTap">0、不带分号的debugger</p>
<p class="bindTap">1、带分号的debugger</p>
<p class="bindTap">2、(多语句)后面还带语句的debugger</p>
<p class="bindTap">3、(多语句)前面、后面还带语句的debugger</p>
<p class="bindTap">4、(多语句)前面还带语句的debugger</p>
<p class="bindTap">5、使用Function生成的debugger</p>
<p class="bindTap">6、使用Function生成的多参数debugger</p>
<p class="bindTap">7、预防简单的检测</p>
<p class="bindTap">8、使用eval执行debugger</p>
<p class="bindTap">9、使用Function.prototype.constructor执行debugger</p>
<p class="bindTap">10、使用Function.prototype.constructor执行debugger(经过混淆)</p>
</div>
</body>
<script type="text/javascript">
let bindTap = document.getElementsByClassName("bindTap");
for (let i = 0; i < bindTap.length; i++) {
let clicker = bindTap[i];
switch (i) {
case 0:
clicker.addEventListener("click", () => {
console.log("不带分号的debugger");
let a = 1,
b = 2;
debugger
let c = a + b;
console.log(c)
})
break;
case 1:
clicker.addEventListener("click", () => {
console.log("带分号的debugger");
let a = 1,
b = 2;
debugger;
let c = a + b;
console.log(c)
})
break;
case 2:
clicker.addEventListener("click", () => {
console.log("(多语句)后面还带语句的debugger");
let a = 1,
b = 2;
debugger;
let c = a + b;
console.log(c)
})
break;
case 3:
clicker.addEventListener("click", () => {
console.log("(多语句)前面、后面还带语句的debugger");
let a = 1,
b = 2;
debugger;
let c = a + b;
console.log(c)
})
break;
case 4:
clicker.addEventListener("click", () => {
console.log("(多语句)前面还带语句的debugger");
let a = 1,
b = 2;
debugger
let c = a + b;
console.log(c)
})
break;
case 5:
clicker.addEventListener("click", () => {
console.log("使用Function生成的debugger");
let fn = new Function("debu" + "gger");
fn()
console.log("尝试运行")
})
break;
case 6:
clicker.addEventListener("click", () => {
console.log("使用Function生成的多参数debugger");
let fn = new Function("x", "debugger");
fn()
console.log("尝试运行")
})
break;
case 7:
clicker.addEventListener("click", () => {
console.log("预防简单的检测");
let a = ";debugger;"
if (a !== ";debug" + "ger;") {
console.log("用户行为异常")
}
debugger
console.log("如无提示异常,则验证通过")
})
break;
case 8:
clicker.addEventListener("click", () => {
console.log("使用eval执行debugger");
eval("debugger");
console.log("运行完毕")
})
break;
case 9:
clicker.addEventListener("click", () => {
console.log("使用Function.prototype.constructor执行debugger");
Function.prototype.constructor("debugger")()
console.log("运行完毕")
})
break;
case 10:
clicker.addEventListener("click", () => {
console.log("使用Function.prototype.constructor执行debugger(经过混淆)");
function xhs__0x4f79(x){switch(x){case"0x1e3":return"constructor";case"0x5c6":return"vyxZy";case"0x5ca":return"wcluU";case"0x5d0":return"tOyvN";default:throw new RangeError(x)}}var _0x2764ed={wcluU:"debu",tvBGO:"gger",tOyvN:"action",vyxZy:function(x,e){return x+e}};(function(){})[xhs__0x4f79("0x1e3")](_0x2764ed[xhs__0x4f79("0x5c6")](_0x2764ed[xhs__0x4f79("0x5ca")],_0x2764ed.tvBGO)).call(_0x2764ed[xhs__0x4f79("0x5d0")]);
console.log("运行完毕")
})
break;
default:
clicker.addEventListener("click", () => {
console.log("系统错误", i);
console.log("系统错误" + i)
throw new RangeError("系统错误" + i);
})
break;
}
}
</script>
</html>