Navigation:  ThinBASIC language > thinTools >

Script Obfuscation

Previous pageReturn to chapter overviewNext page


What is script obfuscation


Imagine you have a script, an important one, a reserved one, or a script that contains some reserved information like password or key activation or things like that. How to be able to distribute your script keeping your source code hidden? The answer is: obfuscation.


Using obfuscation you make your source code not readable and almost impossible to understand by a human being.


How to obfuscate your scripts?


1.From thinAir, open the thinBasic script file you want to obfuscate.
2.Use menu: Script/Obfuscate
3.thinAir will create an obfuscated copy of original script named the same plus an "x" at the end of the script name.


For example:

if you script is something like: C:\thinBasic\MyScripts\MyTestScript.tBasic

after obfuscation, you will have another script file named: C:\thinBasic\MyScripts\MyTestScript.tBasicx

This new file with .tBasicx extension is the obfuscated one.


So thinBasic scripts named tBasicx or .tBasiccx are Gui or Console obfuscated scripts.




Important notes about thinBasic obfuscation


1.Always keep your original not obfuscated script in a safe place.
Obfuscated scripts cannot be put back into clear form even by thinBasic team.
2.Obfuscation do not guarantee you that scripts cannot be put back in clear form by a debugging or through a disassembly session.
Obfuscated scripts file are strongly encrypted (so quite hard to decipher) but there will be moments during script execution where scripts will be in clear form into computer memory. This is true for almost every program been executed by a computer.
3.Remember to use thinAir menu Tools/Obfuscate every time you make a change to your source code
4.Obfuscation methods can change in next thinBasic versions.
We will try to maintain backward compatibility but we cannot guarantee it.