Sign in to follow this  
Followers 0
nickkarma

Saving a Registration Key

7 posts in this topic

I have a program with autoit that I am having a registration key required which is ran up against an online MySQL database. I only want them to enter the key once then save it somewhere that wouldn't be able to accessed or changed if possible. This way someone can't just get a key from someone else and put that key wherever it would be saved if they found out at some point. What would be the best method for saving a key or variable that the program could later read but the user wouldn't be able to?

Share this post


Link to post
Share on other sites



I have a program with autoit that I am having a registration key required which is ran up against an online MySQL database. I only want them to enter the key once then save it somewhere that wouldn't be able to accessed or changed if possible. This way someone can't just get a key from someone else and put that key wherever it would be saved if they found out at some point. What would be the best method for saving a key or variable that the program could later read but the user wouldn't be able to?

Search example scripts for "XProtec"

George

Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

Share this post


Link to post
Share on other sites

Yeah I had seen that before, it's just that has a lot of other stuff and it's a bit hard for me to look through that program with how big it is to find a small little thing of where the registration code is saved on the computer. I'm looking through again now and I would think it'd be something like this to write the key to the registry:

RegWrite("HKCU\Software\Microsoft\Windows\Current Version\Settings\ClickTask.com\MyProgram", "001", "REG_SZ", $key)

RegRead("HKCU\Software\Microsoft\Windows\Current Version\Settings\ClickTask.com\MyProgram", "001")

My main question I guess then would be is this accessable through something like regedit? Could someone just go in and put in a key through that to get around a 1 time install method that is checked by my MySQL lookup? If so I'd probably need to just put an IP address check on it. Otherwise I suppose I could just name it something random that would seem like it's nothing related to the program.

Share this post


Link to post
Share on other sites

Yeah I had seen that before, it's just that has a lot of other stuff and it's a bit hard for me to look through that program with how big it is to find a small little thing of where the registration code is saved on the computer. I'm looking through again now and I would think it'd be something like this to write the key to the registry:

RegWrite("HKCU\Software\Microsoft\Windows\Current Version\Settings\ClickTask.com\MyProgram", "001", "REG_SZ", $key)

RegRead("HKCU\Software\Microsoft\Windows\Current Version\Settings\ClickTask.com\MyProgram", "001")

My main question I guess then would be is this accessable through something like regedit? Could someone just go in and put in a key through that to get around a 1 time install method that is checked by my MySQL lookup? If so I'd probably need to just put an IP address check on it. Otherwise I suppose I could just name it something random that would seem like it's nothing related to the program.

I think that XProtec takes all that into consideration by looking at other things related to the computer it's installed on. It could be things like the Drive serial, I don't really remember now. I am reasonably sure that the string it writes is an encrypted string though.

George

Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

Share this post


Link to post
Share on other sites

Use something specify to a PC and then encrypt it. Eg. Drive serial, etc.


I can do signature me.

Share this post


Link to post
Share on other sites

You can not prevent that a user have access to the registry!

If you are the Administrator of a group or domain you can prevent a user to permit regedit.exe, but you can't prevent a user to use a third-party registry editor !!!

But anyway, do it in a way like i542 wrote and take an algorithm to generate a serial or something like that.

Or you generate a unique SID for every 'license' ...

http://msdn2.microsoft.com/en-us/library/aa379571.aspx

Greetz and merry x-mas !

Greenhorn

Share this post


Link to post
Share on other sites

hehehehe

nickkarma when you have the solution please contact microsoft they will pay you a lot


Best regards,Emiel Wieldraaijer

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0