You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
_0x5c1443 is bar in original return bar; but foo({bar}) can not be changed.
I think the only solution is with _0x5c1443 = obj.bar;
I am using babel over the obfuscated file to solve the problem
After fix all Identifier nodes inside object destructing inside function params and variable declaration will be skipped, so after obfuscation your example will be like:
function_0x303cfa({ bar }){returnbar;}_0x303cfa({'\x62\x61\x72': '\x62\x61\x7a'});
I will think about transforming of object destructing to es5 like it did Babel, but if i will do it, it will be in 0.9.0.
function _0x303cfa(_0xabc123) {
var _0xcde345 = _0xabc123['\x62\x61\x72'];
return _0xcde345;
}
Right now i thinking that transform es6 code to es5 is a bad idea, i don't want to copy big amount of logic from Babel transformers to javascript-obfuscator transformers.
Thanks for the quick fix, its works perfect.
IMO is bad idea to make that babel do with variables because the purpose of the library is obfuscate, not transform es6 in es5. If someone want this behavior, always can use babel before obfuscate it.
Activity
sanex3339 commentedon Jan 11, 2017
Thank you for the issue. I will fix it later today.
fixed #29
fixed #29
sanex3339 commentedon Jan 11, 2017
[email protected]and[email protected]are outAfter fix all
Identifiernodes inside object destructing inside function params and variable declaration will be skipped, so after obfuscation your example will be like:I will think about transforming of object destructing to
es5like it didBabel, but if i will do it, it will be in 0.9.0.Right now i thinking that transform
es6code toes5is a bad idea, i don't want to copy big amount of logic fromBabeltransformers tojavascript-obfuscatortransformers.sanex3339 commentedon Jan 11, 2017
Hoops, i forgot about catch clause =(
sanex3339 commentedon Jan 11, 2017
[email protected]and[email protected]are out (with fix of CatchClause node ObjectPattern parameter)sanex3339 commentedon Jan 11, 2017
Also latest changes available under
devtag -[email protected]andjavascript-obfuscator@develtiodelsofa commentedon Jan 11, 2017
Thanks for the quick fix, its works perfect.
IMO is bad idea to make that babel do with variables because the purpose of the library is obfuscate, not transform es6 in es5. If someone want this behavior, always can use babel before obfuscate it.
sanex3339 commentedon Jan 12, 2017
Thank you!