-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e80cff9
commit c9e1637
Showing
8 changed files
with
140 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
# debugger-terminator | ||
debugger terminator | ||
几种前端反调试方法测试 | ||
|
||
实例均来源与互联网 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
setInterval(function () { debugger }, 100); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) | ||
})(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | ||
})(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |