Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #5489

Re: obviscating python code for distribution

Path csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!selfless.tophat.at!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <rosuav@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.010
X-Spam-Evidence '*H*': 0.98; '*S*': 0.00; '(although': 0.05; 'dictionary': 0.07; 'happily': 0.07; 'python': 0.07; 'magnitude': 0.09; 'pm,': 0.11; 'server,': 0.12; 'wrote:': 0.14; 'subject:python': 0.15; '"don\'t': 0.16; '(eg': 0.16; 'downtime': 0.16; 'is).': 0.16; 'players),': 0.16; 'simultaneous': 0.16; 'subject:distribution': 0.16; 'worried': 0.16; '16,': 0.16; 'code.': 0.18; 'code,': 0.20; 'code': 0.22; 'header:In-Reply- To:1': 0.22; 'mon,': 0.22; '(and': 0.22; '2500': 0.23; 'objects,': 0.23; 'subject:code': 0.23; "i'm": 0.26; 'chris': 0.27; 'function': 0.27; 'google': 0.27; 'message-id:@mail.gmail.com': 0.28; "doesn't": 0.28; 'load': 0.28; 'problem': 0.29; 'server': 0.29; "won't": 0.30; 'updates.': 0.31; 'to:addr:python-list': 0.32; 'source': 0.32; 'idea': 0.32; 'things': 0.33; 'someone': 0.33; 'test': 0.33; 'updated': 0.33; 'using': 0.34; 'there': 0.35; 'couple': 0.35; 'open': 0.35; 'stuck': 0.35; 'running': 0.36; 'getting': 0.36; 'considered': 0.36; 'problem.': 0.36; 'some': 0.37; 'received:209.85': 0.37; 'issue': 0.37; 'run': 0.37; 'received:google.com': 0.38; 'but': 0.38; 'hold': 0.39; 'end': 0.39; 'to:addr:python.org': 0.39; 'could': 0.39; 'received:209': 0.39; 'how': 0.39; 'solution': 0.40; "it's": 0.40; 'header:Received:5': 0.40; 'orders': 0.60; 'give': 0.61; '2011': 0.62; 'limit': 0.62; 'play': 0.64; 'ever': 0.65; 'world': 0.65; "today's": 0.69; "google's": 0.69; 'online': 0.70; 'gain': 0.80; 'received:209.85.210.174': 0.84; 'received:mail- iy0-f174.google.com': 0.84; 'cater': 0.93
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type; bh=+ATIdEab1ul6eXUkOvVI3qrEM8Id/6b03JXcCVKwSAk=; b=ejkgsawRNVglKN0qr+qok8AaM80goXQQh7abVUhSXfhWexKckfvGRBuYwCrYb1kWqN 8Jgmyl31b3h6NPyAo8XaOC9+/rL9aRMPMCU60738E/J7zxPvaC8sZ+qaOwqU5rIx/aOo zR04Y3C2tHKIzhgdpQnl0cZjjx1DNKnkZ2Q0w=
DomainKey-Signature a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=mYnheV8VR1YHsrnpo+KUo5vxf6u/czWSi9Jryje07COWLu1XoMDLxQbrzZrpKB9liW B4XGX76H3GQPSQJYdMzRhWfz7P+9C/D4kN9Gag4z1Rv3PKPd47b4lHWADqJSDRS2TQcQ eVWHNmcwgjl/B1ZztgOvpmc6DvVeuxi3TSdTw=
MIME-Version 1.0
In-Reply-To <4DD0B903.4090109@tysdomain.com>
References <mailman.1609.1305511928.9059.python-list@python.org> <87boz3gw5u.fsf@benfinney.id.au> <mailman.1614.1305517027.9059.python-list@python.org> <4dd0a1fc$0$29983$c3e8da3$5496439d@news.astraweb.com> <BANLkTin8JUYbSCOvCHvXYt+LYZMn1Th1tA@mail.gmail.com> <4DD0B903.4090109@tysdomain.com>
Date Mon, 16 May 2011 16:12:36 +1000
Subject Re: obviscating python code for distribution
From Chris Angelico <rosuav@gmail.com>
To python-list@python.org
Content-Type text/plain; charset=ISO-8859-1
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.12
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.1625.1305526360.9059.python-list@python.org> (permalink)
Lines 38
NNTP-Posting-Host 82.94.164.166
X-Trace 1305526360 news.xs4all.nl 81479 [::ffff:82.94.164.166]:35829
X-Complaints-To abuse@xs4all.nl
Xref x330-a1.tempe.blueboxinc.net comp.lang.python:5489

Show key headers only | View raw


On Mon, May 16, 2011 at 3:41 PM, Littlefield, Tyler <tyler@tysdomain.com> wrote:
> Here's kind of what I want to prevent. I want to write a multi-player online
> game; everyone will essentually end up connecting to my server to play the
> game. I don't really like the idea of security through obscurity, but I
> wanted to prevent a couple of problems.
> 1) First I want to prevent people from hacking at the code, then using my
> server as a test for their new setups. I do not want someone to gain some
> extra advantage just by editing the code.
> Is there some other solution to this, short of closed-source?

1) If you're worried about people getting hold of the code that's
running on your server, that's a server security issue and not a
Python obscurity issue (if they get the code, they can run it no
matter how obscured it is).

2) Was there a problem 2? :)

As James Mills said, just leave it on the server and then you don't
have to give out the source (and by "don't have to", I mean ethically,
legally, and technically).

You may want to give some thought to scaleability of your code; Google
told their staff to avoid Python for things that are going to get
hammered a lot (although it's possible that Google's idea of "a lot"
is five orders of magnitude more than you'll ever get!!). But if your
game world puts a hard limit on its own load (eg if players are on a
50x50 board and you know you can handle 2500 simultaneous players),
you won't have a problem.

Also, Python doesn't really cater to servers that want to have their
code updated on the fly; I'm sure you could work something out using a
dictionary of function objects, but otherwise you're stuck with
bringing the server down to do updates. That's considered normal in
today's world, but I really don't know why... downtime is SO last
century!

Chris Angelico
happily running servers on fully open source stacks

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

obviscating python code for distribution "Littlefield, Tyler" <tyler@tysdomain.com> - 2011-05-15 20:04 -0600
  Re: obviscating python code for distribution Ben Finney <ben+python@benfinney.id.au> - 2011-05-16 13:29 +1000
    Re: obviscating python code for distribution "Littlefield, Tyler" <tyler@tysdomain.com> - 2011-05-15 21:36 -0600
      Re: obviscating python code for distribution harrismh777 <harrismh777@charter.net> - 2011-05-15 22:48 -0500
      Re: obviscating python code for distribution Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2011-05-16 04:03 +0000
        Re: obviscating python code for distribution Chris Angelico <rosuav@gmail.com> - 2011-05-16 14:40 +1000
        Re: obviscating python code for distribution "Littlefield, Tyler" <tyler@tysdomain.com> - 2011-05-15 23:41 -0600
          Re: obviscating python code for distribution Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2011-05-16 08:49 +0000
            Re: obviscating python code for distribution Chris Angelico <rosuav@gmail.com> - 2011-05-16 19:10 +1000
            Re: obviscating python code for distribution harrismh777 <harrismh777@charter.net> - 2011-05-16 14:40 -0500
          Re: obviscating python code for distribution Nobody <nobody@nowhere.com> - 2011-05-16 13:05 +0100
        Re: obviscating python code for distribution James Mills <prologic@shortcircuit.net.au> - 2011-05-16 16:00 +1000
        Re: obviscating python code for distribution Chris Angelico <rosuav@gmail.com> - 2011-05-16 16:12 +1000
        Re: obviscating python code for distribution "Littlefield, Tyler" <tyler@tysdomain.com> - 2011-05-16 00:17 -0600
        Re: obviscating python code for distribution "Littlefield, Tyler" <tyler@tysdomain.com> - 2011-05-16 00:20 -0600
          Re: obviscating python code for distribution Ben Finney <ben+python@benfinney.id.au> - 2011-05-17 10:22 +1000
        Re: obviscating python code for distribution James Mills <prologic@shortcircuit.net.au> - 2011-05-16 16:24 +1000
        Re: obviscating python code for distribution geremy condra <debatem1@gmail.com> - 2011-05-16 00:27 -0700
        Re: obviscating python code for distribution Jean-Michel Pichavant <jeanmichel@sequans.com> - 2011-05-16 11:36 +0200
        Re: obviscating python code for distribution "Littlefield, Tyler" <tyler@tysdomain.com> - 2011-05-16 08:44 -0600
          Re: obviscating python code for distribution Ben Finney <ben+python@benfinney.id.au> - 2011-05-17 10:30 +1000
          Re: obviscating python code for distribution alex23 <wuwei23@gmail.com> - 2011-05-16 20:45 -0700
        Re: obviscating python code for distribution Dotan Cohen <dotancohen@gmail.com> - 2011-05-17 09:16 +0300
        Re: obviscating python code for distribution Chris Angelico <rosuav@gmail.com> - 2011-05-17 16:39 +1000
        Re: obviscating python code for distribution "D'Arcy J.M. Cain" <darcy@druid.net> - 2011-05-17 09:36 -0400
      Re: obviscating python code for distribution Ben Finney <ben+python@benfinney.id.au> - 2011-05-16 14:10 +1000
        Re: obviscating python code for distribution Grant Edwards <invalid@invalid.invalid> - 2011-05-16 13:52 +0000
          Re: obviscating python code for distribution Ben Finney <ben+python@benfinney.id.au> - 2011-05-17 10:27 +1000
    Re: obviscating python code for distribution Disc Magnet <discmagnet@gmail.com> - 2011-05-20 14:49 +0530

csiph-web