Skip to content

Commit

Permalink
init project.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaywcjlove committed Jan 20, 2021
1 parent e80cff9 commit c9e1637
Show file tree
Hide file tree
Showing 8 changed files with 140 additions and 2 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
# debugger-terminator
debugger terminator
几种前端反调试方法测试

实例均来源与互联网
70 changes: 70 additions & 0 deletions endebug.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<script>
function endebug(off, code) {
if (!off) {
!function(e) {
function n(e) {
function n() {
return u;
}

function o() {
window.Firebug && window.Firebug.chrome && window.Firebug.chrome.isInitialized ? t("on") : (a = "off", console.log(d), console.clear(), t(a));
}

function t(e) {
u !== e && (u = e, "function" == typeof c.onchange && c.onchange(e));
}

function r() {
l || (l = !0, window.removeEventListener("resize", o), clearInterval(f));
}
"function" == typeof e && (e = {
onchange: e
});
var i = (e = e || {}).delay || 500,
c = {};
c.onchange = e.onchange;
var a, d = new Image;
d.__defineGetter__("id", function() {
a = "on"
});
var u = "unknown";
c.getStatus = n;
var f = setInterval(o, i);
window.addEventListener("resize", o);
var l;
return c.free = r, c;
}
var o = o || {};
o.create = n, "function" == typeof define ? (define.amd || define.cmd) && define(function() { return o }) : "undefined" != typeof module && module.exports ? module.exports = o : window.jdetects = o
}(), jdetects.create(function(e) {
var a = 0;
var n = setInterval(function() {
if ("on" == e) {
setTimeout(function() {
if (a == 0) {
a = 1;
setTimeout(code);
}
}, 200);
}
}, 100);
})
}
}
endebug(false, function() {
// 非法调试执行的代码(不要使用控制台输出的提醒)
document.write("检测到非法调试,请关闭后刷新重试!");
});
</script>
</head>
<body>

</body>
</html>
12 changes: 12 additions & 0 deletions loop-debugger.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Debugger</title>
<script src="./loop-debugger.js"></script>
</head>
<body>
<div id="devtool-status"></div>
</body>
</html>
1 change: 1 addition & 0 deletions loop-debugger.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
setInterval(function () { debugger }, 100);
11 changes: 11 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"name": "debugger-terminator",
"version": "1.0.0",
"description": "debugger terminator",
"repository": {
"type": "git",
"url": "git+https://github.com/jaywcjlove/debugger-terminator.git"
},
"author": "",
"license": "MIT"
}
14 changes: 14 additions & 0 deletions status-chrome.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
(function () {
var checkStatus;
var element = new Image();
Object.defineProperty(element, 'id', {
get:function() {
checkStatus='on';
}
});
setInterval(function() {
checkStatus = 'off';
console.debug(element);
document.querySelector('#chrome').innerHTML = checkStatus;
}, 1000)
})();
12 changes: 12 additions & 0 deletions status-firefox.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
;(function() {
let checkStatus;
let devtools = /./;
devtools.toString = function() {
checkStatus = 'on';
}
setInterval(function() {
checkStatus = 'off';
console.log(devtools);
document.querySelector('#firefox').innerHTML = checkStatus;
}, 1000);
})();
17 changes: 17 additions & 0 deletions status.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Debugger Status</title>
<script src="./status-chrome.js"></script>
<script src="./status-firefox.js"></script>
</head>
<body>
<h3>Test in Chrome</h3>
<div id="chrome"></div>
<hr />
<h3>Test in Firefox</h3>
<div id="firefox"></div>
</body>
</html>

0 comments on commit c9e1637

Please sign in to comment.