mirror of
https://github.com/noDRM/DeDRM_tools.git
synced 2025-01-16 04:40:37 +06:00
Fix username code for ADE key retrieval
This commit is contained in:
parent
33437073d6
commit
e9a6e80e5a
@ -237,6 +237,20 @@ if iswindows:
|
|||||||
return GetUserName
|
return GetUserName
|
||||||
GetUserName = GetUserName()
|
GetUserName = GetUserName()
|
||||||
|
|
||||||
|
def GetUserName2():
|
||||||
|
try:
|
||||||
|
import winreg
|
||||||
|
except ImportError:
|
||||||
|
import _winreg as winreg
|
||||||
|
|
||||||
|
try:
|
||||||
|
DEVICE_KEY_PATH = r'Software\Adobe\Adept\Device'
|
||||||
|
regkey = winreg.OpenKey(winreg.HKEY_CURRENT_USER, DEVICE_KEY_PATH)
|
||||||
|
userREG = winreg.QueryValueEx(regkey, 'username')[0].encode('utf-16-le')[::2]
|
||||||
|
return userREG
|
||||||
|
except:
|
||||||
|
return None
|
||||||
|
|
||||||
PAGE_EXECUTE_READWRITE = 0x40
|
PAGE_EXECUTE_READWRITE = 0x40
|
||||||
MEM_COMMIT = 0x1000
|
MEM_COMMIT = 0x1000
|
||||||
MEM_RESERVE = 0x2000
|
MEM_RESERVE = 0x2000
|
||||||
@ -360,6 +374,8 @@ if iswindows:
|
|||||||
serial = GetVolumeSerialNumber(root)
|
serial = GetVolumeSerialNumber(root)
|
||||||
vendor = cpuid0()
|
vendor = cpuid0()
|
||||||
signature = struct.pack('>I', cpuid1())[1:]
|
signature = struct.pack('>I', cpuid1())[1:]
|
||||||
|
user = GetUserName2()
|
||||||
|
if user is None:
|
||||||
user = GetUserName()
|
user = GetUserName()
|
||||||
entropy = struct.pack('>I12s3s13s', serial, vendor, signature, user)
|
entropy = struct.pack('>I12s3s13s', serial, vendor, signature, user)
|
||||||
cuser = winreg.HKEY_CURRENT_USER
|
cuser = winreg.HKEY_CURRENT_USER
|
||||||
|
Loading…
Reference in New Issue
Block a user