Jump to content

Simple Obfuscator (Beta not needed.)


taurus905
 Share

Recommended Posts

Simple_Obfuscator.au3

Simple_Obfuscator_v1.2.au3 v1.2 - Added on July 26th, 2006

I only discovered AutoIt in the middle of September 2005. When I realized how easy it was to create a gui and compile it into an executable, I was hooked. So on Halloween 2005 I wrote the following Simple Obfuscator.

This was my first real script, although it may be more scrap. :D This was written long before I started using Beta, so people who are not using Beta, for one reason or another, might find this somewhat useful.

I personally use EnCodeIt by SmOke_N, but may use this as my pre-EnCodeIt obfuscator.

I know that it is not as elegant as I would like it to be, but with a little tweaking, it may serve a purpose for some users.

I can already think of half a dozen improvements I could make, but I wanted to post it now in order to get some feedback.

Please feel free to tear it apart and post your code right here. I won't mind. I am just interested in finding new and better ways to protect our source code.

It is not my intention to replace EnCodeIt. I truly love that script and have nothing but respect for SmOke_N. I totally understand why he does not want to reveal his secret obfuscation methods and appreciate him not doing so.

If my Simple Obfuscator evolves to the point where it would be detrimental to its users to post its functionality, I will also keep it confidential.

If you want to try this to see just what it does, run it on itself. That is, run the script and choose itself as the input file. Then you can check out the outputted file to see its effect.

The comments throughout the script should be easy to follow.

taurus905

Edited by taurus905

"Never mistake kindness for weakness."-- Author Unknown --"The highest point to which a weak but experienced mind can rise is detecting the weakness of better men."-- Georg Lichtenberg --Simple Obfuscator (Beta not needed.), Random names for Vars and Funcs

Link to comment
Share on other sites

  • 2 weeks later...

I found a bug and needed to add a 'function correction factor' to compensate for the way unique functions were being counted.

See the first post for the newest version, which is v1.1 upto this point.

taurus905

Edited: Removed v1.1 because the 'function correction factor' was not needed.

Edited by taurus905

"Never mistake kindness for weakness."-- Author Unknown --"The highest point to which a weak but experienced mind can rise is detecting the weakness of better men."-- Georg Lichtenberg --Simple Obfuscator (Beta not needed.), Random names for Vars and Funcs

Link to comment
Share on other sites

  • 3 weeks later...

Simple_Obfuscator_v1.2.au3 can be downloaded from the top of the first post in this thread.

Simple_Obfuscator_v1.2.au3 is a total rewrite of Simple_Obfuscator.au3

I purposely used long variable and function names to make the script easier for users to follow and customize for their own use. I also included plenty of comments for the same reasons.

Read the comments to see how you can uncomment one line while commenting out another, in order to see messages and array displays during execution.

If you run this script and choose itself as the input script, you will be able to compare it to the outputted script to see the difference.

I am open to any suggestions on how to improve this script.

Please let me know if it will not work for you.

taurus905

"Never mistake kindness for weakness."-- Author Unknown --"The highest point to which a weak but experienced mind can rise is detecting the weakness of better men."-- Georg Lichtenberg --Simple Obfuscator (Beta not needed.), Random names for Vars and Funcs

Link to comment
Share on other sites

pretty cool, i could make use out of this... :whistle:

one improvement could be a progress bar on the obfuscating

WTS,

Thanks for your input. I agree, a progress bar would be a big improvement. I want to add it in a future version.

I also want to add two .txt files that the user can update, without having to edit the script, which would include variables and functions NOT to obfuscate. (Sorry if I am repeating myself.)

That way, they could run it the first time and see all the variables and funtions that have been obfuscated. Then pick the ones that should not be obfuscated and move them to the DoNotObfuscate.txt file. And then run the script again to get new outputted files. They could repeat this process until they had the working script they need.

taurus905

"Never mistake kindness for weakness."-- Author Unknown --"The highest point to which a weak but experienced mind can rise is detecting the weakness of better men."-- Georg Lichtenberg --Simple Obfuscator (Beta not needed.), Random names for Vars and Funcs

Link to comment
Share on other sites

WTS,

Thanks for your input. I agree, a progress bar would be a big improvement. I want to add it in a future version.

I also want to add two .txt files that the user can update, without having to edit the script, which would include variables and functions NOT to obfuscate. (Sorry if I am repeating myself.)

That way, they could run it the first time and see all the variables and funtions that have been obfuscated. Then pick the ones that should not be obfuscated and move them to the DoNotObfuscate.txt file. And then run the script again to get new outputted files. They could repeat this process until they had the working script they need.

taurus905

Maybe, par default put autoit variable into DoNotObfuscate.txt file

ex : $CmdLine

...

;-)

Link to comment
Share on other sites

Maybe, par default put autoit variable into DoNotObfuscate.txt file

ex : $CmdLine

...

;-)

JoeCool,

Yes. I believe that would be a good start.

Thanks for the suggestion.

taurus905

"Never mistake kindness for weakness."-- Author Unknown --"The highest point to which a weak but experienced mind can rise is detecting the weakness of better men."-- Georg Lichtenberg --Simple Obfuscator (Beta not needed.), Random names for Vars and Funcs

Link to comment
Share on other sites

  • 1 month later...

pretty cool, i could make use out of this... :)

one improvement could be a progress bar on the obfuscating

I just want to remind anyone who downloads my Simple_Obfuscator_v1.2.au3 in the first post, that I still have not added a progress bar. So if you run the script, you may think that it is not doing anything and exit the script my right-clicking on it in the system tray.

But if you wait a minute or two, depending on the size of the script you are obfuscating, you will see your outputted files appear in the same directory as your original script. The last file to be outputted is the new obfuscated script in the form of: OriginalScriptName - Simple Obfuscated.au3

Then you will see that the script has ended because it is no longer in the system tray.

Sorry if this has caused any confusion.

taurus905

"Never mistake kindness for weakness."-- Author Unknown --"The highest point to which a weak but experienced mind can rise is detecting the weakness of better men."-- Georg Lichtenberg --Simple Obfuscator (Beta not needed.), Random names for Vars and Funcs

Link to comment
Share on other sites

  • 5 months later...

Nice!

Excelent when i run out of ideas. Now i have names for every strings!

hehehe

Great job.

Old Scriptology

Visual Ping 1.8 - Mass Ping Program with export to txt delimited.

Desktop 2 RGB and YMCK - Pick a color in the desktop and get the RGB and YMCK code.

Desktop 2 RGB - Pick a color in the desktop and get the RGB code.

ShootIT 1.0 - Screen Capture full and partial screen

[font="'Arial Black';"]Remember Remember The Fifth of November.[/font]

Link to comment
Share on other sites

  • 1 year later...

thank you VERY much for this! great work!

ONE little but important fix I had to make:

add

$char = "<" Or _
$char = ">" Or _

somewhere between line 198 and 201 :D

THANKS AGAIN!!!

Found another that should be added:

$char = "&" Or _

I'd also like to add, wouldn't finding function names be better if it just looked for "Func " and then whatever after that up to "(" would be the function name? It would be better than using the "_" seeing as how that is just a common practice to name functions that way. If someone isn't using that same method for naming their functions (like me) then this doesn't work. Also, that whole section of the code dedicated to not obfuscating certain function names would not be required at all. Nor would the section that eliminates duplicate function names. Searching for "Func " would only obfuscate function names which are declared within the code of the script (which is exactly what needs to be done).

Link to comment
Share on other sites

  • Moderators

Found another that should be added:

$char = "&" Or _

I'd also like to add, wouldn't finding function names be better if it just looked for "Func " and then whatever after that up to "(" would be the function name? It would be better than using the "_" seeing as how that is just a common practice to name functions that way. If someone isn't using that same method for naming their functions (like me) then this doesn't work. Also, that whole section of the code dedicated to not obfuscating certain function names would not be required at all. Nor would the section that eliminates duplicate function names. Searching for "Func " would only obfuscate function names which are declared within the code of the script (which is exactly what needs to be done).

Since you got it down... We can expect to see yours in the near future?

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

I would ask the authors permission to modify his code first. It was more of a recommendation. I did look into the code to see how extensive that kind of change would be. I could probably do it, but I don't want to say for sure before I actually get into it a bit more. Certainly, considering I get the required permission, if I were to make the change, and it was suitably up to par, I would post my edit of the script for anyone who wanted it.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...