A library dedicated to anti-debugging of js (non-original)

This is a library for anti-debugging JavaScript, the code of this library must not be used for any illegal purpose. If you decide to use this library, you are responsible for its possible consequences.

Script này sẽ không được không được cài đặt trực tiếp. Nó là một thư viện cho các script khác để bao gồm các chỉ thị meta // @require https://update.greasyfork.org/scripts/432691/1039908/A%20library%20dedicated%20to%20anti-debugging%20of%20js%20%28non-original%29.js

  1. (function(){
  2. //window.eva=eval;
  3. var debugflag = false;
  4. window.onload=function () {
  5. if (window.outerWidth - window.innerWidth > 210 ||window.outerHeight - window.innerHeight > 210) {
  6. try{
  7. $('#body').html('1检测到非法调试, 请关闭调试终端后刷新本页面重试!<br/>Welcome for People, Not Welcome for Machine!<br/>');
  8. debugflag = true;
  9. }catch(e){}
  10. }
  11. const handler = setInterval(() => {
  12. if (window.outerWidth - window.innerWidth > 210 ||window.outerHeight - window.innerHeight > 210) {
  13. try{
  14. document.querySelector('html').innerHTML='2检测到非法调试, 请关闭调试终端后刷新本页面重试!<br/>Welcome for People, Not Welcome for Machine!<br/>';
  15. debugflag = true;
  16. }catch(e){}
  17. }
  18. const before = new Date();
  19. (function() {}
  20. ["constructor"]("debugger")())
  21. const after = new Date();
  22. const cost = after.getTime() - before.getTime();
  23. if (cost > 50) {
  24. debugflag = true;
  25. try{
  26. document.write('3检测到非法调试,请关闭调试终端后刷新本页面重试!<br/>Welcome for People, Not Welcome for Machine!<br/>');
  27. }catch(e){}
  28. }
  29. }, 1000)
  30. };
  31.  
  32. })()
  33.