|
Project
|
IntelliJ IDEA
|
|
Priority
|
Normal |
|
Type
|
Bug |
|
Fix versions
|
No Fix versions |
|
State
|
Fixed |
|
Assignee
|
Maxim Mossienko |
|
Subsystem
|
No subsystem |
|
Affected versions
|
No Affected versions |
|
Fixed in build
|
108.65 |
The SWCs (zip archives) each contain a "library.swf" generated by the mxmlc compiler.
The library.swf likely contains a single tag containing "abc" bytecode, including a constant pool (which is what you're after).
I haven't found a parser implemented in Java, but there is one written in OCaml, part of the "haxe" language/compiler:
http://haxe.org/tutos/flash9?s=flash#as3_hx_header_generation
http://haxe.org/tutos/flex_and_haxe_intro#creating_and_calling_as3_classes_from_haxe
http://cvs.motion-twin.com/horde/chora/co.php?rt=haxe&r=1.43&f=genswf9.ml
http://cvs.motion-twin.com/horde/chora/browse.php?rt=ocaml&f=%2Fswflib%2F
A tool that just scans constant pools to extract class/method signatures would be allowed for interoperability reasons, I would assume.
a. You may not use the Specification in any way to create or develop a runtime, client, player, executable or other program that reads or renders .swf files.
b. You may not use the Specification in any way to create a server, executable, or other program that will stream or deliver data from a client to a server, from a server to another server, or from a server to a client.
c. You will not make or distribute copies of the Specification, or electronically transfer the Specification outside your company.
That license only applies if you want to obtain the official file format specification for SWF9 from Macromedia.
But there is no need to do that, there is enough information available in public to build a constant pool reader.
Especially with the opensource donation of Tamarin project, which actually includes a full disassembler.