Galaxy Obfuscator
Galaxy Obfuscator is a simple program that can obfuscate your script, making it unreadable by humans. I does not change how the script works.
Galaxy Obfuscator will:
- Remove all comments and unnecessary whitespaces
- Replace all identifiers (variable names, functions) with random sequences of l (lowercase L) and I (uppercase i)
- Obfuscates all integers and strings
Galaxy Obfuscator has GUI and works in a fully automated fashion. After selecting a map you want to obfuscate, it will create in the same directory a file named <YourMapName>Obfuscated.SC2Map. You can also run it from the command prompt, with your map name as the argument.
The program will change only the "MapScript.galaxy" and "Triggers" files in the map. It will not obfuscate any libraries nor dependencies you may be using.
Note that an obfuscated map file will crash the editor if you try to open the triggers in it.
There is an example of Galaxy Obfuscator in action (it is the obfuscated Hello World script):
include "TriggerLibs/NativeLib" void lIIIIIIIlIlIIlII(){libNtve_InitLib();}trigger IIIIIIllIIlIlIIl;bool IIIIlIIIlllIllII(bool lIIIIIIllIlIIIll,bool lllIllIIllllllIl){if(!lllIllIIllllllIl){return true;}TriggerDebugOutput(01,StringExternal("\x50\x61\x72\x61\x6d\x2f\x56\x61\x6c\x75\x65\x2f\x39\x42\x36\x30\x39\x30\x31\x44"),true);return true;}void lllllIIIIlIlIlll(){IIIIIIllIIlIlIIl=TriggerCreate("\x49\x49\x49\x49\x6c\x49\x49\x49\x6c\x6c\x6c\x49\x6c\x6c\x49\x49");TriggerAddEventMapInit(IIIIIIllIIlIlIIl);}void IIlIIllIllIIlllI(){lllllIIIIlIlIlll();}void InitMap(){lIIIIIIIlIlIIlII();IIlIIllIllIIlllI();}
my map use it cant obfuscator,why?
but other Can be implemented
A higher version of the obfuscator was found in the map script, and I don’t know where it was released.
DO NOT USE THIS SOFTWARE
It simply breaks your maps down.
Yes, triggers are obfuscated, map still runs, BUT when I tested it once the process was done, I easily noticed several odd script behaviors, like repeated/looped actions, wrong triggers/actions timing, altered parameters, and maybe even more issues to come.
It could work one on ten times on your map, I don't know, but this software is definitely not secure.
Can't use, just getting "Unexpected ["
Does this not handle arrays?
In reply to ChronAuroS:
me too,how to repair
Has anyone tested this on their live maps in Battle.Net? Hope to see an equivalent of Vexorian's wc3optimizer in StarCraft 2 as well before we use it on NOTD.
Really sweet project, :D.
Need one that does Data as well!
Whats the point? I think minimizer would be better. Obfuscate using minimal length strings, strip whitespaces and so on... smaller map size equals more space, more scripts equals more gain.
Doesn't seem unreadable to me...just really really long.