【发布时间】:2019-03-14 09:47:24
【问题描述】:
【问题讨论】:
-
我认为,文件被混淆(防止反编译)。
-
@Organis 那么在这种情况下我能做什么先生
-
在这种情况下,您了解该 SWF 的作者不想让您反编译它,并且您尊重作者的意愿,停止这样做。
标签: flash
【问题讨论】:
标签: flash
SWF 未使用 JPEXS 打开,因为它已压缩!!。
当一个文件(例如:swf、jpeg、mp3、mp4)在任何程序中都没有打开时,你应该做的第一件事是检查格式使用hex editor 是正确的字节。
检查您的文件字节数:
通常 SWF 文件以字节 43 57 53(eg:"CWS")甚至字节 46 57 53(eg: "FWS")开头。 p>
您的文件以 78 DA 00 43 40 BC BF 43 57 53
开头(最后三个字节是正常 SWF 的预期 43 57 53)。
前两个字节78 DA 表示它有一些 ZLib 压缩(eg: 像
.zip 文件)。
解决方案:
解压 ZLib 的两个选项。一种是通过 AS3 代码,另一种是通过外部 (Windows) 工具。
选项1)使用AS3解压。
获取库 AS3ZLib 并将其 as3zlib 文件夹复制到与您的 Flash 项目 .as 文件相同的位置。 (查找文件夹:src/com/wirelust/as3zlib/)。
将 SWF 文件的字节加载(或读取)到名为 fileBytes 的 AS3 字节数组中。
试试这个代码逻辑:
import Zlib; //do import of API
....
public var zlibdecomp :Zlib; //create instance variable
....
public var fileBytes :ByteArray = new ByteArray;
public var swfBytes :ByteArray = new ByteArray;
//# SWF original file bytes load
fileBytes = ... ; //your loading code here
//# Decompress loaded into new SWF bytes
zlibdecomp = new Zlib; //create new ZLIB instance in variable
swfBytes = zlibdecomp.uncompress( fileBytes ); //update with decompress version
trace("swfBytes length (DEFLATED) : " + swfBytes.length); //is 8,617,377 bytes??
swfBytes 中的字节现在可以保存为文件new.swf,这将在 JPEXS 中正确打开。使用 fileReference API 将 AS3 字节保存到磁盘。
选项 2) 使用外部 ZLib 工具。
使用OffZip(对于Windows 操作系统)您可以解压缩 SWF。
这是direct OffZip file。将Offzip.exe 复制到c:\offzip\ 之类的文件夹中。
现在通过运行cmd.exe 打开命令行。键入cd\offzip\(按enter)。或者,按住shift 并右键单击Offzip 文件夹,然后选择“在此处打开命令窗口”。
输入offzip -a vpt.swf(按enter)。
你应该看到这样的输出...
C:\offzip>offzip -a vpt.swf
Offzip 0.4
by Luigi Auriemma
e-mail: aluigi@autistici.org
web: aluigi.org
- open input file: vpt.swf
- zip data to check: 32 bytes
- zip windowBits: 15
- seek offset: 0x00000000 (0)
+------------+-----+----------------------------+----------------------+
| hex_offset | ... | zip -> unzip size / offset | spaces before | info |
+------------+-----+----------------------------+----------------------+
0x00000000 .
................................................................................
................................................................................
................................................................................
................................................................................
................................................................................
.................................................................... 8496131 ->
8617377 / 0x0081a403 _ 0 8:7:26:0:1:2657f334
- 1 valid compressed streams found
- 0x0081a403 -> 0x00837da1 bytes covering the 100% of the file
现在可以在 JPEXS 中打开输出文件 00000000.cws。您可以将其重命名为00000000.swf。
【讨论】:
42 55 更改为 43 57。如果可能,要么显示更长的字节,要么共享一个指向 SWF 本身的链接。
43 57 并执行相同的教程但无法提取它。我有一个example file。