electron 解压zip_如何解压缩Electron pack生成的单个EXE文件?

当需要研究由Electron打包的单个EXE应用程序的源代码时,不能简单地将其解压缩。通常,需要使用反编译器如IDA Pro将机器代码转换为可读的C代码。尽管Electron的执行文件本身只是一个包装器,真正的实现位于可解压的asar文件中,其中包含JavaScript源代码。若要获取源代码,应当关注asar的解压缩。
摘要由CSDN通过智能技术生成

I have an EXE file which is packed and run by Electron. Now I want to unpack the single EXE file (not asar) to study the source code of this app. But how?

I have tried to unpack this web desktop app (EXE file packed by Electron) by change the extension of this file from exe to zip, 7z and tar. But all failed and indicates that this file is in "PE" format.

Could you please show some ways to unpack this Electron app in a single exe file? Thank you.

解决方案

You don't unpack an executable file, you decompile it.

AFAIK, you won't get the source code from executable, all you get is machine code that is assembly instructions. There are tools out there which can help you to convert this assembly instructions to readable C code, for example, IDA Pro can do this.

There are lot many other decompilers and debuggers which can help you in this scenario. Like x64 debugger or Olly Debugger.

Trust me, you need a lot many hours to get proficient with these tools before you can actually make sense out of the raw assembly instructions, getting the source code out is a long way ahead.

And out of curiosity, why you wanted the source code of electron executable? All the real implementations for electron app should be inside ASAR packed file (which can be decompressed and then you have all the JavaScript source code). Electron executable is just like a wrapper which runs the JavaScript.

You can check out the electron implementation here.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值