×

Discussion Board

Results 1 to 7 of 7
  1. #1
    Registered User
    Join Date
    Mar 2008
    Posts
    11

    Protecting your code

    Hi,
    How can one protect the Python source code in a commercially deployed SIS?
    Regards,
    Kashif Razzaqui

  2. #2
    Super Contributor
    Join Date
    Mar 2003
    Location
    Espoo, Finland
    Posts
    976

    Re: Protecting your code

    Quote Originally Posted by kashifrazzaqui View Post
    How can one protect the Python source code in a commercially deployed SIS?
    You cannot do that.

    You can compile your script.py to script.pyc using python 2.2.2 or 2.2.3 in your desktop. This automatically means that you must create a readable file.py to launch your compiled script.pyc in phone and release both together.

    Furthermore you can first run your python code through obfuscator. The only one I ever checked could handle only a single file, though. Few commercial quality sw are writted in one single file. Sure, it can and has been done

    After all of this anyone can open your SIS archive and decompile the python byte code back to readable format. It's not exactly same source code that you wrote originally, but it does reveal algorithms and procedures.

    One thing, which I haven't checked, but which might be worth investigation is storing your (obfuscated) sources in some kind of encrypted archive and run from there:

    http://docs.python.org/lib/module-zipimport.html

    Problems with this are that you still need to store ZIP file archive password inside your py/pyc/some file. Also encrypted ZIP archives can be broken with time etc. Most of all, this is a 2.3 feature and thus not available...

    Won't be easy,

    --jouni

  3. #3
    Registered User
    Join Date
    Mar 2008
    Posts
    11

    Re: Protecting your code

    Thanks Jouni, so basically PyS60 is only good for proto-typing. All commercial development must happen in C++. Sigh..
    Regards,
    Kashif Razzaqui

  4. #4
    Super Contributor
    Join Date
    Mar 2003
    Location
    Espoo, Finland
    Posts
    976

    Re: Protecting your code

    You CAN use python for commercial sw development, it's very common on other platforms!

    You just cannot "protect" your source code. Even C++ can be decompiled and reverse engineered. Some companies are offering automated software to do such. The question is how much do you need to protect your code: for example anything related to security or monetary transfers might not be good python programs. Games, utilities, anything not using network connection should be ok.

    Python source code protection can be made as safe as java, which really isn't much. Still there are thousands of commercial java applications.

    Basically using obfuscators and pre-compilation is good enough to stop curious individuals. Determined professionals you can never stop, no matter what you do. Microchips can be reverse engineeded, too, if someone really wants to do it.

    Btw you just asked about source code protection. Making a "commercial" release is another nice question

    Cheers,

    --jouni

  5. #5
    Registered User
    Join Date
    Mar 2008
    Posts
    11

    Re: Protecting your code

    Hey Jouni,
    A penny for your thoughts on commercialization...
    Regards,
    Kashif Razzaqui

  6. #6
    Super Contributor
    Join Date
    Mar 2003
    Location
    Espoo, Finland
    Posts
    976

    Re: Protecting your code

    Quote Originally Posted by kashifrazzaqui View Post
    A penny for your thoughts on commercialization...
    It's not worth that much - and it's not a pretty thought. Please check this thread: http://discussion.forum.nokia.com/fo...d.php?t=131180

    Since pyS60 world is fragmented (backwards compatibility, hw features, 3rd party extensions), future is unknown (no public roadmap), doesn't come built-in with phones (main cause of problems), requires using extensions for too many hot features (LBS, BT, advanced UI), doesn't offer all basic UI features, then developing commercial sw which would sell enough/lot will require a lot of work.

    Using pyS60 for development is ok, I've used worse systems. You can write something quickly and badly (just check some sample code ), but with normal sw dev disciplines pyS60 sw can be powerful. It makes doing some things really easy and fast.

    I wouldn't do any big project with current pyS60. The main reason is that after sales support would be too much trouble. More trouble than what you need for J2ME or native sw, which also require quite a lot of support.

    However I have, am doing and will continue to do small projects with pyS60, for example games and utilities. Just can't imagine making any mass distribution... but won't give up the hope.

    Sorry,

    --jouni

  7. #7
    Registered User
    Join Date
    Mar 2008
    Posts
    11

    Re: Protecting your code

    Thanks a ton...
    Regards,
    Kashif Razzaqui

Similar Threads

  1. Replies: 7
    Last Post: 2008-02-26, 15:43
  2. Replies: 2
    Last Post: 2007-10-05, 20:40
  3. newbie : code 404 when trying to connect to localhost/test.txt
    By lynx3521 in forum Mobile Java General
    Replies: 3
    Last Post: 2007-09-25, 16:21
  4. Link errors when trying to Display bitmap
    By Bkc82 in forum Symbian Media (Closed)
    Replies: 1
    Last Post: 2006-01-16, 22:46
  5. Replies: 0
    Last Post: 2003-09-26, 15:07

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×