naam Posted April 12, 2007 Share Posted April 12, 2007 you probably all know those program that ask you for a activation code after the trail has expirered. I made one that give you a product ID (random number, but stays the same unless you clean your regestry) On base of that prodict ID you must enter a password to register (the ID is like the encrypted password). Be easy on me (I am still pretty new to autoit) CODE;looks if you already registered IF RegRead("HKCU\SOFTWARE\Test","Testkey") = "%ncDe4Be" Then MsgBox(64,"","already registered") Exit EndIf ;if no regestry is made, a new one will be made. IF RegRead("HKCU\SOFTWARE\Test","Testkey") = "" Then ;generates a random code: 16^7^2 posibilities $key = Random(0,10^7,1) $key2 = Random(0,10^7,1) RegWrite("HKCU\SOFTWARE\Test", "TestKey", "REG_DWORD", $key) RegWrite("HKCU\SOFTWARE\Test", "TestKey2", "REG_DWORD", $key2) EndIf ;generates a activation code out of the regkey $regkey = RegRead("HKCU\SOFTWARE\Test","Testkey") $regkey2 = RegRead("HKCU\SOFTWARE\Test","Testkey2") $code = "" For $i = 1 to 14 $code = $code & StringMid("pSQFiH1ZYCyzImEur3bcJLkP9twXVeN257DGqxTUnvlMh4sB6fj8KaCgAdRWbvfstdghBFOSHFBSGF739gdnflBGFLOSB68 36g4D",(StringMid($Regkey,$i,1))&(StringMid($Regkey2,$i,1)),1) Next ;asks you for the activation code $input = InputBox("Enter Activation code","Product ID : " & $regkey & "-" & $regkey2, "") ;compares input with activation code If $input = $code Then MsgBox(64,"","Then Activation code is correct") RegWrite("HKCU\SOFTWARE\Test", "TestKey", "REG_DWORD", "%ncDe4Be") Else MsgBox(64,"","sorry, Activation code incorrect") EndIf Just in case you cant crack the code: CODE;if already registerd it removes the regestry (for testing purposes) IF RegRead("HKCU\SOFTWARE\Test","Testkey") = "%ncDe4Be" Then RegDelete("HKCU\SOFTWARE\Test","Testkey") Exit EndIf ;generates a activation code out of the regkey ;for now it read directly from the regestry, but probably you want people to type in the code ;$key = InputBox("","Enter first code") ;$key2 = InputBox("","Enter Second code") $regkey = RegRead("HKCU\SOFTWARE\Test","Testkey") $regkey2 = RegRead("HKCU\SOFTWARE\Test","Testkey2") $code = "" For $i = 1 to 14 $code = $code & StringMid("pSQFiH1ZYCyzImEur3bcJLkP9twXVeN257DGqxTUnvlMh4sB6fj8KaCgAdRWbvfstdghBFOSHFBSGF739gdnflBGFLOSB68 36g4D",(StringMid($Regkey,$i,1))&(StringMid($Regkey2,$i,1)),1) Next MsgBox(64,"","activation code : " & $code) Link to comment Share on other sites More sharing options...
BillLuvsU Posted April 12, 2007 Share Posted April 12, 2007 Cool, keep it up. [center][/center]Working on the next big thing.Currently Playing: Halo 4, League of LegendsXBL GT: iRememberYhslaw Link to comment Share on other sites More sharing options...
jvanegmond Posted April 12, 2007 Share Posted April 12, 2007 It's not bad. You're are definitely on your way to glory.. Same thing, more advanced. github.com/jvanegmond Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now