2

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?

Harshal Gajjar
  • 265
  • 1
  • 4
  • 12
  • Executables are binary files that your machine can interpret. I can write a function a million different ways that produces the same results and perhaps the same binary file. – ScottMcGready Jun 18 '14 at 10:45
  • possible duplicate of [Compiled vs. Interpreted Languages](http://stackoverflow.com/questions/3265357/compiled-vs-interpreted-languages) – Oliver Matthews Jun 18 '14 at 10:46
  • 1
    Effectively, you are asking what is the difference between an interpreted language (where the source is the thing you run) and a compiled language (where the source is compiled into the thing you run). – Oliver Matthews Jun 18 '14 at 10:47
  • Oh that's Oliver, I seriously had no clue what those words ment. :) – Harshal Gajjar Jun 18 '14 at 10:48
  • Possible duplicate of [Getting source from object file](http://stackoverflow.com/questions/2346754/getting-source-from-object-file) – Ciro Santilli OurBigBook.com Oct 02 '15 at 08:42

2 Answers2

3

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

Community
  • 1
  • 1
Rahul Tripathi
  • 168,305
  • 31
  • 280
  • 331
1

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.

Bsonjin
  • 438
  • 1
  • 4
  • 14