แจกสคริปป้องกัน f12 หรือโหมด DevTool

เริ่มโดย virussman, 16 เมษายน 2024, 20:26:07

หัวข้อก่อนหน้า - หัวข้อถัดไป

0 สมาชิก และ 1 ผู้มาเยือน กำลังดูหัวข้อนี้

virussman

แจกสคริปป้องกัน f12 หรือป้องกันโหมด DevTool , detectDevTool 

How to disable browser developer tools.

สำหรับเว็บคลิป,หนัง,หรือเว็บทั่วไป

<script>
!function() {
  function detectDevTool(allow) {
    if(isNaN( allow)) allow = 100;
    var start =  new Date();
    debugger;
    var end =  new Date();
    if(isNaN(start) || isNaN(end) || end - start > allow) {
       
      document.location.href="https://โดเมนที่ต้องการให้วิ่งไปหากยังเปิดDevToolอยู่ไม่ปิด/"
    }
  }
  if(window.attachEvent) {
    if (document.readyState === "complete" || document.readyState === "interactive") {
        detectDevTool();
      window.attachEvent('onresize', detectDevTool);
      window.attachEvent('onmousemove', detectDevTool);
      window.attachEvent('onfocus', detectDevTool);
      window.attachEvent('onblur', detectDevTool);
    } else {
        setTimeout(argument.callee, 0);
    }
  } else {
    window.addEventListener('load', detectDevTool);
    window.addEventListener('resize', detectDevTool);
    window.addEventListener('mousemove', detectDevTool);
    window.addEventListener('focus', detectDevTool);
    window.addEventListener('blur', detectDevTool);
  }
}();
</script>


ลองนำไปทดลองกันดูครับ เอาใส่ใน <head> ไปเลย   :wanwan012:

ป้องกันระดับทั่วไปได้  แต่ไม่มีอะไรสามารถป้องกันระดับมือโปรได้นะครับ  ก็ให้ยากไว้ก่อนแหละดี   :P
งดรับงาน

vii

มันไม่ได้กันอะไรเลยนะครับ.

https://www.w3schools.com/js/js_debugging.asp
อ้างถึงThe debugger Keyword

The debugger keyword stops the execution of JavaScript, and calls (if available) the debugging function.

This has the same function as setting a breakpoint in the debugger.

If no debugging is available, the debugger statement has no effect.

With the debugger turned on, this code will stop executing before it executes the third line.


https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/debugger?retiredLocale=th
อ้างถึงWhen the debugger is invoked, execution is paused at the debugger statement. It is like a breakpoint in the script source.


การทำงานมันก็แค่ทำให้สคริปต์ (JS) หยุดทำงานต่อตรงบรรทัดนั้น เท่านั้นเอง. เมื่อผู้ใช้กด ข้ามเพื่อให้ JS ทำงานขั้นต่อไป หรือกดเพลย์แล้วเท่านั้นแหละ มันถึงจะเริ่ม redirect แต่ถ้าผู้ใช้ไม่กดทั้งสองปุ่มนี้ซะอย่าง มันก็คือเปิด developer tool, debugging tool ธรรมดาๆเลยไม่ได้กันอะไร ก็มองเห็นเหมือนเดิมครับ.

kittipongint

ขอบคุณสำหรับการแบ่งปันความรู้ครับ
แต่สำหรับสาย SEO แนะนำว่าไม่จำเป็นจริงๆ ก็ไม่ต้องใส่ script ที่ไม่มีประโยชน์โดยตรงกับ content ครับ เพราะจะทำให้ script มีขนาดเพิ่มขึ้น

ivar

[direct=https://www.binance.com/th/register?ref=YA8W3LSJ]เทรด Bitcoin ที่ Binance พร้อมรับโบนัส 10%
[/direct]
[direct=https://www.hostneverdie.com/support/aff.php?aff=3918][/direct]



koungster

[direct=https://www.9mover.com]รถขนของ[/direct]
[direct=https://www.vcango.com]รถหกล้อรับจ้าง[/direct]

SpaRK

สุดยอดคับ กันได้จริงคับ หามานานมาก
รับซื้อเว็บมืองสอง เลิกกิจการเว็บไปต่อไม่ไหว เรารับซื้อเว็บทุกชนิด เว็บมือสอง เว็บร้าง ให้ราคาตามสภาพ เว็บที่มีทราฟิคครับซื้อไม่อั้น ประเมินราคาได้ตลอด เลิกกิจการ แอดเซนต์ youtube รับซื้อ

helloweentz




wookky

[direct=https://shorturl.at/YUwv0]Forex Broker ฝาก-ถอนเงินง่ายและรวดเร็วที่สุด[/direct]

[direct=https://shorturl.at/Wb0xU]Hosting โฮสนอกดีมาก ถูก เร็ว แรง ประหยัดสุดๆ[/direct]