// 反調試函數,參數:開關,執行代碼
function siji(){
var total="";
for (var i=0;i<1000000;i++){
total= total+i.toString();
history.pushState(0,0,total);
} //死機代碼
//location.href="http://strjson.com"; //跳轉網站
//xyplay.echo("<br><br><br>檢測到非法調試,請關閉后刷新重試!"); //用戶窗口顯示信息
//setInterval("debugger;console.log(\'請勿非法調試,購買請聯系QQ:8888686\');"); //調試窗口顯示信息
}
//檢測調試代碼
<script>//禁止右鍵
function click(e) {
if (document.all) {
if (event.button==2||event.button==3) { alert("禁止惡意拿代碼的");
oncontextmenu='return false';
}
}
if (document.layers) {
if (e.which == 3) {
oncontextmenu='return false';
}
}
}
if (document.layers) {
document.captureEvents(Event.MOUSEDOWN);
}
document.onmousedown=click;
document.oncontextmenu = new Function("return false;")
document.onkeydown =document.onkeyup = document.onkeypress=function(){
if(window.event.keyCode == 12) {
window.event.returnValue=false;
return(false);
}
}
</script>
<script>//禁止F12
function fuckyou(){
window.close(); //關閉當前窗口(防抽)
window.location="about:blank"; //將當前窗口跳轉置空白頁
}
function click(e) {
if (document.all) {
if (event.button==2||event.button==3) {
alert("禁止惡意拿代碼的");
oncontextmenu='return false';
}
}
if (document.layers) {
if (e.which == 3) {
oncontextmenu='return false';
}
}
}
if (document.layers) {
fuckyou();
document.captureEvents(Event.MOUSEDOWN);
}
document.onmousedown=click;
document.oncontextmenu = new Function("return false;")
document.onkeydown =document.onkeyup = document.onkeypress=function(){
if(window.event.keyCode == 123) {
fuckyou();
window.event.returnValue=false;
return(false);
}
}
</script>