Archived

This topic is now archived and is closed to further replies.

Making a Shareware Serial Key

This topic is 5648 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I''ve seen a few discussions of this in the forums but nothing really conclusive. For those that just want to voice their opinion and not really help, I''ll give you what you want and first acknoweldge that serial keys and copy protection will never guard all software if any. If someone really wants a program for free they will get it and that is the bottom line... Ok, now that thats out of the way, what I want to do is just make simple little serial keys for a program I''d like to make some pizza money from. I know it won''t stop the hardcore ''leets out there but there are a few people that would just easily payup versus a nag on the screen and those are who I am targeting. So basically I just want to make a keymaker that has some kind of basic random seed that all of it''s values come from. So it can figure out that "0JDF" is valid and "0JDG" is not valid (these are arbitrary examples btw). So now I can have a key-reader with my shareware program that reads a serial and if it''s valid, gets rid of the nag. Well, I have no Idea where to start!!!! I mean, I can easily just make a little program that will generate say, 500,000 unique keys, and the key-reader knows ALL of those values, but is there a more "random" way to do it. BTW, I definetly don''t want to have to read any hardware ID''s or credit card numbers or anything like that. Would a custom encryptor be an option as well? So say they enter their name: John Smith, the encryptor would generate a code (on my side) but the reader would know it was valid by the name they enter? That sounds like my best bet right there. Thank''s so much for any help! Free copy to the guy who presents relevant code/solutions! j/k, well, maybe "Love all, trust a few. Do wrong to none." - Shakespeare Dirge - Aurelio Reis www.CodeFortress.com

Share this post


Link to post
Share on other sites
how are you going to accept payment for the shareware ?
that is the first question.......
secondly here is what i would do but it would require that you have a server running 24-7 or have a small app running on someone else server
lets just say you use paypal or something
when you receive a paypal payment then email them some "cd-key" it can be randomly generated or you can just pick it out of the blue but it MUST be unique

write a very small server app. your server app will know all of your UNIQUE "cd-keys" that you have sent out to people. after the client recieves your email back with the cd-key then they can start up their app and punch the cd-key into it. the clients app then connects to your server and sends it the cd-key, if the cd-key has NOT already been registered (ie someone else didnt already try to send it to server) then the server marks that cd-key as having been used and sends back to the app that it is ok to unlock all the special features or whatever.

if the cd-key has already been registered then you send back to the client that it has already been registered and you cant unlock all the special features

there is a prob with this however. if the user uninstalls then reinstalls the app and tries to register again with the server then the server will tell them that it cant. I really cant think of a way to overcome this right now but that might help get you somewhere.

"I pity the fool, thug, or soul who tries to take over the world, then goes home crying to his momma."
- Mr. T

Share this post


Link to post
Share on other sites
Not a bad solution. I''ll probably be using Shareit, the online shareware service, btw. Really though I''d rather not have to worry about completely unique ID''s. Like I said, the average customer would be someone like my mom or dad (or yours maybe). Someone that knows how to open up word and search the internet but not willing to spend the effort to try to crack the system.

I just want something that is easy enough to where the person can even just send me a payment through paypal or check or money order or whatever and I can email them a key. If they feel like giving it to their buddy, or forwarding it to everyone in their contacts list, than ah well. The few people who won''t do this are the one''s I''m shooting for. Why waste the effort on a system that will be broken anyways, just make a quick solution and move on to the next program.

Another solution I just read about that I like involves putting added functionality and something like a virtual key in a dll that the user gets after he/she has registered. This might be a good solution as well.



"Love all, trust a few. Do wrong to none." - Shakespeare

Dirge - Aurelio Reis
www.CodeFortress.com

Share this post


Link to post
Share on other sites
You could do something pretty simple, like XOR''ing each character in the user''s name with a pseudo-random number sequence. For example, the user sends you the name "John Smith", and your server then generates a random seed (say 0xF5) then using a known random number generator and that seed, generates a sequence of 10 random 8-bit integers (one for each byte in their name) you then send back 0xF5 prepended to a string containing the XOR of "John Smith" with your ten random numbers.

Back on the client side, it just takes the seed (0xF5) from the string, creates it''s own "key" using their user name and checks it against the one given.

If you want to make the key fixed-length (possibly a good idea) you can just repeat the user''s name (so "John Smith" may become "John SmithJohn S" for a 16 character key + seed)

It''s certainly not perfect, but it''ll work...


codeka.com - Just click it.

Share this post


Link to post
Share on other sites
quote:
Original post by Dean Harding
It's certainly not perfect, but it'll work...
If you could add the use of a message-digest algorithm (MD5 anyone?) to that and reverse the order of that string, you're home...

EDIT1: your != you're

[edited by - dalleboy on June 26, 2002 5:44:52 AM]

Share this post


Link to post
Share on other sites
quote:
Original post by dalleboy
If you could add the use of a message-digest algorithm (MD5 anyone?) to that and reverse the order of that string, you''re home...



A message digest wouldn''t work in this case (unless I''m missing something here... quite possible) because the user supplies both the digest (i.e. the serial key) and his/her username (which the digest is generated from) so in effect, it''s no different than using the XOR method, just a different (and more complex) algorithm.


codeka.com - Just click it.

Share this post


Link to post
Share on other sites