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. The Lounge
  3. How can we use badly written code

How can we use badly written code

Scheduled Pinned Locked Moved The Lounge
questionsecurityhelp
5 Posts 5 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
    Member 4608898
    wrote on last edited by
    #1

    We've all been there. Look at some code written by someone else and start thinking what is this guy doing? Long runs of code with no comments, code that is sometimes in procedures but also repeated outside procedures. On the plus side, wouldn't this be an ideal candidate for code obfuscation or security? You can't even understand it with the source code with comments: how about without source code or comments? If the obfuscator, also followed the same disorganized behaviour of a bad programmer, reverse engineering would be really difficult. I wonder if any obfuscation companies ask people to send in samples of bad code. The problem with security is that it is written by "good" programmers - it all lives in one routine which is called from everywhere. Clobber that routine and you've cracked the security. It would be better if the routine was inlined. Also it should not always follow the same sequence, which is what a bad programmer would typically do. CUP

    K OriginalGriffO D 3 Replies Last reply
    0
    • M Member 4608898

      We've all been there. Look at some code written by someone else and start thinking what is this guy doing? Long runs of code with no comments, code that is sometimes in procedures but also repeated outside procedures. On the plus side, wouldn't this be an ideal candidate for code obfuscation or security? You can't even understand it with the source code with comments: how about without source code or comments? If the obfuscator, also followed the same disorganized behaviour of a bad programmer, reverse engineering would be really difficult. I wonder if any obfuscation companies ask people to send in samples of bad code. The problem with security is that it is written by "good" programmers - it all lives in one routine which is called from everywhere. Clobber that routine and you've cracked the security. It would be better if the routine was inlined. Also it should not always follow the same sequence, which is what a bad programmer would typically do. CUP

      K Offline
      K Offline
      KarstenK
      wrote on last edited by
      #2

      Not all. For a security breach is only ONE HOLE needed to tear all down. Bad code is bad code forever - because nobody will clean it up. X|

      Press F1 for help or google it. Greetings from Germany

      1 Reply Last reply
      0
      • M Member 4608898

        We've all been there. Look at some code written by someone else and start thinking what is this guy doing? Long runs of code with no comments, code that is sometimes in procedures but also repeated outside procedures. On the plus side, wouldn't this be an ideal candidate for code obfuscation or security? You can't even understand it with the source code with comments: how about without source code or comments? If the obfuscator, also followed the same disorganized behaviour of a bad programmer, reverse engineering would be really difficult. I wonder if any obfuscation companies ask people to send in samples of bad code. The problem with security is that it is written by "good" programmers - it all lives in one routine which is called from everywhere. Clobber that routine and you've cracked the security. It would be better if the routine was inlined. Also it should not always follow the same sequence, which is what a bad programmer would typically do. CUP

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

        The other use for badly written code is to include it in your project, unobfuscated, and in debug mode so it includes the source. If you can get it in VB6 or earlier that's even better. Compiler warnings (or even errors if you could manage it) are good. You don't have to call it, or use it in any way. But if you can hide a few side effects in there that you do use as a "security feature" that'd work as well. But when hackers spot it, it'll discourage them more than obfuscation ever would! :laugh:

        Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...

        "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

        K 1 Reply Last reply
        0
        • M Member 4608898

          We've all been there. Look at some code written by someone else and start thinking what is this guy doing? Long runs of code with no comments, code that is sometimes in procedures but also repeated outside procedures. On the plus side, wouldn't this be an ideal candidate for code obfuscation or security? You can't even understand it with the source code with comments: how about without source code or comments? If the obfuscator, also followed the same disorganized behaviour of a bad programmer, reverse engineering would be really difficult. I wonder if any obfuscation companies ask people to send in samples of bad code. The problem with security is that it is written by "good" programmers - it all lives in one routine which is called from everywhere. Clobber that routine and you've cracked the security. It would be better if the routine was inlined. Also it should not always follow the same sequence, which is what a bad programmer would typically do. CUP

          D Offline
          D Offline
          den2k88
          wrote on last edited by
          #4

          How can we use badly written code

          Vogon poetry.

          GCS d--- s-/++ a- C++++ U+++ P- L- E-- W++ N++ o+ K- w+++ O? M-- V? PS+ PE- Y+ PGP t++ 5? X R++ tv-- b+ DI+++ D++ G e++>+++ h--- ++>+++ y+++*      Weapons extension: ma- k++ F+2 X If you think 'goto' is evil, try writing an Assembly program without JMP. -- TNCaver "When you have eliminated the JavaScript, whatever remains must be an empty page." -- Mike Hankey

          1 Reply Last reply
          0
          • OriginalGriffO OriginalGriff

            The other use for badly written code is to include it in your project, unobfuscated, and in debug mode so it includes the source. If you can get it in VB6 or earlier that's even better. Compiler warnings (or even errors if you could manage it) are good. You don't have to call it, or use it in any way. But if you can hide a few side effects in there that you do use as a "security feature" that'd work as well. But when hackers spot it, it'll discourage them more than obfuscation ever would! :laugh:

            Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...

            K Offline
            K Offline
            Kenneth Haugland
            wrote on last edited by
            #5

            Dammit, Stop talking about Windows 8. :laugh:

            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