问题
I need some information on executable files, thanks in advance, this is a new topic in our grade.
I've seen a lot of questions asking how to extract, but my question is why can't we get the original source code? Yeah using decompilers we can extract but those codes are not the exact code used to develop the program.
I mean, if a computer is running a software it obviously has to have some code to refer from, then why can't we get that code? Also, do exe files have the same code which is developed by the programmer? Is it that OSs are developed in such a way that they don't leak source code from an executable file?
回答1:
The .exe file is made up of binary numbers which consist of 1's and 0's. And these files contain some additional code that support code from many source. Operating systems use binary languages to operate, this is what we call machine code. (Getting the code back from the exe is like getting the apple back from the apple juice) ;)
Also check Compiled vs. Interpreted Languages
回答2:
The process to transform the source code into the exe file is extremely complex.
For example, when it is being compile, the language of the source code (eg. c++ etc) is transformed into machine code. It is like when you eat something, those things turns into feces after being process by your stomach. Therefore it's quite impossible to revert exe file to source code.
来源:https://stackoverflow.com/questions/24283493/why-cant-we-extract-source-code-from-executable-file