Skip to content
This repository has been archived by the owner on Dec 7, 2021. It is now read-only.

Skipping space #56

Closed
karaby opened this issue Nov 20, 2020 · 1 comment
Closed

Skipping space #56

karaby opened this issue Nov 20, 2020 · 1 comment
Labels

Comments

@karaby
Copy link

karaby commented Nov 20, 2020

Example (obfuscated "javascript-obfuscator/src/custom-code-helpers/debug-protection/templates/debug-protection-function/DebuggerTemplate.ts" :)
Before:

                (function() {
                    return !![];
                }
                [b('0xe85', 'ObNs') + 'r'](eYr['AHZCQ']('debu', 'gger'))['call']('action'));
            } else {
                (function() {
                    return ![];
                }

After:

                (function () {
                        returntrue;
                    }
                    constructor(eYr.AHZCQ('debu', 'gger')).call('action'));
            } else {
                (function () {
                        returnfalse;
                    }
@lelinhtinh lelinhtinh added the bug label Nov 20, 2020
@lelinhtinh
Copy link
Owner

str.replace(/((?<=([=:(,|&[]|return|=>))|^)!{1,2}(\[\]|0|1)((?=[;,)}|&\]])|$)/g, (m) => eval(m).toString()),

/((?<=([=:(,|&[]|return[\n\s]|=>))|^)[\n\s]*!{1,2}(\[\]|0|1)((?=[;,)}|&\]])|$)/g

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants