Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What types of executables can be decompiled?

Tags:

decompiling

I think that java executables (jar files) are trivial to decompile and get the source code.

What about other languages? .net and all?

Which all languages can compile only to a decompile-able code?

like image 304
Niyaz Avatar asked Sep 04 '08 12:09

Niyaz


2 Answers

In general, languages like Java, C#, and VB.NET are relatively easy to decompile because they are compiled to an intermediary language, not pure machine language. In their IL form, they retain more metadata than C code does when compiled to machine language.

Technically you aren't getting the original source code out, but a variation on the source code that, when compiled, will give you the compiled code back. It isn't identical to the source code, as things like comments, annotations, and compiler directives usually aren't carried forward into the compiled code.

like image 86
Tim Howland Avatar answered Jan 03 '23 23:01

Tim Howland


Managed languages can be easily decompiled because executable must contain a lot of metadata to support reflection.
Languages like C++ can be compiled to native code. Program structure can be totally changed during compilation\translation processes.
Compiler can easily replace\merge\delete parts of your code. There is no 1 to 1 relationship between original and compiled (native) code.

like image 38
aku Avatar answered Jan 03 '23 23:01

aku