JPEXS Free Flash Decompiler Issue Tracker

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

NEW : We have got a new blog where we post some interesting SWF internals info.

List of issuesList of issues

#1403 Can't import an exported pcodes using the -importScript command
Author: user kenma9123
Date created:
Type: bug
Visibility: Everybody
Assigned to:
Labels: ImportP-code
State: new Help

> What steps will reproduce the problem? Extract any scripts as pcode, whether it's from the command line or the gui. Now try to reimport it back using the GUI or the command line. From GUI it said 0 scripts imported. Note I was pointing it to where I extracted the files. For example I extracted it to /source, then on the dialog I pointed it to source. When imported using the command line, you will get no messages or any identification that it success import. my command is ffdec.bat -importScript infile.swf outfile.swf source Re-open the SWF file via GUI and you'll see the modified pcode isn't reimported back. > What is the expected output? What do you see instead? The expected output should be that the modified pcode must reimported back safely. If that's how I understand this work. I saw nothing, just nothing. The console is blank > What version of the product are you using? Is it "nightly build"? Which operating system do you have? v10.0 > Please provide any additional information below. If the problem is related to a SWF file, attach it here, otherwise we can't help you. Like I said on the above section, reimporting pcode via importScript does not work. It works okay with normal asscripts tho. But I don't want to use it because it messed up the code somehow.So I endup using pcode instead. I don't have any specific swf, because its the same on every SWF I tried. Unless I'm missing something here. Thanks
user
anybody can help me deal with this problem?
user
Hello, I digged through the source code and found out: The importScript Option only accepts files with the .as Extension. I also looked through the History of the respective source file - it seems it has always only supported Files with the .as Extension. Source File: com.jpexs.decompiler.flash.importers.AS3ScriptImporter The GUI and the CLI use the same function.
admin
Yes, there is no support for P-code import currently other than editation in the GUI.
user
Hi, I would really appreciate a feature to import P-Code. Is implementation planned? Thank you!
user
Also, in issue #762, honfika said that there is a way to replace P-Code via the command line, but I tried his example and was not able to get it to work. And the issue he referenced in his explanation (#658) is a private issue. Is it somehow possible or was honfika's info incorrect?
admin
nosamu: Current version (18.4.0) has a bug preventing you to run -replace command with three arguments. It is fixed in nightly 2518. See issue #1994 where this was discussed, and there's also a sample usage. So yes, there actually is a way to "import" a p-code script, we call it "replace" as it only replaces specific method body ids you pass to them. It is not a bulk import. And it is not for sure any way to bulk import the previously exported P-codes. You must manually pass only the method content, not the whole class. And you must know method body id and the script name (class) which it is in. You can enable display of method body ids on Advanced settings / Scripts page.
user
Thank you for the explanation! I'm happy that's it's possible to replace P-code from the command line after all. But this process seems a bit tedious, so I've opened a feature request in #2001 to explain how I'd like it to be improved.