List of issuesList of issues

#1050 Decompile ActionScript in "Export SWF XML"
Date created:
Type: feature
Visibility: Everybody
Assigned to: developer honfika
State: new Help

Hi, I noticed that when exporting SWF files to XML, ActionScript is not decompiled. For example, if there is this script in the SWF: ``` on(release){ getUrl("../../?s=2", "_blank"); } ``` The string, "../../?s=2", appears nowhere in the XML. swfmill outputs this: ``` <Condition next="0" menuEnter="0" pointerReleaseOutside="0" pointerDragEnter="0" pointerDragLeave="0" pointerReleaseInside="1" pointerPush="0" pointerLeave="0" pointerEnter="0" key="0" menuLeave="0"> <actions> <GetURL url="../../?s=2" target="_blank"/> <EndAction/> </actions> </Condition> ``` Which I like. I would like FFDec to do something similar. I would use swfmill, but there is an issue where recompiling this in swfmill causes buttons in the SWF to do nothing, so I would prefer if FFDec had the same feature. (Also, swfmill hasn't been updated in about 2 years, whereas FFDec seems to be quite active!) Thanks for reading, and I hope you consider adding this feature; it would be very helpful.
Yes, it would be nice. The problem is that it would work only with non obfuscated swfs, because AS2 ofbuscators scrambles the actions, sometimes jumps to the middle of an instruction. So the reconstucted swf will be different from the original. This is why now only the actionbytes are in the xml. What is your goal, why do you need this feature?
I would like to automatically replace strings in SWFs in bulk. The way I thought to do it was to export flashes to xml via the command line, replace the strings in the xml, then reassemble the swf, but the strings are not directly outputted in the xml. If there's any other way to do this without using the GUI, please let me know.
Are the strings in a single DoAction (etc...) tag, or multiple instances anywhere in the swf?
Yes, the strings could appear anywhere, in a variety of differently-structured swfs.
With the latest nightly build you can import all as2 scrpts from a folder. This is the same as the "import script" button in the UI. So first export the scripts: ffdec.bat -export script outFolder as2.swf then replace the strings then import: ffdec.bat -importScript as2.swf as2_new.swf outFolder Is this enough for you?
Yes, I believe so. Thank you!
Assigned:developer honfika
Google Translate: Translate to Czech Translate to Slovak Translate to Russian Translate to Hungarian Translate to Swedish Translate to French Translate to German Translate to Spanish Translate to Italian
Change style: oceanic classic