ambiera home ambiera home
Home Features Downloads FAQ Manual Buy Forum                                                                                   Buy Download

Why would source code need to be obfuscated, as opposed to just the .swfs?

irrFuscator can obfuscate both, the .swf or the source code.
If you obfuscate the source code and then compile that obfuscated code yourself, you have much more control over it. You can see if there are bugs due to the obfuscation and if everything is still the way you need it. Obfuscators which modify a binary .swf file are basically a black box, and you can only hope that everything is ok and still working then. Also, a lot of users of irrFuscator are freelance developers, and have to give away their source code, and use this feature to obfuscate it before that so it won't get stolen.

Can I use irrFuscator with Flash as well?

irrFuscator is a tool originally created for Flex developers. But its source obfuscator 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 then of course. Simply use the obfuscation exceptions (ignore symbols) to specify the symbols which are defined in your .fla file.

Can I use irrFuscator with Flex Builder?

irrFuscator is working completely independent of any other tool, so yes, it can also be used together with Flex Builder of course.
Here is an example on how to setup an ant task with irrfuscator in Flex Builder to obfuscate the source:

<target name="obfuscate">
	<mkdir dir="${BUILD_DIR}/src"/>
	<exec executable="${APP_ROOT}/place/where/you/placed/irrfuscator.exe">
	  <arg value="${APP_ROOT}/src"/>
	  <arg value="${BUILD_DIR}/src"/>
	  <arg value="--nobackups"/>
You only need to adapt the path names to your personal settings.
Note that your Flex Builder needs to have ant installed for this. (The standalone version doesn't include ant, the plugin version does). If your Flex Builder doesn't have ant, do the following:
  • Launch Flex Builder
  • Go to Help > Software Updates > Find and Install
  • Search for new features to install, click next
  • Select " update site", click finish
  • Select "Eclipse Java Development Tools", click next and download
  • When finished, click "Install all" to install Java Development Tools
  • Restart Eclipse
If you only want to obfuscate the .SWF file after compilation instead, you only need to make irrfuscator run afterwards as post build step.

Can I use irrFuscator on Linux and Mac OS X?

irrFuscator is currently only available for Windows and Mac OS X, but several users have reported that it works flawlessly even on Linux using Wine, a free compatibility layer for running Windows programs on these operating systems.

How does irrFuscator work?

The binary swf obfuscator basically messes with the actionscript 3 bytecode sections in SWF files and renames the symbols within, so that decompilers won't for example be able to uncover the methods and variable names in your source code.

The source obfuscator of irrFuscator reads in a directory of .as and .mxml files, processes them and puts them out into a target directory. Simply recompile the directory with the obfuscated files and your .swf files are a lot safer.
irrFuscator parses .mxml and .as files and replaces symbols found in them with new, randomly generated texts. It is not a compiler but not a simple string replacement tool either, rather a mixture of both. This makes it possible that it can be used with actionscript code which won't compile at all like needed in some environments where additional code transformations need to be applied after obfuscation and before compilation.

Can I use irrFuscator together with a preprocessor?

Yes, you can make irrFuscator run even before preprocessing the code because irrFuscator doesn't require the code it obfuscates to be compilable. See How does irrFuscator work?.

I obfuscated some code and it doesn't compile any more, what can I do?

This is usually caused by a symbol which wasn't obfuscated correctly. Take a look at the place in the source which caused the problem and put the errornous symbol name into the ignore list, this usually helps.

I obfuscated some code and it doesn't run correctly any more, what can I do?

Actionscript 3 still is a dynamic language altough it has a lot of static typed features now. When a dynamic symbol was obfuscated, it may cause the program not to work correctly anymore. The usual way to make the program work again is putting all dynamic symbols into the ignore list.
Example: The URLVariables object or the attributes in XMLNodes are dynamic. When accessing an XML attribute in this way for example:

var node:XMLNode = // some node..;
then 'FooBar' is dynamic and should not be obfuscated. To let irrFuscator know that it should not obfuscate any symbol with the name 'FooBar', put FooBar into the sybmol ignore list.

It also helps to try to switch off the option 'obfuscate constants' and 'obfuscate all vars'.

What does "nondeterministic obfuscation" mean?

Obfuscation is based on random numbers. This setting specifies if this is really a totally random number or not. So with this setting turned off, irrFuscator will not generate deterministic obfuscated symbols, meaning that the same input code will not always generate the same obfuscated output. For most cases, you can just ignore this setting, but if you want always the same obfuscated output to be generated for your project, then this setting is useful.