Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. How to remove CLI Header or how to disable dissasembling of my app

How to remove CLI Header or how to disable dissasembling of my app

Scheduled Pinned Locked Moved C#
csharptutorialquestionlounge
5 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    Matjaz xyz
    wrote on last edited by
    #1

    Hi. I want to know on how to remove the cli header. I actualy dont know what this is... but i tried to dissasemble a random app. (.exe) with .NET Reflector and it said that it cannot be disass. because it does not contain a CLI Header. If i try to dissasemble my .NET applications (just to create a new project and build it and then try to disassemble it) - it disassembles. Anyway on how to prevent on making this possible? Thank you in advance!

    Regards, Matjaž

    OriginalGriffO 1 Reply Last reply
    0
    • M Matjaz xyz

      Hi. I want to know on how to remove the cli header. I actualy dont know what this is... but i tried to dissasemble a random app. (.exe) with .NET Reflector and it said that it cannot be disass. because it does not contain a CLI Header. If i try to dissasemble my .NET applications (just to create a new project and build it and then try to disassemble it) - it disassembles. Anyway on how to prevent on making this possible? Thank you in advance!

      Regards, Matjaž

      OriginalGriffO Offline
      OriginalGriffO Offline
      OriginalGriff
      wrote on last edited by
      #2

      The reason it did not work (does not contain a CLI Header) is that it is a native app, rather than a .NET managed app. These do not work with reflection. As regards your .NET apps, the best you can do is obfuscate[^] it.

      No trees were harmed in the sending of this message; however, a significant number of electrons were slightly inconvenienced. This message is made of fully recyclable Zeros and Ones

      "I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
      "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt

      D M 2 Replies Last reply
      0
      • OriginalGriffO OriginalGriff

        The reason it did not work (does not contain a CLI Header) is that it is a native app, rather than a .NET managed app. These do not work with reflection. As regards your .NET apps, the best you can do is obfuscate[^] it.

        No trees were harmed in the sending of this message; however, a significant number of electrons were slightly inconvenienced. This message is made of fully recyclable Zeros and Ones

        D Offline
        D Offline
        dojohansen
        wrote on last edited by
        #3

        Correct. I will just add that it's still of course possible to disassemble any application; a native app just requires a native disassembler rather than a .net one. And native apps don't contain the metadata to reconstruct high-level code like .net apps do. So it would seem an alternative to obfuscation could be to write your secret code in C++ and compile it natively, then create a .net assembly that is a thin wrapper to use this native .dll in your .net apps. But it's not an attractive route to go imo if you're a .net programmer, especially if you haven't made native apps before and don't plan to do so anyway. Isn't copyright enough? :)

        OriginalGriffO 1 Reply Last reply
        0
        • D dojohansen

          Correct. I will just add that it's still of course possible to disassemble any application; a native app just requires a native disassembler rather than a .net one. And native apps don't contain the metadata to reconstruct high-level code like .net apps do. So it would seem an alternative to obfuscation could be to write your secret code in C++ and compile it natively, then create a .net assembly that is a thin wrapper to use this native .dll in your .net apps. But it's not an attractive route to go imo if you're a .net programmer, especially if you haven't made native apps before and don't plan to do so anyway. Isn't copyright enough? :)

          OriginalGriffO Offline
          OriginalGriffO Offline
          OriginalGriff
          wrote on last edited by
          #4

          dojohansen wrote:

          Isn't copyright enough?

          Um. I can think of a few sites that have been on the news recently that imply not... :~ :laugh:

          No trees were harmed in the sending of this message; however, a significant number of electrons were slightly inconvenienced. This message is made of fully recyclable Zeros and Ones

          "I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
          "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt

          1 Reply Last reply
          0
          • OriginalGriffO OriginalGriff

            The reason it did not work (does not contain a CLI Header) is that it is a native app, rather than a .NET managed app. These do not work with reflection. As regards your .NET apps, the best you can do is obfuscate[^] it.

            No trees were harmed in the sending of this message; however, a significant number of electrons were slightly inconvenienced. This message is made of fully recyclable Zeros and Ones

            M Offline
            M Offline
            Matjaz xyz
            wrote on last edited by
            #5

            Ok. Thanks. I went over the documentation u gave me and will try to work something out. Thanks for your help! :)

            Regards, Matjaž

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups