【已解决】请问如何提取windows系统密钥(序列号)的,谢谢
本帖最后由 freedayfzc 于 2012-8-1 11:07 编辑有搜索过之前的各位大师的帖子,但是提取出来的序列号是错误的,哪位能帮忙下分享下可用的autoit脚本。 Local $Key = IniRead(@SystemDir & '\$winnt$.inf', 'UserData', 'ProductKey', '非XP系统')
MsgBox(0, 0, $key)
$key = RegRead("HKLM\SOFTWARE\MICROSOFT\Windows NT\CurrentVersion", "DigitalProductId")
MsgBox(0,"",GetXPKey($key))
Func GetXPKey($binaryDPID)
Local $bKey,$sKey,$Digits,$Value = 0
Local $hi = 0,$n = 0,$i = 0,$dlen = 29,$slen = 15
Local $Result
$Digits = StringSplit("BCDFGHJKMPQRTVWXY2346789", "")
;$binaryDPID = stringmid($binaryDPID, 105, 30) ;旧版用这个
$binaryDPID = stringmid($binaryDPID, 107, 30)
For $i = 1 to 29 step 2
$bKey = dec(stringmid($binaryDPID, $i, 2))
next
For $i = $dlen - 1 To 0 Step -1
If Mod(($i + 1), 6) = 0 Then
$sKey[$i] = "-"
Else
$hi = 0
For $n = $slen - 1 To 0 Step -1
$Value = Bitor(bitshift($hi, -8), $bKey[$n])
$bKey[$n] = int($Value / 24)
$hi = mod($Value, 24)
Next
$sKey[$i] = $Digits[$hi + 1]
EndIf
Next
For $i = 0 To 28
$Result = $Result & $sKey[$i]
Next
Return $Result
EndFunc ;==>GetXPKey
早年前收藏的,出自谁手忘记了。 太感谢了,可以用 感谢分享,可用
页:
[1]