[Feature Request] Obfuscate Global Variables
See original GitHub issueDescription
How we know we have global variables like console
, window
, alert
and etc.
If I obfuscate some code, for example:
const date = new Date();
let kruzya = 0;
kruzya++;
if (kruzya >= 1) console.log(`${kruzya} is more like 0`, date); // Output number (1) and timestamp (date)
we get:
const O = ['log', 'ike 0', 'ore l', ' is m'];
(function (j, u) {
const k = function (C) {
while (--C) {
j['push'](j['shift']());
}
};
k(++u);
}(O, -0x1 * -0x10fd + -0x92 + -0xf5b));
const j = function (u, s) {
u = u - (-0x1 * -0x10fd + -0x92 + -0x106b);
let E = O[u];
return E;
};
const u = function (s, E) {
return j(s - '0x3c8', E);
},
date = new Date();
let kruzya = -0x92 + 0x771 + -0x6df;
kruzya++;
if (kruzya >= 0x1c * -0xd1 + -0x92 + 0x176f) console[u('0x3c8')](kruzya + (u('0x3cb') + u('0x3ca') + u('0x3c9')), date);
but some code we didn’t obfuscate. For example: new Date(), console etc. What about obfuscate this too?
Why?
If I have debug in my code user can check by code what exact is wrong or etc.
UPD: Yep, if I just disable console… I can didn’t obfuscate console
, but what if I really need it?
This is more question like suggestion but … what about create method to obfuscate global methods and/or variables? 👀
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (6 by maintainers)
Top Results From Across the Web
Global variables introduced by obfuscator · Issue #170 - GitHub
I've noticed that enabling some of the obfuscator features (e.g. "stringArray") causes variables to be placed in the global namespace of the ...
Read more >Global Function for Obfuscating User Names in Query
Hi @All, I want to obfuscate user names in reports. The queries the reports are based on get their data mainly from lists...
Read more >Variable Name Obfuscation - GDevelop Forum
Would it be possible for Gdevelop to comb through your project and gather variable names (scene variables, global variables, ...
Read more >Synthetic Monitoring Settings - Datadog Docs
Global variables are variables that are accessible from all your Synthetic tests. They can be used in all single and multistep API tests...
Read more >Are global variables bad? - c++ - Stack Overflow
The problem with global variables is that since every function has access to these, it becomes increasingly hard to figure out which functions...
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
So the suggestion is to transform
into
After that it can be moved to the
strings array
Like this idea. Will try to implement it in the feature.