请帮我从exe编写源代码 [英] Please help me to make source code from exe

查看:54
本文介绍了请帮我从exe编写源代码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,

我可以将用Microsoft Visual C ++编写的exe文件反编译成源代码。

如果可能请告诉我如何。

谢谢

Hello,
Can I exe file made in Microsoft Visual C++ decompile into source code.
If it is possibly please tell me how.
Thanks

推荐答案




Michael Dekson写道:


Michael Dekson wrote:
您好,
我可以将用Microsoft Visual C ++编写的exe文件反编译成源代码。
如果可能请告诉我如何。
Hello,
Can I exe file made in Microsoft Visual C++ decompile into source code.
If it is possibly please tell me how.




MS技术支持人员说了什么?



What did MS technical support say?


2004年2月11日星期三13:13:19 +0100,Michael Dekson写道:
On Wed, 11 Feb 2004 13:13:19 +0100, Michael Dekson wrote:
我可以将用Microsoft Visual C ++编写的exe文件反编译成源代码。
如果有可能请告诉我如何。
Can I exe file made in Microsoft Visual C++ decompile into source code.
If it is possibly please tell me how.




此处有Offtopic但是:


对于几乎所有的编译器,答案都是否定的。理论上可以有一个

编译器,在可执行文件中留下足够的无关数据,以便能够重建源代码,但我不知道。


你可能得到的是装配。然后也许可以将
转换为与原始代码完成相同工作的C代码,但

我见过这样的汇编 - > C并且它不漂亮,它与原始代码不太相似




如果可能的话,不要你认为谷歌搜索会给你很多实用工具吗?如果有可能你认为

有人会对版权保护感到困扰吗?


-

NPV


大字打印,小字打印

Tom Waits - 向上走吧



Offtopic here but:

For almost any compiler the answer is no. There could theoretically be a
compiler out there that leaves enough unnessesary data in the executable
to be able to reconstruct the source, but I don''t know of any.

What you probably could get out is the assembly. And then maybe that could
be converted to C code that does the same job as the original code, but
I''ve seen such assembly -> C and it''s not pretty, and it doesn''t resemble
the original code much.

If it had been possible don''t you think a google search would have given
you a ton of utilities to do it. If it had been possible do you think
anyone would even have bothered with copy protection?

--
NPV

"the large print giveth, and the small print taketh away"
Tom Waits - Step right up


Michael Dekson写道:
Michael Dekson wrote:
您好,
我可以将用Microsoft Visual C ++编写的exe文件反编译成源代码。
如果是可能请告诉我如何。
谢谢
Hello,
Can I exe file made in Microsoft Visual C++ decompile into source code.
If it is possibly please tell me how.
Thanks




以下是如何做到这一点:

1.找到可执行文件的格式。

尝试 http://www.wotsit.org

2.解析可执行文件的标题部分。提取

并保留重要信息。

3.指向第一条指令数据。

4.读入指令数据并转换为汇编

语言陈述。以十六进制显示所有数字量。

此外,跟踪地址。你需要这个

信息来为所有循环创建标签,函数

调用。

5.将指令输出到文本文件中。

6.重复步骤4& 5表示文件中的所有可执行字节。

7.创建汇编语言文件后,解析它看起来像

的模式,例如for循环,while和do -while循环。

还扫描功能序言(即参数传递,
局部变量分配)和函数epilog。

一旦模式是发现,输出到另一个文本文件,

这将是你的C源文件。


一些注意事项:

1。设计一些用于命名变量和函数的方案。

2.识别char,int,float和

内存中的双重表示之间的区别。

3.研究操作系统。创建一个

操作系统调用序列表及其功能

名称。当你改进你的
程序以列出操作系统调用时,这将派上用场。

4.沿着相同的路线,研究
$ b的呼叫序列$ b C和C ++库例程。你需要这个来把

将对抵消的调用翻译成更易读的

函数名。

5.结果代码高寻找概率

与原始源代码完全不同;或者可读的

源代码。

6.总是通过运行汇编语言测试你的实用程序
通过汇编程序输出
并编译你的源代码< br $> b $ b程序。

7.某些操作系统有动态库。了解

如何识别动态库函数的激活。

8.让没有人欺骗你把汉堡包变成一只b $ b b牛。这个比喻并不适用;作为一个_can_将

可执行文件转换为源文件。


这是一个很棒的项目。我个人有其他项目

可以继续工作,这就是我不这样做的原因。

-

Thomas Matthews


C ++新闻组欢迎辞:
http://www.slack.net/~shiva/welcome.txt

C ++常见问题: http://www.parashift.com/c++-faq-lite

C常见问题:< a rel =nofollowhref =http://www.eskimo.com/~scs/c-faq/top.htmltarget =_ blank> http://www.eskimo.com/~scs/c -faq / top.html

alt.comp.lang.learn.c-c ++ faq:
http://www.raos.demon.uk/acllc-c++/faq.html

其他网站:
http://www.josuttis.com - C ++ STL图书馆书



Here is how to do it:
1. Find the format of the executable file.
Try http://www.wotsit.org
2. Parse the header section of the executable file. Extract
and retain important information.
3. Point to the first instruction data.
4. Read in the instruction data and convert into an assembly
language statement. Display all numeric quantities in hex.
Also, keep track of the addresses. You will need this
information for creating labels for all the loops, function
calls.
5. Output the instruction into a text file.
6. Repeat steps 4 & 5 for all executable bytes in the file.
7. Once the assembly language file is created, parse it looking
for patterns, such as for-loops, while and do-while loops.
Also scan for function prologue (i.e. parameter passing,
local variable allocation) and function epilog.
Once a pattern is found, output it to another text file,
which will be your C source file.

Some notes:
1. Devise some scheme for nameing variables and functions.
2. Recognize the difference between char, int, float and
double representations in memory.
3. Research the operating system. Create a table of
operating system call sequences and their function
names. This will come in handy as you improve your
program to list operating system calls.
4. Along the same lines, research the call sequences for
the C and C++ library routines. You''ll need this to
translate the calls to offsets into more readable
function names.
5. The resultant code has a high probability of looking
nothing like your original source code; or an readable
source code.
6. Always test your utility by running your assembly language
output through an assembler and compiling your source
program.
7. Some operating systems have dynamic libraries. Learn how
to recognize the activation of dynamic library functions.
8. Let nobody fool you about turning hamburger back into a
cow. That analogy doesn''t apply; as one _can_ convert an
executable into a source file.

This is an excellent project. I personally have other projects
to work on, which is why I''m not doing this.

--
Thomas Matthews

C++ newsgroup welcome message:
http://www.slack.net/~shiva/welcome.txt
C++ Faq: http://www.parashift.com/c++-faq-lite
C Faq: http://www.eskimo.com/~scs/c-faq/top.html
alt.comp.lang.learn.c-c++ faq:
http://www.raos.demon.uk/acllc-c++/faq.html
Other sites:
http://www.josuttis.com -- C++ STL Library book


这篇关于请帮我从exe编写源代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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