JPEXS Free Flash Decompiler Issue Tracker

If you are looking for the decompiler itself, visit https://github.com/jindrapetrik/jpexs-decompiler

: WARNING - support of the decompiler is now VERY LIMITED. There are no active developers. This means waiting times in the issue tracker are very long and mostly depend on community. Sorry for the inconvenience.

List of issuesList of issues

#1351 Replace pcode command line using method name
Author: user sarcova
Date created:
Type: feature
Visibility: Everybody
Assigned to:
State: new Help

Hi, I need to replace the specific pcode of a method inside my swf in an autonomous way. I am aware this is already possible with the -replace command. The problem with this approach in my case is that there are multiple versions of my swf which I need to patch and I can't know the method index id beforehand. I do, however, know the name of the method. Could you please add method name as an option for the -replace command or provide a way to get that method index id using command line ? Thanks, Arthur
user
You can export your target swf as a p-code. Making edits on your method. Then, inject the script back and re-render a new swf. In an autonomous way, it would be like ---------------------- // export all scripts as P-code java -jar ffdec.jar -format script:pcode -export script /source target.swf // processing source file. In this case, inject your p-code with your script and save it cat /source/scripts/some-class.pcode | some-text-processing-script.sh > /source/scripts/some-class.pcode // inject exported modified scripts back to the original swf java -jar ffdec.jar -importScript target.swf out.swf /source ---------------------- In order to use -importScript, you have to let JPEXS know where the Flex SDK path is. Flex SDK can be download on Adobe site http://www.adobe.com/devnet/flex/flex-sdk-download.html Download and extract. Then, launch JPEX. Go to "Settings" -> "Advanced Settings" -> "Paths" -> on "4) Flex SDK directory path" point it to your flex sdk directory
user
Thanks for this method but it had lots of constraints in my case :(. I forked the sources and edited the "-replace" command to suit my needs. If anyone ends up here and need a solution : https://github.com/omen-/jpexs-decompiler