468,161 Members | 1,964 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,161 developers. It's quick & easy.

License / Registration key enabled software

T
We all know that there are many softwares that require some license key
or registration key to enable them. How does one implement something
like this in python?

Sep 22 '06 #1
26 9433
T wrote:
We all know that there are many softwares that require some license key
or registration key to enable them. How does one implement something
like this in python?
Here's a thought: AES encrypt the bytecode dynamically for each user,
using as a key an sha hash of their personal and corporate information,
ethernet hardware address, and some hardware specific information, such
as the serial number of the diskdrive on which the software will be
installed. Along with this dynamically encrypted version of the
software, require them to save the personal and corporate information in
the system registry or equivalent on their computer. Then write a C or
Fortran extension that assembles this information on the client side,
produces the hashed key and uses it to decrypt the bytecode real-time,
when the program launches. This bytecode can be fed to a running python
process via a pipe and executed through skilled use of the marshal module.

Once you have implemented this system, license it to software vendors
such as Microsoft (or better yet, scientific software companies). Please
remember to pay me royalties in the sum of 20% gross profits for
devising this system for you.

James

--
James Stroud
UCLA-DOE Institute for Genomics and Proteomics
Box 951570
Los Angeles, CA 90095

http://www.jamesstroud.com/
Sep 22 '06 #2
T

Umm...I was hoping for something simpler and more straight forward. Is
there a module that would be useful for this type of thing?

Sep 24 '06 #3
On Sat, 23 Sep 2006 18:39:58 -0700, T wrote:
>
Umm...I was hoping for something simpler and more straight forward. Is
there a module that would be useful for this type of thing?
It really helps if you quote the relevant bits of the email you are
replying to. Otherwise, people who come along and see your post will ask
"Simpler than what? Module useful for what sort of thing? What is this
luser talking about?"

To implement a licence/registration key system in Python, you should first
answer a couple of simple questions:

Q1. Is my software so precious and special that users will put up with the
inconvenience and nuisance value of registration keys?

If the answer is No, then don't use registration keys. Find a different
model to make money: give the software away and charge for support, or
something. Using registration keys won't bring in money for you if your
users just stop using the software and use a competing product instead.

If the answer is Yes, then go on to question 2:

Q2. Are you sure?

If the answer is still Yes, then read this and see if it helps:
http://en.wikipedia.org/wiki/Keygen

--
Steven.

Sep 24 '06 #4
T enlightened us with:
We all know that there are many softwares that require some license
key or registration key to enable them. How does one implement
something like this in python?
Why do you want to? I've never seen software successfully protected by
such schemes. If you really want to protect your software, turn it
into a web application/service.

Sybren
--
Sybren Stüvel
Stüvel IT - http://www.stuvel.eu/
Sep 24 '06 #5
In message <11**********************@i3g2000cwc.googlegroups. com>, T wrote:
We all know that there are many softwares that require some license key
or registration key to enable them. How does one implement something
like this in python?
Reliably? Can't be done, in Python or any other language.
Sep 25 '06 #6
In message <11**********************@m73g2000cwd.googlegroups .com>, T wrote:
>Umm...I was hoping for something simpler and more straight forward.
It cannot be done simply or straightforwardly. Or reliably, for that matter.
Sep 25 '06 #7
On Mon, 25 Sep 2006 22:54:58 +1200, Lawrence D'Oliveiro wrote:
In message <11**********************@i3g2000cwc.googlegroups. com>, T wrote:
>We all know that there are many softwares that require some license key
or registration key to enable them. How does one implement something
like this in python?

Reliably? Can't be done, in Python or any other language.
Of course it can -- you can rely on it to be cracked.

Oh the other hand, for some uses, a partial success is better than none at
all. (Personally, I don't believe that registration keys are necessarily
one of those, but that's not up to me to decide.)

--
Steven D'Aprano

Sep 26 '06 #8
On Fri, 22 Sep 2006 11:51:01 -0700, T wrote:
We all know that there are many softwares that require some license key
or registration key to enable them. How does one implement something
like this in python?
Here's a slightly different take on license keys that
nobody else has mentioned:

License keys exist to make it easier for honest users to
remain honest. Since any scheme can be cracked, dishonest
users will use your software without paying for it with
or without a license key scheme, so there's no point
spending much effort on the dishonest. Focus instead on
what your honest users want.

For instance a customer might want to buy a license to
use your software on up to 5 machines at once, but still
have the software installed on every machine in the
company. License systems like FlexLM can work here, to
make it easier for them to ensure that they comply with
the terms of the license.

Forget about the people who'll crack your software. Ask
yourself whether a license key scheme offers anything
to the people who won't try to crack it. If it does, then
actually implementing the scheme becomes trivial; if it
doesn't, then leave it out, because it won't help against
crackers.

Mike

Sep 27 '06 #9
Mike Playle wrote:
For instance a customer might want to buy a license to
use your software on up to 5 machines at once, but still
have the software installed on every machine in the
company. License systems like FlexLM can work here, to
make it easier for them to ensure that they comply with
the terms of the license.
But then you must weigh that against the inconvenience that you impose upon your
customers. Although you may make it easier for them to comply with your license,
you are also making it harder for them to *use* your software.

I do not know a single person who has used FlexLM-licensed software and does not
hate FlexLM with a burning passion.

--
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless enigma
that is made terrible by our own mad attempt to interpret it as though it had
an underlying truth."
-- Umberto Eco

Sep 27 '06 #10
Mike Playle <us****@vfx.org.ukwrites:
License keys exist to make it easier for honest users to remain
honest.
What doubletalk. If usage restrictions were in *any* way what end users
wanted, they'd choose software that has it over software that does
not.

Usage restrictions serve *no* want of the end user.
For instance a customer might want to buy a license to use your
software on up to 5 machines at once, but still have the software
installed on every machine in the company.
This need is adequately served by not imposing usage restrictions. Any
effective imposition of usage restrictions is hostile to the wants of
the user.

If usage restrictions are brought into the picture, it is to serve the
wants of someone else, *not* the end user. It is disingenuous to
suggest otherwise.
License systems like FlexLM can work here, to make it easier for
them to ensure that they comply with the terms of the license.
This is describing a want of the copyright holder, *not* the end user.
Forget about the people who'll crack your software. Ask yourself
whether a license key scheme offers anything to the people who won't
try to crack it. If it does, then actually implementing the scheme
becomes trivial; if it doesn't, then leave it out, because it won't
help against crackers.
Very sound advice, I agree entirely.

--
\ "If you're not part of the solution, you're part of the |
`\ precipitate." -- Steven Wright |
_o__) |
Ben Finney

Sep 28 '06 #11
Ben Finney wrote:
Mike Playle <us****@vfx.org.ukwrites:

>>License keys exist to make it easier for honest users to remain
honest.


What doubletalk. If usage restrictions were in *any* way what end users
wanted, they'd choose software that has it over software that does
not.

Usage restrictions serve *no* want of the end user.
No, but usage reporting is very important to large organisations with
enterprise copies of their applications. They want to stay in
compliance, and it's notoriously hard to track usage.
>
>>For instance a customer might want to buy a license to use your
software on up to 5 machines at once, but still have the software
installed on every machine in the company.


This need is adequately served by not imposing usage restrictions. Any
effective imposition of usage restrictions is hostile to the wants of
the user.

If usage restrictions are brought into the picture, it is to serve the
wants of someone else, *not* the end user. It is disingenuous to
suggest otherwise.
So you're suggesting that most people would rather be dishonest?

Otherwise you might as well say that any costs associated with using a
piece of software (including purchase pricing) are "hostile to the wants
of the user".
>
>>License systems like FlexLM can work here, to make it easier for
them to ensure that they comply with the terms of the license.


This is describing a want of the copyright holder, *not* the end user.
I think your view is a little biased here.
>
>>Forget about the people who'll crack your software. Ask yourself
whether a license key scheme offers anything to the people who won't
try to crack it. If it does, then actually implementing the scheme
becomes trivial; if it doesn't, then leave it out, because it won't
help against crackers.


Very sound advice, I agree entirely.
As do I. The sad thing is that the people most concerned about
protection of intellectual property are often the ones whose IP is least
likely to need protection.

regards
Steve
--
Steve Holden +44 150 684 7255 +1 800 494 3119
Holden Web LLC/Ltd http://www.holdenweb.com
Skype: holdenweb http://holdenweb.blogspot.com
Recent Ramblings http://del.icio.us/steve.holden

Sep 28 '06 #12
On Thu, 28 Sep 2006 10:19:37 +1000, Ben Finney wrote:
>For instance a customer might want to buy a license to use your
software on up to 5 machines at once, but still have the software
installed on every machine in the company.

This need is adequately served by not imposing usage restrictions. Any
effective imposition of usage restrictions is hostile to the wants of
the user.
Who is "the user"? The person who uses the software isn't always
the same as the person who paid for it, or the person who'll be
in trouble if the license terms aren't adhered to.

Imagine you're an IT manager for a medium-to-large company who
wants to use some expensive piece of software. You talk to the
vendor and buy a licence to use the software on up to 5 machines
at once, but you don't know who in the company will want to use
it, so for convenience you want to install it on every PC in the
building.

Having installed it all over the shop, how can you be sure that
only 5 people are using it at any one time? Do you expect your
users to walk round the building asking everyone else if they're
using the software, or are they more likely to just start it up
and start working?

Of course this argument really applies only to large, expensive
commercial packages. I'd certainly agree that licence keys are
often used inappropriately in a way which doesn't really benefit
anyone, but this doesn't mean they don't have a place somewhere
in the grand scheme of things.

Mike

Sep 28 '06 #13
On Wed, 27 Sep 2006 12:21:08 -0500, Robert Kern wrote:
Mike Playle wrote:
>For instance a customer might want to buy a license to
use your software on up to 5 machines at once, but still
have the software installed on every machine in the
company. License systems like FlexLM can work here, to
make it easier for them to ensure that they comply with
the terms of the license.

But then you must weigh that against the inconvenience that you impose upon your
customers. Although you may make it easier for them to comply with your license,
you are also making it harder for them to *use* your software.
This is certainly true.

As with any other software feature it's vital to weigh up the
advantages against the disadvantages, and not blindly add
features which don't provide a clear overall benefit.
I do not know a single person who has used FlexLM-licensed software and does not
hate FlexLM with a burning passion.
Yup, I can agree with that. From the POV of the guy who just
wants to get some work done, it's usually a real pain.

His boss may have a different view of the matter, though.
I've met people who've _bought_ FlexLM-licensed software
who think it's the best thing since sliced bread.

Mike

Sep 28 '06 #14
Steve Holden enlightened us with:
Otherwise you might as well say that any costs associated with using
a piece of software (including purchase pricing) are "hostile to the
wants of the user".
It's true. People pay because they have to, but they'd rather not.

Sybren
--
Sybren Stüvel
Stüvel IT - http://www.stuvel.eu/
Sep 28 '06 #15
Mike Playle enlightened us with:
Imagine you're an IT manager for a medium-to-large company who wants
to use some expensive piece of software. You talk to the vendor and
buy a licence to use the software on up to 5 machines at once, but
you don't know who in the company will want to use it, so for
convenience you want to install it on every PC in the building.

Having installed it all over the shop, how can you be sure that only
5 people are using it at any one time?
Write the software in such a way that it needs a certificate on a
smartcard, then supply the company with five smartcards.

Sybren
--
Sybren Stüvel
Stüvel IT - http://www.stuvel.eu/
Sep 28 '06 #16
Sybren Stuvel wrote:
Mike Playle enlightened us with:
>>Imagine you're an IT manager for a medium-to-large company who wants
to use some expensive piece of software. You talk to the vendor and
buy a licence to use the software on up to 5 machines at once, but
you don't know who in the company will want to use it, so for
convenience you want to install it on every PC in the building.

Having installed it all over the shop, how can you be sure that only
5 people are using it at any one time?


Write the software in such a way that it needs a certificate on a
smartcard, then supply the company with five smartcards.
And you guarantee that the contents of the smartcard is only used by one
user at a time by building a licensing system for the smartcards?

regards
Steve
--
Steve Holden +44 150 684 7255 +1 800 494 3119
Holden Web LLC/Ltd http://www.holdenweb.com
Skype: holdenweb http://holdenweb.blogspot.com
Recent Ramblings http://del.icio.us/steve.holden

Sep 28 '06 #17
Steve Holden enlightened us with:
And you guarantee that the contents of the smartcard is only used by
one user at a time by building a licensing system for the
smartcards?
We can never, ever make a 100% guarantee that people won't copy what
you supply them. The only way to do that is to thoroughly monitor them
24/7, violating every privacy law in existance.

Sybren
--
Sybren Stüvel
Stüvel IT - http://www.stuvel.eu/
Sep 28 '06 #18
On Thu, 28 Sep 2006 17:36:02 +0200, Sybren Stuvel wrote:
Mike Playle enlightened us with:
>Having installed it all over the shop, how can you be sure that only 5
people are using it at any one time?

Write the software in such a way that it needs a certificate on a
smartcard, then supply the company with five smartcards.
And 150 smartcard readers?

Of course USB dongles would work just as well and wouldn't
need special readers, but really this is just a hardware
implementation of the same idea - dongles are just as hated
as FlexLM, and for all the same reasons :)

Mike

Sep 28 '06 #19
Sybren Stuvel wrote:
Steve Holden enlightened us with:
>>And you guarantee that the contents of the smartcard is only used by
one user at a time by building a licensing system for the
smartcards?


We can never, ever make a 100% guarantee that people won't copy what
you supply them. The only way to do that is to thoroughly monitor them
24/7, violating every privacy law in existance.
Excellent. So you don't trust them not to abuse the software, but you
trust them not to abuse the smartcards. What's wrong with this picture?

regards
Steve
--
Steve Holden +44 150 684 7255 +1 800 494 3119
Holden Web LLC/Ltd http://www.holdenweb.com
Skype: holdenweb http://holdenweb.blogspot.com
Recent Ramblings http://del.icio.us/steve.holden

Sep 28 '06 #20
On Thu, 28 Sep 2006 18:44:13 +0200, Sybren Stuvel wrote:
Steve Holden enlightened us with:
>And you guarantee that the contents of the smartcard is only used by one
user at a time by building a licensing system for the smartcards?

We can never, ever make a 100% guarantee that people won't copy what you
supply them. The only way to do that is to thoroughly monitor them 24/7,
violating every privacy law in existance.
Yes, this is an important part of the point I'm trying to make.

The people who want to use your software illegitimately will succeed no
matter what you do, so you shouldn't worry about them. Worry instead about
the people who DON'T want to use it illegitimately. Can a license key
scheme help them? If so, implement it. No trickery is needed - a simple
comparison will suffice.

Mike

Sep 28 '06 #21
In message <pa****************************@vfx.org.uk>, Mike Playle wrote:
License keys exist to make it easier for honest users to
remain honest.
It was Ed Felten who said that "keeping honest people honest is like keeping
tall people tall".
Sep 29 '06 #22
"Steve Holden" <st***@holdenweb.comWrote:
Sybren Stuvel wrote:
Mike Playle enlightened us with:
>Imagine you're an IT manager for a medium-to-large company who wants
to use some expensive piece of software. You talk to the vendor and
buy a licence to use the software on up to 5 machines at once, but
you don't know who in the company will want to use it, so for
convenience you want to install it on every PC in the building.

Having installed it all over the shop, how can you be sure that only
5 people are using it at any one time?

Write the software in such a way that it needs a certificate on a
smartcard, then supply the company with five smartcards.
And 500 smart card readers - can I quote for the job?

And you guarantee that the contents of the smartcard is only used by one
user at a time by building a licensing system for the smartcards?

regards
Steve
Yes - this is the point - it makes a simple implementation increasingly complex
and paranoid - and is a large part of the cost that makes the software
expensive - the other part is called greed...

- Hendrik

Sep 29 '06 #23
Mike Playle wrote:
Worry instead about the people who DON'T want to use it illegitimately. Can a license key
scheme help them?
That's "help them" as in "we can help you to stay in our good books and
avoid us dragging you through the courts, you bad people", I presume?
Hardly a vendor-customer relationship I'd want to get into as the
customer.

I've had experience with both hardware protection schemes (unreliable)
and floating licences (annoying, since users tend to "drop anchor"),
and both schemes penalise the people who've paid for (or have been
bought) software whilst supposedly inconveniencing those who will
nevertheless have cracked the software within a short period of time
before exchanging it with friends and strangers. So, the software will
probably roam around of its own accord, anyway. Here, the moderating
factor in propagation is (or should be amongst people with any degree
of cautiousness) the lack of trust in the cracked product: what malware
also gets installed along with the original software?

Meanwhile, the big company scenario that advocates of restrictive
technical licensing solutions like to mention actually suggests
incompetence in the management of customer relations at such companies:
you sell the big company five licences of your software because they
tell you that's all they need, but you secretly suspect that everyone
is using the software. But any interest in the number of people using
the software is presumably driven by some per-seat pricing that could
be totally inappropriate. Some desire to have a 1980s-style
shrinkwrapped box retail price tag has constrained the business's
ability to judge the value of the software on a case-by-case basis,
which you'd want to do with important customers. The big company might
not be an important customer as it turns out, but by focusing on the
relationship itself, rather than auditing and threatening them, you
might actually get a chance to find this out in a way which presents
opportunities other than a face-off in court.

Interestingly, the innovation in this area would seem to be happening
either in companies offering dual-licensed solutions, where one of the
licences is the GPL, or even in companies only offering GPL-licensed
solutions but with paid support options available in addition. That's
how stagnant the style of proprietary software business referred to
here would appear to be with respect to business innovation these days.

Paul

Sep 29 '06 #24
T
Mike Playle wrote:
The people who want to use your software illegitimately will succeed no
matter what you do, so you shouldn't worry about them. Worry instead about
the people who DON'T want to use it illegitimately. Can a license key
scheme help them? If so, implement it. No trickery is needed - a simple
comparison will suffice.

Mike
Oh man. This is going way off topic!!!

I just wanted to know how license / registration key can be implemented
in python. I was not interested in philosophical discussion of why /
why not one should implement it, whether that business model make
sense, instead using smartcards, etc. etc.

I would like to satisfy technical / intellectual curiosity of how it is
done in python -- so how about returning to the original topic of "How
can license / registration key be implemented in python?"

Oct 2 '06 #25
"T" <ty*****@yahoo.comwrites:
I just wanted to know how license / registration key can be
implemented in python. I was not interested in philosophical
discussion of why / why not one should implement it, whether that
business model make sense, instead using smartcards, etc. etc.
See if this makes any more sense:

"I just wanted to know how to implement strict type checking of all
function parameters in Python. I was not interested in philosophical
discussion of why one should or should not implement it, whether that
programming model makes sense, instead using duck typing, etc. etc."

People often come to this list thinking they know exactly how
something should be done, based on preconceptions formed in a
different context, and believing all they need is our help in doing
it. We have a long and cherished history of asking "why do you want to
do that?" and "what are you actually trying to achieve?" in the
interest of finding a better approach to address the actual need.

I don't see this thread as being any different.

--
\ "Friendship is born at that moment when one person says to |
`\ another, 'What! You too? I thought I was the only one!'" -- |
_o__) C.S. Lewis |
Ben Finney

Oct 2 '06 #26

"T" <ty*****@yahoo.comwrote in message
news:11**********************@c28g2000cwb.googlegr oups.com...
Oh man. This is going way off topic!!!

I just wanted to know how license / registration key can be implemented
in python. I was not interested in philosophical discussion of why /
why not one should implement it, whether that business model make
sense, instead using smartcards, etc. etc.

I would like to satisfy technical / intellectual curiosity of how it is
done in python -- so how about returning to the original topic of "How
can license / registration key be implemented in python?"
I think the question is too broad. I suspect the broad answer "much the
same way as in any other language, with adjustments made for the
peculiarities of Python" will not satisfy you, but a more specific answer
requires a more specific question, such as "How can a read a printer port
dongle from Python and is there a cross-platform solution?"

Terry Jan Reedy

Oct 3 '06 #27

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

11 posts views Thread by gooze | last post: by
34 posts views Thread by Michael Foord | last post: by
4 posts views Thread by P1ayboy | last post: by
1 post views Thread by rdemyan via AccessMonster.com | last post: by
2 posts views Thread by Wayne Wengert | last post: by
4 posts views Thread by Martitza | last post: by
1 post views Thread by gcdp | last post: by
reply views Thread by kamranasdasdas | last post: by
reply views Thread by gcreed | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.