Coder Social home page Coder Social logo

actionscript-source-obfuscator's Introduction


Actionscript 3.0 Source Code Obfuscator

Obfuscate your actionscript project with this Obfuscator. This Actionscript Obfuscator obfuscates:

  • package names
  • class names
  • variable names
  • function names

These changes will be updated on any other Actionscript files you include in the Obfuscation process!


How to run the .jar file

You need have a Java runtime installed. This Project uses JavaSE1-6

Double click (Windows)

Run from Terminal:

First go to the Directory where Obfuscator.jar is at!! For example if your Obfuscator.jar is at /home/username/Downloads/obfustest/ you should run:

$ cd /home/username/Downloads/obfustest/

When you are at the right directory you can run the commands below.

GUI Mode:

$ java -jar Obfuscator.jar 

Terminal Mode:

$ java -cp Obfuscator.jar main.Obfuscate <args>

Arguments:

  1. -nolocal | don't obfuscate local variables
  2. -nopackages | don't obfuscate packages
  3. -noclasses | don't obfuscate class names
  4. -uniquenames | give every field an unique name
  5. -namelength | the length of each unique name, you need to also use -uniquenames
  6. -help | display available commands

Tips n Tricks:

  • When using unique names you don't need a large number for the name length, a length of 4 already gives 13 million possibilities.

  • If you want individual classes, packages, or variables not obfuscated you have to use the GUI mode and deselect them.

  • The more .AS files it has the more it can obfuscate, as it works with references. If you make use of a library and have the source code of it, you should include those .as files to get better obfuscation.

  • The obfuscation will break on dynamically typed fields, always type those things or exclude them from the renaming process. !!!NOTE!!! THIS WILL GENERATE RUNTIME ERRORS OTHERWISE!

so change:

array[0].unsafeCall();

to:

MyClass( array[0] ).safeCall
  • Local / anymous functions explained:

Local and anymous functions won't have their variables renamed, this is not a problem as your swf will not store these names. However it may generate name conflicts. Take a look at the following example:

class A {
	var a:int, b:int;
	public function A() {
		var a:String;
		a = "a"; //won't be renamed (in nolocalvar mode)
		this.a = 4; //will be renamed
		var c = function() {
			var b:String = "hi"; //!!!WILL BE RENAMED!!!
		}
	}
}

Keep in mind that when local variables have the same name as global variables, it is OK as long as these local variables are in a normal function.

  • If you receive an error try running the program with the command line in order to see debug traces and get an error report.

Updates

  • 12 October 2012: Make the Obfuscator ignore Anonymous functions instead of terminate.
  • 14 October 2012: Added Vector Type safety support.

Unsupported:

  1. Namespaces, will generate errors They're not too usefull.
  2. The 'with' statement, will generate errors Its slow and unhandy to read because of the extra { it creates
  3. mxml, will not get parsed; only .as files This is an actionscript obfuscator, not a UI obfuscator.
  4. Local functions and anymous functions, may generate errors there is a chance where there can be collisions with names.
  5. Dynamically typed members, may generate errors Without a type the variable or function cannot be referenced correctly, look out for warnings when you compile your original code for this.
  6. Global function or field in separate .as file (global to the package)
  7. Reflection, variable names will get changed.

actionscript-source-obfuscator's People

Contributors

sandremss avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.