An obfuscator for GLb on windows

Previous topic - Next topic

sf-in-sf

==== EDIT =====
   Finally my obfuscator works -a long, difficult job. It keeps the GLb commands and translates the rest into confusing generic "values", in selectable styles. The media files are automatically copied and renamed with fancy-names which are re-used in the source files accordingly. It worked with my 2505-commands game project, spanned on 10 *.gbas files, and about 50 media files. {Get it on the android market: flip7. By the way the first version costs 1$ and any advice is welcome about monetizing the app in a better way}.
  Back to the obfuscator: the generated code is meaningless : functions, variables, media files, are meaningless, random, looking all similar and confusing. But the program still works like before.
  • Supported features : multi-files, all GLb commands, media copy + renaming, intact 0x..... numbers, mark some words as keep-unchanged, automatic comment removal, choose/make your own style for generated words. Preprocessor code still works.
  • Not supported so far : INLINE'd code.
       Drop me a message if you are interested. You can get the customizable source code for a small price. Licence  :rtfm:  use and modify freely, you only. Don't distribute or sell anything in any way without my agreement. Please contact me for any unspecified case.
On the day the atom is a cube I will start believing in the square pixel.

erico

This sounds like a nice tool! :good:

spacefractal

its a nice idea.

just make sure to not rename all functions and sub. There is few, that should not been named.

That is those which got called by the name, and some subs required for pause/resume/quit and the loop. Those functions called by name, could eventuely been remarked by something like this: //noobfucator.
Genius.Greedy Mouse - Karma Miwa - Spot Race - CatchOut - PowerUp Elevation - The beagle Jam - Cave Heroes 2023 - https://spacefractal.itch.io/

sf-in-sf

Spacefractal, it's already feasible and easy -but not recommended normally. By looking closely you will sometimes find that it's o.k. to obfuscate a specific word. Example: GLOBAL emotion$  ...is in use everywhere in the program. You use it to throw and catch messages, communicate between modules. Then have words like "sad", "curious", "in_love" obfuscated as well, it will work. I had a problem when a media name resulted from a concatenation but it was easy to fix: check that the concatenated pieces follow the obfuscation accordingly. The practice has shown me that occasional problems are rare and easy to spot and fix.
Look at the generated code for flip7 (android market) and guess what is what:
Code (glbasic) Select
FUNCTION a942433508: a942741226%, a942283078% //
ALIAS a942344236 AS a942177478
IF a942177478.a942056186=FALSE
//
IF a942741226>=0 AND a942741226<a942177478.a942996609 AND a942283078>=0 AND a942283078<a942177478.a942047006
ALIAS a942109143 AS a942344236.a942985991[a942283078+(a942344236.a942047006)*a942741226]
IF a942344236.a942619820[a942741226][a942283078]<60 //
//
IF a942908340=FALSE THEN a942599879(a942109143)
//

a942247375(a942741226,a942283078,1) //

ENDIF ; ENDIF

ELSE //
//
//
IF a942741226>=0 AND a942741226<a942344236.a942396132 AND a942283078>=0 AND a942283078<a942344236.a942396132
INC a942344236.a942713984[a942741226][a942283078]
ENDIF
ENDIF
ENDFUNCTION
On the day the atom is a cube I will start believing in the square pixel.

ketil

Even better ... use a lot of underscores and som of the same numbers (or no numbers) after them.

local __________________ = FALSE

IF _________________=__________________ THEN ________________(___________________)
    INC ______________._____________________[_____________][____________]
ENDIF

It would also compress better :)         
"Sugar makes the world go 'round. Caffeine makes it spin faster."

ketil

Refactoring in Netbeans or any other ide with refactoring support, would anyway render both of theese obfuscations pretty useless :(
"Sugar makes the world go 'round. Caffeine makes it spin faster."

Moru


hardyx

Quote from: ketil on 2014-Sep-02
Refactoring in Netbeans or any other ide with refactoring support, would anyway render both of theese obfuscations pretty useless :(
Yes, but first you must to know what are you refactoring. =D

Hemlos

#8
I wonder if turning it into a gbal would change it more?

Im with moru here, replace 'all'...i do it all the time =D

Hardy if someone grabs a lib, they already have a good idea what its about...time tells all.
Bing ChatGpt is pretty smart :O