Leaderboard
Popular Content
Showing content with the highest reputation on 01/22/2013 in all areas
-
This is an example of a generator and checker program for license keys. It makes all alphabetic keys (6 groups of 5 letters). What is different about this is I paid attention to some documentation on the technology of how "good" serial keys work. In order to generate a key, you load the generator and type in some customers private and personal info like their name and the date/time of purchase or something, or a customer ID and their name or what ever. So, it uses this unique information and hashes it. Cryptographic process' are done to each character of that initial seed data to create the majority of the key. Then the seed value and the remaining key parts are salt hashed and the first 4 characters of that hash are placed at the end of the code. Then it is broken up into sections using a "-" symbol, eg: IKCFG-HFSIO-HYBYH-OADHJ-INGVC-DDOBB The benefit of a system like this is that you don't need to include any license keys with the product, or have lists of anything to check against. The product on the users end checks only certain aspects of the key (so hackers would not be able to make a global hacked keygen for all future versions because you can just alter which sections of the key a new program check and then everyones old keys still work and the keygen fails) and both checks the hash of the seed and key sections to make sure the checksum matches up with the end of the key AND if someone figured that out and made a random key and made a valid checksum thinking that would be enough, the software realises this and warns you that it was a fabricated key. Currently all the checker does is notify with message boxes but I can now use this template in the future to make a good and solid serial key protection on something. You will never prevent everything in the world though, I am sure if hackers can crack actually "programmed" software that they could crack autoit in a trivial amount of time and just remove protections depending on how much time you put into obfuscating your code. That being said I think this is pretty cool, secure and convenient since the codes are checked in isolation on the client's PC for validity without needing lists of codes disguised on their computer or anything. It all adds to the security. Checker just checks and lets you know the status of the key, the generator will copy the individuals code to clipboard after you type in the "customers" details for seed information and click the button. Just paste it in a notepad and you have it then for testing the checker. For each unique "product" you would want all new random values on both the checker and generator where the hash salt is eg $ks[3] = 'NUB%F$Wt6j9' They must be the same on both generator and checker and unique to each program, same with the 'Test program v1.000' string which is salt for the over all checksum part of the code. Any way, if you want to have a look, here are the files, I welcome any feedback on this design. Serial Code GeneratorF Final Working!V3.au3 Serial Code CheckerFWorking!V3.au31 point
-
Well then with the evidence presented I have no choice but to hence forth refer to the OP with this:1 point
-
Using a non-RegEx version of the string functions, you can do it this way. $String = "Last logon for Jsmith was from mightymouse on Tue Jan 22 2013 at 10:32 AM" ConsoleWrite(StringMid($String, StringInStr($String, " ", 0, 8) + 1) & @CRLF) ; prints out the string from the 8th space char plus one to the end of the string1 point
-
Could you please give this function a try?; #FUNCTION# ==================================================================================================================== ; Name ..........: _OL_FolderClassSet ; Description ...: Set the default form (message class) for a folder ; Syntax.........: _OL_FolderClassSet($oFolder, $sMsgClass) ; Parameters ....: $oFolder - Folder object of the folder to be changed as returned by _OL_FolderAccess ; $sMsgClass - New message class to set for the folder. Has to start with the DefaultMessageClass e.g. IPM.NOTE.mynote for class IPM.NOTE ; Return values .: Success - 1 ; Failure - Returns 0 and sets @error: ; |1 - $oFolder is not an object ; |2 - message class IPM.NOTE can not be default for any folders ; |3 - message class IPM.POST can only be default for mail/post folders ; |4 - New message class has to start with the DefaultMessageClass e.g. IPM.NOTE.mynote for class IPM.NOTE ; |5 - Parameter $sMsgClass is invalid. A required period is missing ; |6 - Error setting folder property. @extended is set to the COM error ; Author ........: water ; Modified ......: ; Remarks .......: ; Related .......: ; Link ..........: http://www.outlookcode.com/codedetail.aspx?id=1594 ; Example .......: Yes ; =============================================================================================================================== Func _OL_FolderClassSet($oFolder, $sMsgClass) If Not IsObj($oFolder) Then Return SetError(1, 0, 0) Local $oPropertyAccessor, $iLoc Local Const $PR_DEF_POST_MSGCLASS = "http://schemas.microsoft.com/mapi/proptag/0x36E5001E" Local Const $PR_DEF_POST_DISPLAYNAME = "http://schemas.microsoft.com/mapi/proptag/0x36E6001E" Switch StringLeft(StringUpper($sMsgClass), 8) Case "IPM.NOTE" ; cannot be default for any folder Return SetError(2, 0, 0) Case "IPM.POST" ; default only for mail/post folders If $oFolder.DefaultMessageClass = "IPM.NOTE" Then Return SetError(3, 0, 0) Case Else ; New message class has to start with the DefaultMessageClass e.g. IPM.NOTE.mynote for class IPM.NOTE If StringInStr($sMsgClass, $oFolder.DefaultMessageClass) <> 1 Then Return SetError(4, 0, 0) EndSwitch $iLoc = StringInStr($sMsgClass, ".", 0, -1) ; Find last "." in class If @error Then Return SetError(5, 0, 0) Local $aSchema[2] = [$PR_DEF_POST_MSGCLASS, $PR_DEF_POST_DISPLAYNAME] Local $aValues[2] = [$sMsgClass, StringMid($sMsgClass, $iLoc + 1)] $oPropertyAccessor = $oFolder.PropertyAccessor $oPropertyAccessor.SetProperties($aSchema, $aValues) If @error Then Return SetError(6, @error, 0) $oPropertyAccessor = 0 EndFunc ;==>_OL_FolderClassSet1 point
-
First of all, don't bump your post in less than 24 hours, second of all stop being rude when bumping your posts. This is a volunteer effort on this forum, not everyone knows what it is you need, and bumping your post in just over an hour is ridiculous. Give it some time and perhaps someone with the answer will have a look at this. You do realize that some people like to sleep at night and have to work during the day?1 point
-
Detecting the first mouse click is trickier than it sounds. The easiest approach is to make a loop, and use the _IsPressed function to see if the mouse button is pressed. Once that's done, then take a look at MouseClick and AdlibRegister. Here's something to get you started. The main loop requires a bit of thinking. If you can figure out what the loop is actually doing and when the variables will be set/unset then you can probably understand most of all programming logic. #include <Misc.au3> Local $fClicking = False ; This variable will store whether we are doing the auto-clicking Local $fPressed = False ; Another variable, will store whether the mouse button was pressed last iteration of the loop While 1 If $fClicking Then If _IsPressed("01") Then $fPressed = True Elseif $fPressed Then $fPressed = False $fClicking = False AdlibUnRegister("ClickFunction") EndIf Else If _IsPressed("01") Then $fPressed = True ElseIf $fPressed Then ; The mouse was pressed, but is now released $fClicking = True $fPressed = False AdlibRegister("ClickFunction", 1000) EndIf EndIf Sleep(10) ; If you don't sleep in a tight loop like this, your cpu will be very high WEnd Func ClickFunction() MouseClick("left") EndFunc ;==>ClickFunction1 point
-
And here's a snippet for getting it from the source code if the script is not compiled. #AutoIt3Wrapper_Res_Fileversion=1.0.1 #include <Constants.au3> MsgBox($MB_SYSTEMMODAL, Default, "Version: " & _GetScriptVersion()) Func _GetScriptVersion() If @Compiled Then Return FileGetVersion(@ScriptFullPath) Else Local $sText = FileRead(@ScriptFullPath) If @error Then Return SetError(1, 0, "0.0.0.0") ; File couldn't be read Local $asRet = StringRegExp($sText, "(?i)(?:\A|\n)\#AutoIt3Wrapper\_Res\_Fileversion\=(.*?)(?:\z|\n)", 3) If @error Then Return SetError(2, 0, "0.0.0.0") ; No version number found Return $asRet[0] EndIf EndFunc ;==>_GetScriptVersion1 point
-
FileGetVersion #AutoIt3Wrapper_Res_Fileversion=1.0.1 #include <Constants.au3> MsgBox($MB_SYSTEMMODAL, Default, FileGetVersion(@ScriptFullPath)) Try compiling and then running. This won't work when not compiled, so you might have to do some hack involving reading the script or something.1 point
-
The code would need modifying accordingly but you could generate a 4 group of 4 characters, sure. That goes for any product. The reason hackers are able to make a key generator for someones's product is because they do exactly that I would assume. They find the parts which are being checked and make valid keys for that version of the product. Then the company realises there are keygens out there and alter which parts of the key sections are checked and now everyones old illegal codes stop working, same with the old key generator. That means the hacker group has to be aware of the new version and find the time to make a whole new keygen from scratch, which benefits companies because I am sure that if someone is desperate enough for the software that they will feel obligated to buy it if they cannot find working key generators anywhere. Either way it is a good thing to be doing partial key checks. As for the hash, as you can see in the source code I am using SHA1 because thats currently the best autoit has to offer1 point