Jefrey Posted March 25, 2014 Share Posted March 25, 2014 Hi all I've made a simple serial and licensing system (although we know we already lost the war against the crackers... mainly using AU3 with too many decompilers available for free). That's not as you're accustomed to see outside, but that's interesting (I think). That's how it works: There aren't automatic demonstration licenses. After installing, the software won't work (truly, it will ask for a serial). The client must contact you/your company in order to get a free demo key or buy a full key. Yeah... the serial keys are quite big. That's made to copy and paste from the email sent from you to the client. It's the result of some informations encrypted, like how many days the serial key will work, a limit day to register using that serial (after that day, it won't be possible to register using that serial (if the user registered before, the license will still valid. Don't worry)). The user ID that is used to generate the serial key isn't an user input, like his email. It's generated based in some computers informations, like CPU/OS Architecture and others. The user must sent this key to you, and you'll send back his serial. But unfortunally I couldn't find a better way to save the license info. Actually, I'm using a file in %APPDATA% (encrypted and unreadable to look like compiled or a structure file, of course). If this file is changed or deleted, the application won't work and will require reinstallation. The file below brings some examples and the UDF (very well commented... I guess). It's very easy to use. It has also a KeyGen to generate and validate your serials. You'll need >Melba23's Extended Message Box UDF. Just download it and copy ExtMsgBox.au3 and StringSize.au3 from his UDF to the same folder with "license.au3" from my script. Or it won't work. Download: license.zip quaker 1 My stuff Spoiler My UDFs _AuThread multithreading emulation for AutoIt · _ExtInputBox an inputbox with multiple inputs and more features · forceUTF8 fix strings encoding without knowing its original charset · JSONgen JSON generator · _TCPServer UDF multi-client and multi-task (run on background) event-based TCP server easy to do · _TCPClient_UDF multi-server and multi-task (runs on background) event-based TCP client easy to do · ParseURL and ParseStr functions ported from PHP · _CmdLine UDF easily parse command line parameters, keys or flags · AutoPHP Create documents (bills, incomes) from HTML by sending variables/arrays from AutoIt to PHP · (Un)Serialize Convert arrays and data into a storable string (PHP compatible) · RTTL Plays and exports to MP3 Nokia-format monophonic ringtones (for very old cellphones) · I18n library Simple and easy to use localization library · Scripting.Dictionary OOP and OOP-like approach · Buffer/stack limit arrays to N items by removing the last one once the limit is reached · NGBioAPI UDF to work with Nitgen fingerprint readers · Serial/Licensing system require license key based on unique machine ID from your users · HTTP a simple WinHTTP library that allows GET, POST and file uploads · Thread true AutoIt threads (under-dev) · RC4 RC4 encryption compatible with PHP and JS · storage.au3 localStorage and sessionStorage for AutoIt Classes _WKHtmlToX uses wkhtmlto* to convert HTML files and webpages into PDF or images (jpg, bmp, gif, png...) Snippets _Word_DocFindReplaceByLongText replace strings using Word UDF with strings longer than 255 characters (MSWord limit) rangeparser parser for printing-like pages interval (e.g.: "1,2,3-5") EnvParser parse strings/paths with environment variables and get full path GUICtrlStaticMarquee static text scrolling Random stuff Super Mario beep sound your ears will hurt Link to comment Share on other sites More sharing options...
Palestinian Posted March 26, 2014 Share Posted March 26, 2014 I remember needing something like this a while ago and couldn't find anything online, so I simply made my script require a username/password to login that I will be providing for users, when a user logs in it checks a website for his username and password and react according, no encryption or anything like that is included tho, I'll give your UDF a try, thanks a lot. Link to comment Share on other sites More sharing options...
alexutu2013 Posted August 17, 2014 Share Posted August 17, 2014 Can someone update it , please ?? StringEncrypt don't work anymore... Link to comment Share on other sites More sharing options...
sahsanu Posted August 17, 2014 Share Posted August 17, 2014 Can someone update it , please ?? StringEncrypt don't work anymore... As the code is public you could try to change it on your own. Just add on Keygen.au3 a new include (license.au3 uses this include already): #include <Crypt.au3> And on both, Keygen.au3 and license.au3 add a new function which acts as a wrapper for old _StringEncrypt() function: Func _StringEncrypt($fEncryptDecrypt, $sData, $sPassword) _Crypt_Startup() Local $sResult = "" If $fEncryptDecrypt = 1 Then $sResult = Hex(_Crypt_EncryptData($sData, $sPassword, $CALG_AES_256)) Else $sResult = BinaryToString(_Crypt_DecryptData("0x" & $sData, $sPassword, $CALG_AES_256)) EndIf _Crypt_Shutdown() Return $sResult EndFunc ;==>_StringEncrypt Note 1: The new encryption is not compatible with the encryption used in old _StringEncrypt(). Note 2: I don't use this UDF so I did not test it. Cheers, sahsanu jimmer, alexutu2013 and Liuck97 3 Link to comment Share on other sites More sharing options...
quaker Posted September 17, 2017 Share Posted September 17, 2017 Hi all! First of all I'm happy to be a member of this forum, I've learned a lot reading your topics . I bump again this old thread because few days ago I faced a problem that I'm not able to resolve. The problem is only one: if the custumer modify Windows' time and put it back of 2 days he gets 2 more days of license. This because my program check the date/time of the PC. To avoid this trick I was thinking to compare PC time with the time provided by an online website. If they are different the program will close itself, otherwise it can go for a license check. It should check both the date and the time. A better solution could be to modify directly Jefrey files but I'm not so skilled. Thank you all Link to comment Share on other sites More sharing options...
BrewManNH Posted September 18, 2017 Share Posted September 18, 2017 Check here: It also pulls the current time, according to the timezone of the PC it's running on. quaker 1 If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag GudeHow to ask questions the smart way! I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from. Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays. - ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script. - Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label. - _FileGetProperty - Retrieve the properties of a file - SciTE Toolbar - A toolbar demo for use with the SciTE editor - GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI. - Latin Square password generator Link to comment Share on other sites More sharing options...
quaker Posted September 18, 2017 Share Posted September 18, 2017 6 hours ago, BrewManNH said: Check here: It also pulls the current time, according to the timezone of the PC it's running on. Thank you for the help BrewManNH. Thinking more about it I don't think is still a good idea. People use both 24h and 12h format and it's not good to force someone to change it. Need another solution Link to comment Share on other sites More sharing options...
BrewManNH Posted September 19, 2017 Share Posted September 19, 2017 This doesn't change anything on the user's computer, it merely gets the current date and time from an NTP server. If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag GudeHow to ask questions the smart way! I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from. Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays. - ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script. - Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label. - _FileGetProperty - Retrieve the properties of a file - SciTE Toolbar - A toolbar demo for use with the SciTE editor - GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI. - Latin Square password generator Link to comment Share on other sites More sharing options...
quaker Posted September 21, 2017 Share Posted September 21, 2017 On 19/9/2017 at 3:17 PM, BrewManNH said: This doesn't change anything on the user's computer, it merely gets the current date and time from an NTP server. I know I've read the script, but some people use 24h format, others use AM/PM format. I should write something to convert one to other but I need to find another solution. Link to comment Share on other sites More sharing options...
BrewManNH Posted September 21, 2017 Share Posted September 21, 2017 I believe this pulls the time in a 24H format, so you can always convert it and the user's time together, and if they don't match they've reset the time. Do a straight comparison to the current date and time on the computer, if they don't match check to see if the time you pulled is past noon, and subtract 12 and compare again, if they still don't match then the computer time is set wrong. If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag GudeHow to ask questions the smart way! I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from. Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays. - ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script. - Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label. - _FileGetProperty - Retrieve the properties of a file - SciTE Toolbar - A toolbar demo for use with the SciTE editor - GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI. - Latin Square password generator Link to comment Share on other sites More sharing options...
Buscarini Posted April 14, 2019 Share Posted April 14, 2019 Hello everyone, first of all i would like to thank you Jefrey for this code, i've updated and tested it and it's working fine. Since the thread is not locked i shall revive it once more. The question: I made modifications to the original code to save the licence at "@scriptdir". Now, i need to stripe the code only the part that checks for the licence time validity, without validation of machine id. The reason for all this is because i want to execute my app over a LAN on a client, after installing the licence at the server, without asking to activate again, reading only the remaining days left from the licence (located at "@scriptdir"). And i cannot make it happen, how can i do that? 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