问题
I do not know what language a program was written in, but I'd like to find a decompiler that can decompile its source code and find it out what language it was written in.
If it is made in pascal, c, bas, vb, qb or something this way and decode/save as a readable .src
Something like exe2bin or exe2src I have a coupple DOS-programs, I think were made in pascal. I need to decompile these programs so I can make them a Win32 application.
回答1:
Hexrays http://www.hex-rays.com/decompiler.shtml is a product that decompiles any Windows executable to C source code. More than any other decompiler, it does not achieve a roundtrip decompilation -- depending on the language, it may be more or less impossible to reconstruct the program from the decompiled source.
For some languages this is easier than for others. E.g. .NET languages have Reflector, and I believe I've seen something similar for VB6.
回答2:
You seem to be looking for some sort of "theory of everything" decompiler. There is no such thing. If you have any doubts, give a thought to this:
Why is closed source software different than open source software?
The answer is, of course, that you cannot see the source code of a closed source program ;) You may try with existing decompilers, but there is no guarantee you will succeed, which you seem to expect.
回答3:
You can write a decompiler that takes any type of binary and translates it to a single higher-level language, albeit impractical in many cases.
回答4:
A skilled human can look at the .exe with a hex file viewer. Most compilers leave their identity pretty clearly in the strings in the program.
A program to do that, now that's harder.
来源:https://stackoverflow.com/questions/4842654/is-there-software-akin-to-an-ultimate-decompiler-that-will-work-for-any-langua