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
{{ message }}
Repository navigation
Issue with two separated obfuscated files on the same page #58
I think I found an issue. I have two independent javascript files on a page, each one obfuscated by the webpack-obfuscator plugin (i.e: different bundles on different <script> tags). Since they both use the same configuration from webpack.conf.js, they have the same seed config and thus the first variable name that is used on the stringArray variable is the same for both obfuscated files. That is an issue as the variable used by stringArray is a global and gets replaced by the second script.
Then somewhere after loading the scripts, any interaction from the first bundle with the stringArray function will look at the second bundle stringArray variable.
Possible workarounds that I could think:
Have the obfuscator output an immediately invoked function that would scope the variable and not leak them to the global scope.
Use the seed parameter plus an hash of the source code as the real seed used by the obuscator. This is not fail-proof as it still might generate two variables with the same name and mess things.
Activity
sanex3339 commentedon Jun 27, 2017
I like second option.
sanex3339 commentedon Jun 27, 2017
I'll implement it today or tomorrow.
sanex3339 commentedon Jun 28, 2017
Did it, new beta will be ready in 20 mins.
Added md5 hash of source code to seed for RandomGenerator
sanex3339 commentedon Jun 28, 2017
Hi, check new
[email protected]slig commentedon Jun 28, 2017
Thank you very much, will try!
sanex3339 commentedon Jul 3, 2017
Any news?
slig commentedon Jul 3, 2017
Sorry for not reporting before. It does work perfectly as expected, thank you very much!
sanex3339 commentedon Jul 3, 2017
Nice! I'll close issue than.