none
Source code for a decompiler? RRS feed

  • Question

  • I was wondering if there are any open source projects that reveal how to decompile a .Net assembly into approximated source code, much as the various free reflector tools do.

    We allow customers to write small functional "plug in" classes that are used by a special database system, the system can load and run these plugins for users client apps.

    Users would like a way to browse the plugin binaries and see the source code within, as part of an existing admin tool we supply, it will help them administer systems in production use by being able to see, at least approximately, what the plugin does (I should add these are simple-ish and are just single classes that implement a simple interface).

    Ideally one wants some windows control that accepts a BinaryStream and then renders the (deduced) source code in a window.

    Does anyone have any thoughts on this ?

    Wednesday, February 18, 2009 1:56 PM

Answers

  • This strikes me as doing it completely backwards.  Why don't you only accept source code as a plug-in?  Compile it with System.CodeDom.
    Hans Passant.
    • Marked as answer by Captain Kernel Wednesday, February 18, 2009 5:50 PM
    Wednesday, February 18, 2009 2:31 PM
    Moderator

All replies

  • This strikes me as doing it completely backwards.  Why don't you only accept source code as a plug-in?  Compile it with System.CodeDom.
    Hans Passant.
    • Marked as answer by Captain Kernel Wednesday, February 18, 2009 5:50 PM
    Wednesday, February 18, 2009 2:31 PM
    Moderator
  • I agree with Hans, that best would be to accept the plug-in sources and compile them.

    Microsoft's ildasm sources are available in Shared Source CLI (see directory ildasm). However the license most probably doesn't permit reusing the source code anywhere (plus there's a lot of code). Also you could try this list of decompilers (some of them are open source).

    -Karel
    Wednesday, February 18, 2009 5:17 PM
    Moderator
  • nobugz said:

    This strikes me as doing it completely backwards.  Why don't you only accept source code as a plug-in?  Compile it with System.CodeDom.


    Hans Passant.



    Yes, I looked into this earlier, I think it is very doable once some research has been carried out.

    Thx
    H
    Wednesday, February 18, 2009 5:51 PM