6

Can someone tell me if it is possible to view source code only using exe file. For example I have made project and in debug there is exe file so if I'll send this to someone he will be able to view it's source code(Using hacking tolls or by something)?

2

5 Answers 5

13

The answer is Yes

Your code can be de-compiled and can be seen.

I personally use this one for .net:

http://www.jetbrains.com/decompiler/

But it is not the only one, there are many decompilers exist.

Sign up to request clarification or add additional context in comments.

9 Comments

Nitpicking: The decompiler won't actually see the original source code, but it will be able to produce new source code for the application. Things like comments, and symbols that was compiled away, will not show up in the decompiled code.
Yes, that is correct. With the caveat about comments and such. As I said, the original source code that you have on your machine is not in the exe file, but the exe file can be reversed back into source code, changed (if necessary) and recompiled into a new executable file.
So if I will write there code to access SQL server it can't be seen?
The code to access the SQL Server will be seen. I think your best bet is to go to the decompiler that Shaharyar linked to, from Jetbrains, and see for yourself what it gets out of your exe file.
@user2971569 It is another topic. Use views, stored procedures etc from the SQL side.
|
4

Yep, there's Resharper or ILSpy

Comments

1

Certainly he/she can see your IL code, the code that has been constructed by your compiler. For instance, a tool for doing this is the MSIL Disassembler http://msdn.microsoft.com/en-us/library/f7dy01k1(v=vs.110).aspx. I suppose having the IL language it wouldn't be difficult to get the C# code.

Comments

1

You must use a decompiler as Net Reflector or JetBrains, anyway if your exe is obfuscated also them can not work

Comments

0

You can use the default ILDASM (IL disassembler) from VS command prompt.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.