反調試代碼調試死機代碼禁止F12代碼


反調試代碼調試死機代碼禁止F12代碼

 // 反調試函數,參數:開關,執行代碼
 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>

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM