mirror of
https://github.com/javascript-obfuscator/javascript-obfuscator
synced 2026-08-09 12:42:29 +00:00
Fixed debug protection template false positive alert
This commit is contained in:
Vendored
+1
-1
File diff suppressed because one or more lines are too long
+11
-9
@@ -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}();
|
||||
}
|
||||
})();
|
||||
`;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user