Re: Python executables

Discussion in 'Python' started by David Scott Williams, Jul 3, 2003.

  1. It's been awhile since I've been on the python list... but I'll take a
    whack at this:

    <SNIPPED DIGEST>

    >
    > ------------------------------------------------------------------------
    >
    > Subject:
    >
    > Re: Python executables?
    > From:
    >
    > Geoff Howland <>
    > Date:
    >
    > Thu, 03 Jul 2003 06:41:18 GMT
    > To:
    >
    >
    >
    >
    >On 27 Jun 2003 09:24:22 +0950, Ben Finney
    ><> wrote:
    >
    >>>This solves the problem of giving python programs to users who don't
    >>>have python but doesn't solve the problem of the source "secrecy"
    >>>(copyright).
    >>>

    >>Wrong problem. If you want to hide your source code from your users,
    >>don't expect help from free software programmers.
    >>

    >
    >I thought about this for a few days before responding (and Im sure I
    >did a few other things too ;) ), but I wanted to comment on this.
    >
    >
    >I think everyone that uses Python wants it to gain acceptance for the
    >great language that it is. I believe that stating an attitude in this
    >way is pretty counter productive in gaining any kind of wide-spread
    >acceptance.
    >

    Unfortunately, though, I don't think you get any more tread coming to
    the Open Source developers and asking them how to hide your bits... This
    is your issue, reversed.

    >
    >Most of the replies to this request didn't mention the concept of NOT
    >protecting the software, but 2 did to different degrees. As someone
    >who uses and like open source software, and is slowly starting to
    >release some things as open source, and ALSO someone who sells
    >software and will continue in the future to sell software, I can say
    >that nothing turns me off more to a community than being told what my
    >goals should be.
    >

    I think if your goals are un-reasonable, asking a hammer salesman how
    best to use his tool to screw something into drywall is again, similary,
    counter-productive. Scripting languages are hard to obfuscate, if not
    damned near impossible. Even Java byte-code can be decompiled back to
    fairly decent looking source...

    >
    >I can understand wanting everything to be open, but thats not reality
    >and it never will be.
    >

    I, personally, don't disagree with this.

    > Some people will always want things
    >proprietary, and they will only work within systems that allow that.
    >I think to be truly successful, systems will have to allow for this
    >and make it easy to do.
    >
    >Currently Python does not make this REALLY easy to do, and in the
    >privacy portion, I believe its not even possible. This was a big
    >concern for me when I released my last for-sale software, but I just
    >decided I didn't care that much, and I love working in Python.
    >

    Often times, I think, Python caters to the developers that develop
    95-98% of the software --in house software where source code access
    isn't a problem either way... It is good for mock-ups, for getting
    something structured and OO, and for writing software that otherwise
    doesn't yield you revenue (install, config scripts, for example)... It
    is great for other software too... and some companies make money selling
    support for the source, many users are not hackers, even unix/linux
    users, now..

    >
    >Some people will care enough, and will avoid Python because the
    >ability to protect their end results aren't there.
    >

    This loss is unfortunate, perhaps someday they will see that software
    really isn't a commodity, but a service.

    >
    >So far, the only semi-workable way to do this would be something like:
    >
    >- Build a C program that embeds Python.
    >- Encrypt all the Python script/bytecode files.
    >- On runtime, decrypt the files and then execute.
    >
    >Optional:
    >
    >- Change the bytecode values in the Python source, and include your
    >new Python with different bytecode values.
    >
    >I tried this last thing just to see if it would work, and I got some
    >problems compiling initially, so just gave up, but I think in theory
    >it should work.
    >
    >Ignoring the Optional portion, this semi-solution is not actually very
    >secure. It does however move the problem into having to decompile a C
    >program, and then get it to decrypt the Python files. Then the normal
    >Python bytecode -> source. It means any cracker will have to know
    >something about both C and Python to do it, so a bit more barrier to
    >entry. It also means that in the US, the (vile and despicable, but
    >present) DMCA laws will make it a much more severe crime because
    >"cryptography reverse engineering" needed to be applied, and may at
    >least reduce corporations from doing this for fear of
    >lawsuits/criminal charges if they are exposed.
    >

    Perhaps you could write an open source python code obfuscator? Or
    write it in C and make it closed source?

    >
    >Anyway, this is a good bit of work and not a great solution, but is
    >there anything else? If Python is to have avenues of support in all
    >walks of the software industry, will something like this be required?
    >

    I still think that python is often used as glue... the easy and
    straightforward style add value to the remaining (if obfuscated) bits...

    >
    >>From what I understand, there are also very good Java decompilers, but

    >no one seems to complain about Java's lack of security. Perhaps it is
    >because it is seen as something that is really "compiled" while
    >Python's loose compilation seems more whimsicle.
    >

    mentioned this above myself... There are obfuscators for java...but if
    someone wants it bad enough, they can get your source, or something
    reasonably close... in almost ANY language.

    >
    >
    >I think Python faces a lot of different public relations problems, and
    >just thought I'd pipe up about one that I have looked at myself, and
    >that I think most people coming into the Python world are faced with
    >and have to decide whether to ignore or not.
    >
    >
    >-Geoff Howland
    >http://ludumdare.com/
    >
    >


    --
    ~Dave


    Brainchild
    (and current obsession)
    http://dustyscript.sourceforge.net/
    >Dustyscript: Programming for Children<

    ||*Other projects that I head up*||
    http://sourceforge.net/projects/cxtable
    >The xTable Project<<
    http://sourceforge.net/projects/moonroof
    >Moonroof, a Java desktop<

    ||**Projects that I am dedicated to (but not in charge of)*||
    http://sourceforge.net/projects/grapevine
    >Grapevine p2p network<
    "The Java Port"
    http://sourceforge.net/projects/symbiosis
    >Symbiosis<

    weblog: http://wildegrey.blogspot.com/

    "When I think back on all the crap I learned in High School...
    it's a wonder I can think at all..."
    -Paul Simon, "Kodachrome"

    "...I took the road less travelled by, and that has made all the difference.."
    -Robert Frost

    "Man is the only animal that blushes... or needs to"
    -Mark Twain
    David Scott Williams, Jul 3, 2003
    #1
    1. Advertising

  2. On Thu, 03 Jul 2003 07:04:49 -0400, David Scott Williams
    <> wrote:

    >>I think everyone that uses Python wants it to gain acceptance for the
    >>great language that it is. I believe that stating an attitude in this
    >>way is pretty counter productive in gaining any kind of wide-spread
    >>acceptance.
    >>

    >Unfortunately, though, I don't think you get any more tread coming to
    >the Open Source developers and asking them how to hide your bits... This
    >is your issue, reversed.


    Why should Open Source developers be unanimously opposed to this? I
    can see that some will be, but just because you Open some of your
    programs doesnt mean you will Open all of them.

    There are business models to Open Source software, but they're much
    less developed and practiced than just selling the software. IMO,
    some things are better domains for open source than others, and other
    people will have different views.

    I think the important thing here is not to alienate people who have
    different views than you just because you have different opinions.
    Why should Python only be used by people who want to create open
    source software? Should everyone else be discouraged or prodded?

    >I think if your goals are un-reasonable, asking a hammer salesman how
    >best to use his tool to screw something into drywall is again, similary,
    >counter-productive. Scripting languages are hard to obfuscate, if not
    >damned near impossible. Even Java byte-code can be decompiled back to
    >fairly decent looking source...


    I didn't think Python was trying to be a hammer. It's obviously not
    trying to be Everything (which is good), but that doesnt mean it
    should be saying "we dont do this, bugger off".

    Especially for something that is really more religious. There is a
    practical side to this, which is "hiding things is not easy because
    Python isnt built to hide things", and I think that is fine. I think
    it's more important for Python to be about making coding easy and
    readable, but I still dont think it should be discouraged as a
    community policy.

    I know I was at first very put off by the open source community
    because of how totalitarian the sentiment seemed to be that
    "everything must be open/free". I've finally started to get over that
    and enjoy releasing bits here and there, but giving things away
    doesn't pay bills. I have a feeling that others are equally put off
    by it, and it only slows down acceptance for everyone that "maybe some
    things I write are good to release open source".

    >>Some people will care enough, and will avoid Python because the
    >>ability to protect their end results aren't there.
    >>

    >This loss is unfortunate, perhaps someday they will see that software
    >really isn't a commodity, but a service.


    In that "even a radio is a service", it will definitely be true, but
    radios are sold as well. Some software is more a service than others.
    Some software is more like a radio. Some software is even less
    service than a radio (like games), where they are sometimes a one-shot
    experience. You can't sell service on this, and there is sometimes
    little replay value. The worth is in the experience the first time.

    Service varies, and so sales needs to be varying as well.

    >Perhaps you could write an open source python code obfuscator? Or
    >write it in C and make it closed source?


    I wasnt suggesting "someone else" do it really. I was more addressing
    the attitude that I thought could put people off. At one point I
    personally considered this important, and after reviewing it long
    enough I decided I didn't care. It wasn't worth the effort to hide
    things, and the majority of people would pay for the software anyway
    (that were going to), so no loss. I just think those that want to do
    it shouldn't be discouraged from touching Python or asking for help.

    :)


    -Geoff Howland
    http://ludumdare.com/
    Geoff Howland, Jul 5, 2003
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Catalin

    Python executables?

    Catalin, Jun 26, 2003, in forum: Python
    Replies:
    6
    Views:
    10,684
    Geoff Howland
    Jul 3, 2003
  2. =?iso-8859-1?q?Premshree=20Pillai?=

    Automating the Creation of Python Executables

    =?iso-8859-1?q?Premshree=20Pillai?=, Jan 13, 2004, in forum: Python
    Replies:
    0
    Views:
    282
    =?iso-8859-1?q?Premshree=20Pillai?=
    Jan 13, 2004
  3. Bill Davy
    Replies:
    0
    Views:
    304
    Bill Davy
    Apr 22, 2005
  4. Satchidanand Haridas
    Replies:
    1
    Views:
    517
    Sybren Stuvel
    Nov 11, 2005
  5. jefm
    Replies:
    0
    Views:
    3,915
Loading...

Share This Page