ofl
is a command line application to process SWF files using the libraries of the Open Flash project.
The current subcommands allow to parse an SWF file, extract its content and analyze its AVM1 buffers.
This project is part of the Open Flash project.
cargo install --git https://github.com/open-flash/ofl
ofl dump [FLAGS] <swf> [output]
Extract all the data from the provided SWF file into an output directory.
This command generates the following files inside the output
directory:
For tags containing AVM1 buffers (such as DoAction
), it also generates the following files:
main.avm1
: AVM1 buffermain.cfg.json
: Parsed Control Flow Graph
This is the recommended command to quickly analyze a SWF file.
ofl parse movie.swf
Parses an SWF file and into an swf-types
Movie and prints it as JSON.
Example output:
{
"header": {
"swf_version": 34,
"frame_size": {
"x_min": 0,
"x_max": 11000,
"y_min": 0,
"y_max": 8000
},
"frame_rate": 6144,
"frame_count": 1
},
"tags": [
{
"type": "file-attributes",
"use_network": false,
"use_relative_urls": false,
"no_cross_domain_caching": false,
"use_as3": true,
"has_metadata": false,
"use_gpu": false,
"use_direct_blit": false
},
{
"type": "set-background-color",
"color": {
"r": 255,
"g": 255,
"b": 255
}
},
{
"type": "define-scene-and-frame-label-data",
"scenes": [
{
"offset": 0,
"name": "Scene 1"
}
],
"labels": []
},
{
"type": "show-frame"
}
]
}