为什么在反编译swf文件时jpexs工具不起作用? [英] Why the jpexs tool not working when decompile swf file?

查看:233
本文介绍了为什么在反编译swf文件时jpexs工具不起作用?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人知道如何反编译.SWF文件吗?

Anyone knows how to decompile .SWF file?

我已经尝试了JPEXS和Sothink SWF反编译器,但是它不起作用.

I have tried JPEXS and Sothink SWF Decompiler but it not working.

我将此.swf放在了 链接 .

I put this .swf in this link.

谢谢.

推荐答案

SWF不能通过JPEXS打开,因为它已被压缩 !!

The SWF is not opening with JPEXS because it is compressed!!.

当文件(例如:swf,jpeg,mp3,mp4 )未在任何程序中打开时,您要做的第一件事是检查格式使用 十六进制编辑器 ,字节是正确的.

The first thing you should do when a file (eg: swf, jpeg, mp3, mp4) does not open in any program, is to check if the format bytes are correct by using a hex editor.

检查文件字节:

通常,SWF文件以字节43 57 53(例如: "CWS")或什至字节46 57 53(例如: "FWS")开头.

Usually a SWF file begins with bytes 43 57 53 (eg:"CWS") or even bytes 46 57 53 (eg: "FWS").

  • 您的文件以78 DA 00 43 40 BC BF 43 57 53
    开头(后三个字节是正常SWF的预期43 57 53).

前两个字节78 DA表示它具有一些ZLib压缩(例如 .zip文件).

Those first two bytes 78 DA means it has some ZLib compression (eg: like a .zip file).

解决方案:
分解ZLib的两种选择.一种是通过AS3代码,另一种是通过外部(Windows)工具.

Solution:
Two options to decomress ZLib. One is by AS3 code and the other is by external (Windows) tool.

选项1 ),使用AS3解压缩.

Option 1) Use AS3 to decompress.

  • 获取库 AS3ZLib 并将其as3zlib文件夹复制到与您的文件夹相同的位置Flash项目.as文件. (在以下位置找到文件夹:src/com/wirelust/as3zlib/).

  • Get the library AS3ZLib and copy its as3zlib folder to same place as your Flash project .as files. (Find folder at: src/com/wirelust/as3zlib/).

将SWF文件的字节加载(或读取)到名为fileBytes的AS3字节数组中.

Load (or read) your SWF file's bytes into an AS3 bytearray called fileBytes.

尝试以下代码逻辑:

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字节保存到磁盘.

The bytes in swfBytes now can be saved as a file new.swf and this will open correctly in JPEXS. Use fileReference API to save AS3 bytes to disk.

选项2 )使用外部ZLib工具.

Option 2) Use an external ZLib tool.

使用 OffZip (对于 Windows 操作系统),可以解压缩SWF.
这是直接OffZip文件.将Offzip.exe复制到类似c:\offzip\的文件夹中.

Using OffZip (for Windows OS) you can decompress the SWF.
This is the direct OffZip file. Copy Offzip.exe into a folder like c:\offzip\.

现在通过运行cmd.exe打开命令行.键入cd\offzip\(按enter).或者,只需按住shift并右键单击Offzip文件夹,然后选择此处打开命令窗口" .

Now open command line by running cmd.exe. Type cd\offzip\ (press enter). Alternatively just hold shift and right-click the Offzip folder then choose "open command window here".

键入offzip -a vpt.swf(按enter).

您应该看到这样的输出...

You should see output like this...

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.

Now the output file 00000000.cws can be opened in JPEXS. You can rename this to 00000000.swf.

这篇关于为什么在反编译swf文件时jpexs工具不起作用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆