-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
[BUG] Lose Arguments #887
Copy link
Copy link
Closed
Labels
Description
Description
Hi there. I didn't write on e-mail this time, because that just a bug report (ONE MORE KRUZYA :D)
So, I try obfuscate some code. I use plural-ru, but I think this isn't trouble of plural-ru package.
So, in short description. If I right, obfuscator with next config:
{
"controlFlowFlattening": true,
"controlFlowFlatteningThreshold": 1.0,
}Just lose a few arguments by spread operator. For more check examples.
Steps to reproduce
- Create function with
spreadoperator (...some_array). - Obfuscate with my settings.
- Profit.
Examples
Oh shit, here we go again...
Original:
// index.js | Я упростил код до 2 + 2.
const plural = require("plural-ru");
const translate = ["Kruzya", "Is", "P..."];
plural(online, ...translate); // in this line I found bug, but go next...Obfuscated:
_0x102640['HrGnp'](plural, online, ...translate); How you can see, function can send only 3 arguments.
- first: plural,
- second: online,
- third: array.
But in third argument we have a bug ... because ...translate => arg1,arg2,arg3, ..., argn (n = length of array).
So, here we get 5 arguments, but sended only 3.
This is a potential bug of obfuscator 👀
Reactions are currently unavailable

