如何提取可执行文件的代码 [英] How do I extract the code of the executable file

查看:128
本文介绍了如何提取可执行文件的代码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经下载了exe文件,我不会从这个文件中提取代码



我尝试了什么:



我已经下载了exe文件,我不会从这个文件中提取代码

I've downloaded exe file and I wont to extract the code from this file

What I have tried:

I've downloaded exe file and I wont to extract the code from this file

推荐答案

这个过程叫做拆卸。有一个很棒的开源工具,ILSpy:

ILSpy [ ^ ]。



这个过程非常简单,输出质量非常好。输出语言是IL,C#和VB.NET。你可以拆卸整个组件或它的一部分。



-SA
The process is called "disassembly". There is a great open-source tool, ILSpy:
ILSpy[^].

The process is extremely easy and the quality of output is very good. Output languages are IL, C# and VB.NET. You can disassemble the whole assembly or a part of it.

—SA


你可以做到这一点 - 这是一个叫做反编译的过程 - 但对你来说有多大用处是另一回事。

快速谷歌将为你提供很多解决方案: exe来源c - Google搜索 [ ^ ]

问题是:

1)版权。如果原作者对你有源,那就好了 - 但在这种情况下,它通常是在某种形式的开源许可下发布的,而实际的源代码是通过Github同时发布的,或者是ZIP下载。如果您没有权限,那么如果您使用exe的内容生成您自己的代码版本,则可能会因盗窃而被起诉。

2)如果未发布在开源许可证下,EXE很有可能被混淆 - 这是一个旨在使其难以阅读的过程,因此你不能做你想做的事情 - 阅读源代码并找到他们是如何做到的。

3)EXE有两种主要的风味:Native和.NET。 .NET EXE可以被反编译成某种形式的代码(以上1和2为准)但Native exes几乎不能 - 它们是从更高级语言生成的优化机器代码,除非你想要涉及大量的汇编程序没有名称,没有注释,没有可见的结构,你不会得到任何可用的东西。本机EXE文件无法反编译为C#或VB。
You can do it - it's a process called decompiling - but how much use it'll be to you is another matter.
A quick google will give you lots of solutions: exe to source c - Google Search[^]
The problems are:
1) Copyright. If the original author is fine about you having the source, than that's good - but in that case it's normally published under an "open source" licence of some form and the actual source code is released at the same time either via Github, or as a ZIP download. If you don't have permission, then you could be prosecuted for theft if you use the contents of the exe to produce "your own" version of the code.
2) If it isn't released under an open source licence, then there is a good chance that the EXE is obfuscated - which is a process designed to make it as hard to read as possible so you can't do what you are trying to do - read the source and find out how they do it.
3) EXE's come in two main "flavours": Native and .NET. .NET EXEs can be decompiled into code of some form (subject to 1 and 2 above) but Native exes pretty much can't - they are optimised machine code generated from a higher level language and unless you want to wade through a huge amount of assembler with no names, no comments, and no visible structure you aren't going to get anything usable. Native EXE files cannot be decompiled to C# or VB.


这篇关于如何提取可执行文件的代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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