Example
The following code demonstrates what irrfuscator does when obfuscating a source code project. The file MapResourceManager.as contains some plain as3 code:
Before Source Obfuscation
import flash.utils.ByteArray;
// a resource manager specialized for maps
public class MapResourceManager
extends ResourceManager
{
public static function
canLoadResWithIndex(idx:int):Boolean
{
// if the resource is null, it cannot load
return getResFromIndex(idx) != null;
}
public static function
loadResString(idx:int):String
{
var cl:Class = getResFromIndex(idx);
if (!cl)
return "error";
// convert the data into a text string with
// 'end' suffix.
var data:ByteArray =
new cl as ByteArray;
return data.toString() +
"end.";
}
} // end class
|
After Source Obfuscation
import flash.utils.ByteArray;
public class _wm3952
extends _lc4996
{
public static function
_fi5847(_vr345:int):Boolean
{
return _ya7618(_vr345) != null;
}
public static function
_dm6121(_vr345:int):String
{
var _zu342:Class = _ya7618(_vr345);
if (!_zu342)
return irrcrpt(87, "kzrd");
var _lw654:ByteArray =
new _zu342 as ByteArray;
return _lw654.toString() +
irrcrpt(23, "uzd.");
}
}
|
But of course, irrFuscator can do additional source level obfuscation if wished, which is very useful when
source code needs to be given away:
import flash.utils.ByteArray; public class _wm3952 extends _lc4996 {
public static function _fi5847(idx:int):Boolean { return _ya7618(idx)
!= null; } public static function _dm6121(idx:int):String { var cl:Class =
_ya7618(idx); if (!cl) return irrcrpt(87, "kzrd"); var data:ByteArray =
new cl as ByteArray; return data.toString() + irrcrpt(23, "uzd."); } }
Feature Overview
irrFuscators current features are:
- Obfuscation: It changes the names of functions, methods, constants, interfaces and classes using a deterministic or
not deterministic naming scheme if wished.
Unlike other basic source level obfuscators, irrFuscator will also rename your classes (and the files they are located in accordingly)
in source mode.
- String encryption: Strings in your code are automatically encrypted if wished.
- Built-In flex call recognition: irrFuscator will not obfuscate calls to any of the flex libraries so your code will compile of course.
- Optional automatic stripping of code comments and/or whitespace: If you want to give away your source code, this option is very useful.
- Speed: irrFuscator is written in C++ and needs only about 10 seconds to obfuscate one megabyte of source code on a standard developer PC.
For a binary .swf file, it usually needs less than one second.
- Tested: irrFuscator is used by huge flex based projects like the Darkness Springs Role Playing game which
contains more than 100.000 lines of code.
- Obfuscation exceptions: If you need a symbol to be visible outside of your code or you are using dynamic classes,
you can specify any symbol not to be obfusctated. In this way, irrFuscator can also be used with the flash development environment
where you have a .fla file and several .as files. (irrfuscator will only obfuscate the .as files)
- SWC file support: If your projects uses external .SWC files, you can easily let irrfuscator know about it.
Download
Download irrFuscator from the irrFuscator download page.