Created
January 21, 2013 14:40
-
-
Save kissgyorgy/4586522 to your computer and use it in GitHub Desktop.
AutoIt: _HWID() Protect Your Script.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ; Original thread: http://www.autoitscript.com/forum/topic/146661-hwid-protect-your-script/ | |
| Func _HWID() | |
| local $drives = DriveGetDrive("FIXED") | |
| local $space = 0 | |
| local $serial = "" | |
| local $RAM = MemGetStats() | |
| for $i=1 to $drives[0] | |
| $space += DriveSpaceTotal ($drives[$i]) | |
| $serial &= StringUpper(DriveGetSerial($drives[$i])) | |
| Next | |
| $roms = DriveGetDrive("CDROM") | |
| for $i=1 to $roms[0] | |
| $serial &= StringUpper(DriveGetSerial($roms[$i])) | |
| Next | |
| local $original = "0"&@CPUArch & @KBLayout & $serial & $space & $RAM[1] | |
| local $string2 = StringMid($original, Round(StringLen($original)/2), Round(StringLen($original)/2)) | |
| local $string2_mod = _StringToHex(_StringReverse($string2)) | |
| $original = _Crypt_EncryptData($original, $string2_mod, $CALG_RC4) | |
| $original = _Crypt_HashData($original, $CALG_MD5) | |
| Return $original | |
| EndFunc |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment