Is there a way to exclude a function from obfuscation?
See original GitHub issueIn one of my project we have WorkerFn
function that executes within WebWorker environment.
We create it in this way:
function WorkerFn(root) {
//here is worker code
}
url = URL.createObjectURL(
new Blob([ '(' + WorkerFn.toString() + ')(this)' ], { type: 'text/javascript' })
);
ww = new Worker(url);
This is only place that breaks after obfuscation, because this function executes in clean environment (WebWorker) and doesn’t have global function to resolve names.
I know the workaround to add every name into reservedNames
array, but it has serious downsides:
- it prevents names from obfuscations in other places of script
- it is tedious process and breaks every time source code is changed
Is there good solution to avoid obfuscation of this chunk?
Issue Analytics
- State:
- Created 6 years ago
- Comments:10 (6 by maintainers)
Top Results From Across the Web
How i exclude part of code being obfuscated by ConfuserEx?
Gets or sets a Boolean value indicating whether the obfuscation tool should exclude the type or member from obfuscation.
Read more >ObfuscationAttribute.Exclude Property (System.Reflection)
The MethodA method is marked with the value "default" for the Feature property. It is necessary to specify false for the Exclude property...
Read more >ZKM Script Exclusions Tutorial - Zelix KlassMaster
You can exclude packages, classes, fields and methods based upon the presence or absence of annotations at the class, field, method or method...
Read more >Obfuscating Code- Zend Guard 7
The Scan feature (on the Exclude Tab) scans the code in order to locate entities that should be added to the Exclude list....
Read more >yGuard 2.5 - Ant Java Bytecode Obfuscator and Shrinker
Another way is to annotate the elements directly in the source code that should be obfuscated or excluded. You can use the yFiles...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi. Check new
javascript-obfuscator@0.12.0
!https://github.com/javascript-obfuscator/javascript-obfuscator/blob/master/CHANGELOG.md#v0120
Amazing, thanks. You do great job!