#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2005
    Location
    Saint Kiev Russia
    Posts
    13
    Rep Power
    0

    Question Crypte python source file


    I has some problem, i can develope corporetion soft and hide source file, but python binary files can decompiled=\
    any ideas?
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Nov 2004
    Location
    There where the rabbits jump
    Posts
    556
    Rep Power
    12
    Alittle more info woukd not hurt...

    Please what do you wanna do
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2004
    Posts
    461
    Rep Power
    25
    if you are planing on the security of your code to be in the fact that no one can see your source than your dead wrong. You should never relay on that, ask microsoft. Also with python you cannot create binarys that cannot be decompiled, actually you can't do that in any language, but python is even easyer to decompile.

    but if your code isn't secure enough to release the source out to people then you really need to redo some coding. This is a very very very bad hapit to get into, please don't.
  6. #4
  7. Contributing User
    Devshed Intermediate (1500 - 1999 posts)

    Join Date
    Dec 2004
    Location
    Meriden, Connecticut
    Posts
    1,797
    Rep Power
    155
    It's a bit difficult to understand you. But won't compiling your program to an executable (according to your platform) fix this problem? Once your file is an executable (.exe extension for example) no one can decompile or view your code the way you can see it in your Python file.
  8. #5
  9. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2004
    Posts
    461
    Rep Power
    25
    Originally Posted by †Yegg†
    It's a bit difficult to understand you. But won't compiling your program to an executable (according to your platform) fix this problem? Once your file is an executable (.exe extension for example) no one can decompile or view your code the way you can see it in your Python file.
    no this is not true. It is farly simple to decompile it even from there. It really isn't a complete binary it more or less just puts the interpiter into an executible that runs your code. But this is true with even a c++ binary. Even tho the decompiled v. is usually in asm or similar. And the verible names are lost and your code looks absolutly horible and is very hard to read.
  10. #6
  11. Contributing User
    Devshed Intermediate (1500 - 1999 posts)

    Join Date
    Dec 2004
    Location
    Meriden, Connecticut
    Posts
    1,797
    Rep Power
    155
    But after a file is say, an executable with a .exe extension, not a compiled Python program, I don't see how you can possible uncompile something. If you would easily uncompile them then wouldn't more and more people be editing softwares and changing their code? Or is this uncompiled code unreadable to a human?
  12. #7
  13. Hello World :)
    Devshed Frequenter (2500 - 2999 posts)

    Join Date
    Mar 2003
    Location
    Hull, UK
    Posts
    2,537
    Rep Power
    69
    Anything can be decompiled, all that is really needed to to reverse the process that created the compiled version; easier said than done but it is still doable. Especially with Byte-code!

    Note: you may loose variable and function names but I imagine this sort of thing could be sorted relatively easily with a little search and replace should the problem arise .

    In any case, it is possible and it is a bad idea to rely on your code not being readable as Cyber stated. As for making the code more secure it is usually more trouble than its worth or so I've read.

    This topic has come up a few times before so I would give the forum a quick search .

    Take care,

    Mark.
    programming language development: www.netytan.com Hula

  14. #8
  15. Contributing User
    Devshed Intermediate (1500 - 1999 posts)

    Join Date
    Dec 2004
    Location
    Meriden, Connecticut
    Posts
    1,797
    Rep Power
    155
    I've looked at the source of programs this way, only they were created in VB6 and I used Hex Workshop to view it. While it (the programs) was created in VB6, I was able to view variable names, but not what they equaled.
  16. #9
  17. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2004
    Posts
    461
    Rep Power
    25
    if you view with a hex editor all your seeing is the binary it is still compiled but it is at its lowest level of the running. If you used a decompiler it moves the code up a few levels to asm or even c sometimes. depends on the decomipler.
  18. #10
  19. Mini me.
    Devshed Novice (500 - 999 posts)

    Join Date
    Nov 2003
    Location
    Cambridge, UK
    Posts
    783
    Rep Power
    14
    Hi,

    If you still want to use python then..

    Use the command line optimisation -OO to produce optimized bytecode without doc strings - it is a little harder to reverse engineer.

    Decide which bits you want to protect. For example, if there is a key algorithm you want to protect then consider coding it's sections as small functions and putting these function in a C extension module. Then the problem for the cracker is to reverse engineer C code mixed with python which is much more difficult.

    grim
  20. #11
  21. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2004
    Posts
    461
    Rep Power
    25
    in reality, you shouldn't call this crypte, it should be more security through opsecure, witch i feel is a very false feeling of security. Also, if it is something to do with cryptography then what i said above about if they can't see the code then it is more secure is a very very bad way to think about it. A cipher or whatever else you are making HAS to be good enough to not let anyone else be able to reverse the cipher text back to plain text with or without the cipher source.

IMN logo majestic logo threadwatch logo seochat tools logo