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. .NET (Core and Framework)
  4. How to prevent code refactoring?

How to prevent code refactoring?

Scheduled Pinned Locked Moved .NET (Core and Framework)
csharptoolstutorialquestion
6 Posts 6 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.
  • H Offline
    H Offline
    He is Cool
    wrote on last edited by
    #1

    Hi, I want to prevent code refactoring. To explain, I do not want to let any one to use tools like .NET Reflector and see the code inside my .NET dll. Is this possible ? If so , by what means we can achieve this. Thanks, Mani

    G V 2 Replies Last reply
    0
    • H He is Cool

      Hi, I want to prevent code refactoring. To explain, I do not want to let any one to use tools like .NET Reflector and see the code inside my .NET dll. Is this possible ? If so , by what means we can achieve this. Thanks, Mani

      G Offline
      G Offline
      Guffa
      wrote on last edited by
      #2

      The term you are looking for is not "refactoring" but "reverse engineering". It's impossible to completely prevent reverse engineering. If the code can be run, then it can also be read, one way or the other. What you can do is to make it harder to decompile the code. One way is to use NGen to compile the IL code into native code. It can still be decompiled, but it decompiles into assembly code, not IL code, so it's not at all as easy to reverse engineer into high level code.

      --- It's amazing to see how much work some people will go through just to avoid a little bit of work.

      K 1 Reply Last reply
      0
      • G Guffa

        The term you are looking for is not "refactoring" but "reverse engineering". It's impossible to completely prevent reverse engineering. If the code can be run, then it can also be read, one way or the other. What you can do is to make it harder to decompile the code. One way is to use NGen to compile the IL code into native code. It can still be decompiled, but it decompiles into assembly code, not IL code, so it's not at all as easy to reverse engineer into high level code.

        --- It's amazing to see how much work some people will go through just to avoid a little bit of work.

        K Offline
        K Offline
        karam chandrabose
        wrote on last edited by
        #3

        but even if u did an NGen.exe , you would need the IL assembly for initial loading? dont you?

        G 1 Reply Last reply
        0
        • K karam chandrabose

          but even if u did an NGen.exe , you would need the IL assembly for initial loading? dont you?

          G Offline
          G Offline
          gnadeem
          wrote on last edited by
          #4

          i think karam is right. ngen file does not possess assembly metadata which will therefore be extracted from IL. signing an assembly does not fully protect it either. i have heared of Dotfuscator Community Edition but have never used it. it may be helpful.

          P 1 Reply Last reply
          0
          • G gnadeem

            i think karam is right. ngen file does not possess assembly metadata which will therefore be extracted from IL. signing an assembly does not fully protect it either. i have heared of Dotfuscator Community Edition but have never used it. it may be helpful.

            P Offline
            P Offline
            Paul Conrad
            wrote on last edited by
            #5

            gnadeem wrote:

            Dotfuscator Community Edition

            it is good and worthwhile to look at :)


            You will see a delete button on each of your posts. Press it. - Colin Angus Mackay

            1 Reply Last reply
            0
            • H He is Cool

              Hi, I want to prevent code refactoring. To explain, I do not want to let any one to use tools like .NET Reflector and see the code inside my .NET dll. Is this possible ? If so , by what means we can achieve this. Thanks, Mani

              V Offline
              V Offline
              Vasudevan Deepak Kumar
              wrote on last edited by
              #6

              You can use Obfuscators to accomplish this.

              Vasudevan Deepak Kumar Personal Homepage Tech Gossips

              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