| ||
What it isFlare processes an SWF and extracts all scripts from it. The output is written to a single text file. Only ActionScript is extracted, no text or images. Flare is freeware. Windows, Mac OS X and Linux versions are available.The main purpose of decompiler is to help you recover your own lost source code. However, there are other uses, like finding out how a component works, or trying to understand poorly documented interface. Depending on where you live, some of them may be forbidden by law. It's your responsibility to make sure you don't break the law using Flare. If you develop Flash applications for living, you probably know that your code is not secure in SWF. It's not the existence of decompiler that makes your code insecure though, it's design of SWF format. Although no ActionScipt is stored there, most of it can be recovered from bytecodes. Download and usageMost recent Flare version is 0.6.Windows Explorer extension
Download flare06setup.exe. After installation right-click on any SWF file in Windows Explorer and choose Mac OS X droplet Get flare06.dmg. After mounting the disc image drop an SWF file onto the Flare icon in Finder. The decompiled ActionScript will be stored in SWF's folder with FLR extension. Open it with your text editor. You can decompile multiple SWF files at once. The droplet is compiled on OS X 10.3. It should work on 10.2 and 10.4. There is no Flare for OS 9. Command line versions
DOS/Windows binary: flare06doswin.zip
There is no installation procedure for command line versions. Just create a folder named
To use it, you have to open DOS window first (Windows). On Mac OS X, open Terminal: If you're unsure what Windows version to download, get Windows Explorer extension. Needless to say, for Mac you'll probably want to use the droplet. HistoryIn July 2003 I had some thoughts about effective SWF obfuscation. Obfuscation may be the wrong word though, I mean something more complex than renaming variables — kind of scrambling. Anyway, I decided to write a decompiler first to find out what's really hard to decompile, and Flare was born. I've learned a lot, and wanted to release a commercial scrambler in 2004. Since I don't seem to actually start implementing it, the idea is dropped by now.Project stateFlare is not mature. Please don't rely on Flare doing anything important — source control comes to mind. It may not format your hard drive, but it probably will crash on some SWFs or fail to decompile certain patterns. If you happen to find such a pattern, and the bug isn't listed below, please tell me about it. It would be nice if instead of sending me the SWF, you try to localize the bug yourself, and attach the FLA containing failed code only.Flare will never be a full-featured GUI decompiler like ASV. If I find time, Flare will continue to evolve in what it does. Better ActionScript II support would be a worthwile goal. Non bugsNothing will happen if you right-click on SWF in your browser. On Windows, Flare addsDecompile entry to the right-click menu of Windows Explorer, not Internet Explorer.
Flare can't make changes in SWF — it's not a compiler. Decompiler and compiler are completely different matters. To change an SWF, you may try Flasm or MTASC. No images, sounds or text are extracted — ActionScript only. I have no plans to add these in the near future. There are no comments in SWF, they are compiled away. No decompiler can recover what's not there. Flare doesn't work on earlier Mac OS versions. It only works on Mac OS X. Flare may show equivalent code that looks different from original code and does the same. While I try to show the code in its original form, sometimes it's not possible. Before you submit a bug, please make sure the code is wrong. Flare isn't well suited for simple cut'n'paste. In decompiled text file all frames, events and classes are shown together. To re-use it you have to know where the code belongs to. Flare works best on code compiled in Flash. It's not always possible to decompile, say, hand-optimized code. Flash may replace local variables with registers. Names of these variables are not recoverable. Neither are the names changed by obfuscators.
Some actions (f.e. Bugs and limitationsFlare shows ActionScript I code even if source was ActionScript II. ActionScript II is mostly compiled to ActionScript I in SWF, with some additional instructions. There's no strong typing there, for example. While it would be possible to restore it, currently Flare can't do that.ActionScript III (Flash 9) isn't supported. The format is entirely different.
Multiple assignments
You may be surprised by the code within
Starting with Flash MX, movie clips may contain button event handlers. Flare incorrectly shows
If left side of an assignment is calculated, Flare incorrectly uses
Flash 5 has no separate strict equality
In Flash 5 SWFs the condition of Flash optimizes certain branches away. Control flow recovery may be incomplete for edge cases. Flare can't handle unicode file names. Related softwareFreeFlasmDisassembler and assembler, maintained by yours truly. With Flasm, you can make changes to SWF. However, it doesn't show ActionScript — only bytecodes. If you're unfamiliar with them, it may be difficult to grasp. Free with source code.
MTASC
OSFlash CommercialAll commercial decompilers extract images, sounds and text, not only ActionScript. I haven't made any tests regarding their quality. If you need one, try demo versions yourself.
Action Script Viewer
Imperator FLA
DeFlash
Gordon
KineticFusion Terms of use
Copyright © 2003-2005 Igor Kogan. Flare is copyrighted freeware. It costs nothing. Neither do I ask for donations. However, there are some restrictions on its usage. Flare is provided “as is” and without any warranties. Please read the license included in the distribution for details. If you want to distribute Flare as part of commercial product or do anything else that isn't covered by this license, please contact me for conditions. Licensing Flare's source code is possible as well, but expensive — the decompiler was quite a bit of work.
Portions of Flare's tag parsing engine are based on Flasm. EnjoyIgor Kogan
|