question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Control Globals and functions renaming

See original GitHub issue

I’m a little confused with the readme file. If I use the renameGlobals=true parameter, it renames globals, and functions. ok. If I have a function that is called from another script, the call is broken. ok. So I have to exclude it from the renaming list with reservedNames. ok.

The problem is that doing this, it is not obfuscated. Is there a way so I can rename it, at obfuscation, without touching the source code ?

For example, saying that this string THISFUNCTION, should always be renamed with this TiHiIiSiFiUiNiCiTiIiOiN or with ghfdffgfhdfjghdfgjdsfhgf when obfuscated. This way, when I obfuscate any script, I can keep the function call by maintaining some coherence. Same thing for globals.

note that THISFUNCTION can be a function name, and of course a string corresponding to a javascript call.

    SCRIPT 1 : function THISFUNCTION() {}
    SCRIPT 2 : <input type='button' onclick='THISFUNCTION();' />

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:51 (46 by maintainers)

github_iconTop GitHub Comments

2reactions
sanex3339commented, Nov 18, 2020

I will implement names cache (that writes into the file) in the future (like uglify.js does) but i haven’t any date. Sometime in next year.

1reaction
sanex3339commented, May 31, 2021

Thank you for testing. Probably from tomorrow and all this and partially next week I won’t be able to finish this PR, because of my vacation. I’ll finish in a week.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Changing renamed global variables from inside a function ...
I'm making a basic version of pokemon, and I have a function that looks like this: global userhp, comphp userhp = 100 comphp...
Read more >
Refactor rename - Visual Studio (Windows) - Microsoft Learn
Right-click the code and select Rename. Rename the item simply by typing the new name. C#:. Rename animation - C#. Visual Basic ...
Read more >
Renaming Global Variables in C Mechanically Proved Correct
Most integrated development environments are shipped with refactoring tools. However, their refac- toring operations are often known to be unreliable.
Read more >
A Correct Refactoring Operation to Rename Global Variables ...
Then we focus on a refactoring operation: renaming global ... Compcert syntax represents block variables by function local variables in the ...
Read more >
ghidra - Renaming a function globally
I have right-clicked on FUN_1017e9e0, then I selected "Rename Function". I have renamed it "process_something_internal", and "Namespace" was set ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found