فهرست منبع

Fixed debug protection template false positive alert

sanex3339 7 سال پیش
والد
کامیت
e3066b4189

تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 0 - 0
dist/index.js


+ 11 - 9
src/templates/custom-nodes/debug-protection-nodes/debug-protection-function-call-node/DebufProtectionFunctionCallTemplate.ts

@@ -3,14 +3,16 @@
  */
 export function DebugProtectionFunctionCallTemplate (): string {
     return `
-        var regExp1 = new RegExp('function *\\\\( *\\\\)');
-        var regExp2 = new RegExp('_0x([a-f0-9]){4,6} *\\\\(\\\\+\\\\+ *_0x([a-f0-9]){4,6} *\\\\)');
-        var result = {debugProtectionFunctionName}('init');
-        
-        if (!regExp1.test(result + 'chain') || !regExp2.test(result + 'input')) {
-            result('0');
-        } else {
-            {debugProtectionFunctionName}();
-        }
+        (function () {
+            var regExp1 = new RegExp('function *\\\\( *\\\\)');
+            var regExp2 = new RegExp('\\\\+\\\\+ *_0x([a-f0-9]){4,6}');
+            var result = {debugProtectionFunctionName}('init');
+            
+            if (!regExp1.test(result + 'chain') || !regExp2.test(result + 'input')) {
+                result('0');
+            } else {
+                {debugProtectionFunctionName}();
+            }
+        })();
     `;
 }

برخی فایل ها در این مقایسه diff نمایش داده نمی شوند زیرا تعداد فایل ها بسیار زیاد است