@aientrophy/sdk 0.3.2 → 0.3.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{anti-debug-CZyDVzB-.js → anti-debug-BKoY0biY.js} +60 -20
- package/dist/anti-debug-JDCTbZps.cjs +1 -0
- package/dist/console-CSDO1Iwi.cjs +1 -0
- package/dist/{console-ZtBun_Tc.js → console-En5NiLnf.js} +3 -2
- package/dist/core.js +1 -1
- package/dist/npm/index.cjs.js +1 -1
- package/dist/npm/index.es.js +528 -3
- package/dist/sri-hashes.json +2 -2
- package/dist/types/core/index.d.ts +2 -0
- package/dist/types/detectors/ScriptInjectionDetector.d.ts +56 -0
- package/dist/types/detectors/WorkerIntegrityDetector.d.ts +26 -0
- package/dist/types/protection/anti-debug.d.ts +7 -6
- package/package.json +1 -1
- package/dist/anti-debug-u8v02mI_.cjs +0 -1
- package/dist/console-C5WWu7ZB.cjs +0 -1
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var __defProp=Object.defineProperty,__publicField=(e,t,o)=>((e,t,o)=>t in e?__defProp(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o)(e,"symbol"!=typeof t?t+"":t,o);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const _originalConsole={};class AntiDebug{static start(){this.saveConsole(),this.disableConsole(),this.preventDevTools()}static stop(){this.intervalId&&clearInterval(this.intervalId)}static getOriginalConsole(){return _originalConsole}static saveConsole(){const e=["log","debug","info","warn","error","table","trace","dir","clear"];try{const t=window.console;if(!t)return;for(const o of e)"function"==typeof t[o]&&(_originalConsole[o]=t[o].bind(t))}catch(t){}}static preventDevTools(){this.intervalId=setInterval(()=>{this.debuggerCheck(),this.devtoolsCloseCheck()},this.checkInterval)}static debuggerCheck(){!function(){try{(function(){}).constructor("debugger")()}catch(e){}}()}static devtoolsCloseCheck(){if(navigator.maxTouchPoints>0||/Mobile|Android|iPhone|iPad/i.test(navigator.userAgent))return;const e=performance.now();(function(){}).constructor("debugger")();if(performance.now()-e>100)try{document.body.innerHTML='<div style="display:flex;align-items:center;justify-content:center;height:100vh;font-family:sans-serif;background:#111;color:#fff"><div style="text-align:center"><h2 style="margin-bottom:12px">⚠ 보안 경고</h2><p style="color:#999">개발자 도구가 감지되었습니다.<br>페이지를 계속 이용하려면 개발자 도구를 닫아주세요.</p></div></div>'}catch(t){}}static disableConsole(){const e=()=>{},t=["log","debug","info","warn","error","table","trace","dir"];try{const o=window.console;if(!o)return;for(const n of t)o[n]&&(o[n]=e)}catch(o){}}}__publicField(AntiDebug,"checkInterval",1e3),__publicField(AntiDebug,"intervalId"),exports.AntiDebug=AntiDebug;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var __defProp=Object.defineProperty,__publicField=(t,e,i)=>((t,e,i)=>e in t?__defProp(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i)(t,"symbol"!=typeof e?e+"":e,i);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const antiDebug=require("./anti-debug-u8v02mI_.cjs");exports.ConsoleDetector=class{constructor(t){__publicField(this,"onDetect"),__publicField(this,"intervals",[]),__publicField(this,"detected",!1),this.onDetect=t}start(){this.startGetterTrap(),this.startSizeDetection()}stop(){for(const t of this.intervals)clearInterval(t);this.intervals=[]}triggerDetect(){this.detected||(this.detected=!0,this.onDetect(),setTimeout(()=>{this.detected=!1},5e3))}startGetterTrap(){const t=antiDebug.AntiDebug.getOriginalConsole(),e=t.log,i=t.clear;if(!e)return;const r=document.createElement("div");Object.defineProperty(r,"id",{get:()=>(this.triggerDetect(),"")});const n=/./;n.toString=()=>(this.triggerDetect(),"");const s=setInterval(()=>{try{e(r),e(n),i&&i()}catch(t){}},1500);this.intervals.push(s)}startSizeDetection(){if(navigator.maxTouchPoints>0||/Mobile|Android|iPhone|iPad/i.test(navigator.userAgent))return;const t=setInterval(()=>{const t=window.outerWidth-window.innerWidth>160,e=window.outerHeight-window.innerHeight>160;(t||e)&&this.triggerDetect()},2e3);this.intervals.push(t)}};
|