Jump to content

Source code available


Oliver Nordestgaard

Recommended Posts

Hi,

I recently started creating a program for which i wanted my source code to be hidden, but discovered that in .NET this is not possible (to my knowledge), without external tools to obfuscate the code. I found out that more than a few developers, that don't have their source code available, have not obfuscated their code, meaning that the actual source code can be extracted using programs such as dotPeek. The source code that can be extracted includes the actual variable names and even comments. I saw that you had closed your source code because of copycats, and seeing as Paint.net is "affected" by this, i thought you wanted to know. I personally find confuserEx to be quite nice to circumvent this. If you are aware of this, or don't care, then feel free to ignore this

Link to comment
Share on other sites

Yes, I'm fully aware of all of this.

 

"Extracting" the source code isn't actually that simple. You can study it in a disassembly with dotPeek or Reflector, but you won't really be able to make changes and rebuild it. Even if you tell it to emit a directory structure full of .CS files.

The Paint.NET Blog: https://blog.getpaint.net/

Donations are always appreciated! https://www.getpaint.net/donate.html

forumSig_bmwE60.jpg

Link to comment
Share on other sites

  • 2 weeks later...

No you can't just study it in disassembly - it's the actual source code including comments and original variable names. See the following example of your code. If still in doubt choose a class with a comment or somethingimage.thumb.png.269dc173feb4c19ed294daed1bffa92a.png

Link to comment
Share on other sites

While C# decompilers are pretty good, they are not perfect.

 

In the code example you show, those are not the actual variable names used in the real code.  And, without those names, the code is actually more difficult to understand.

 

And, no, comments from the source files are not saved in the executable so the decompiler can not produce them.

 

While function names are preserved, variable names are lost and so are lots of other things.  Sometimes commands are changed (like from "switch" to "if then" blocks, etc.)

Link to comment
Share on other sites

In my own example i would get the following - have you done anything so that is not the case? The variable names are an exact match

image.thumb.png.1475eb7a2d9310a87c3b5b7f27b5ab7a.png

 

Link to comment
Share on other sites

  • BoltBait locked this topic
Guest
This topic is now closed to further replies.
×
×
  • Create New...