Description of Obfuscator.exe

Introduction:

Many people have requested an Obfuscator function since Smoke_N stopped support on his version.
I took the Tidy program, which has all Lexing logic built-in, and created a separate program called Obfuscator.
Obfuscator will make it a lot harder to read your source code but remember:

Obfuscator doesn't make your source safe!
 

Ok, now we have this out of the way a few other things:

  1. Ensure you have a proper working script before using the Obfuscator.
  2. Ensure you extensively test the Obfuscated script.
  3. Don't come to me complaining Obfuscator corrupted the working of your script.
  4. Oh ...  and did I tell you already that Obfuscator doesn't make your Script source safe enough to store passwords?

What Obfuscator does:

Obfuscator will:

  1. Read your script and Includes needed and create a new source file:
    1. Rename Variable names.
    2. Rename Func name.
    3. Convert Strings to a Variable.
    4. Convert Values to a Number(Variable).
    5. Convert @Marcros to Execute(Variable)
    6. Warn you about the use of these AutoIt3 Functions and in which File/Func/line they are used and the Parameter contains an Ampersand (&), since they will cripple the functioning of the script when used:
      1. adlibenable()
      2. call()
      3. eval()
      4. guiregistermsg()
      5. guisetonevent()
      6. guictrlsetonevent()
      7. hotkeyset()
      8. isdeclared()
      9. trayitemsetonevent()
      10. objevent()
      11. Opt("OnExitFunc","OnAutoItExit")
         
  2. Produce an Obfuscator.log which contains all information about the conversion process in case of problems.

Supported Commandline or compiler directive options:

This is the list of supported parameters to specify on the command line or in the Directive: #Obfuscator_Parameters=:

 

Running Obfuscator:

Obfuscator can be run

  1. Manually: Add these lines to SciTEUSer.properties
     
    command.46.*.au3="$(SciteDefaultHome)\Obfuscator\Obfuscator.exe" "$(FilePath)"
    command.name.46.*.au3=Obfuscator
    command.save.before.46.*.au3=1
    command.is.filter.46.*.au3=1
    command.shortcut.46.*.au3=Ctrl+Shift+O

     

  2. Batch: Obfuscator.exe Scriptname.au3
  3. From SciTE with F7 or Alt+F7 (Compile) and will need to be activated by the following Compiler directive:
     
    #Compiler_Run_Obfuscator=y                 ;Run Obfuscator before compilation. default=n

AutoIt3Wrapper will first run Au3Check against the original source and when no errors fond it will run Obfuscator.exe to create an encrypted source file, Scriptfile_Obfuscated.au3 in the same directory, containing all source information  including all #included files.
This file is then also run through AU3Check to ensure nothing went wrong during conversion.
Then the Scriptfile_Obfuscated.au3 is used by AUT2EXE to create your program.


AutoIt3 Source Obfuscator v?.?.?.? Copyright (c) Jos van der Zande  date
-### Obfuscation Warning: Found Eval() statement which will lead to problems running your script.
-### current Func:_ArrayCreate
C:\Program Files\AutoIt3\include\array.au3(101,1) Warning for line:$av_Array[$i_Index] = Eval("v_" & String($i_Index))
-### Obfuscation Warning: Found IsDeclared() statement which could lead to problems running your script.
-### current Func:_About

c:\program files\autoit3\scite\csnippet\csnippet.au3(2182,1) Warning for line:If Not IsDeclared('Cadet_Blue_3') Then Local $Cadet_Blue_3 = 0x7AC5CD
-############################################################################################
-#### Obfuscator Found 2 warning(s)!!!!   This means your script could not run properly. ####
-############################################################################################

+Obfuscator finished obfuscating 4025 lines and created:c:\program files\autoit3\scite\csnippet\csnippet_Obfuscated.au3