Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 17 additions & 1 deletion DeDRM_plugin/adobekey.py
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,20 @@ def GetUserName():
return 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
MEM_COMMIT = 0x1000
MEM_RESERVE = 0x2000
Expand Down Expand Up @@ -351,7 +365,9 @@ def adeptkeys():
serial = GetVolumeSerialNumber(root)
vendor = cpuid0()
signature = struct.pack('>I', cpuid1())[1:]
user = GetUserName()
user = GetUserName2()
if user is None:
user = GetUserName()
entropy = struct.pack('>I12s3s13s', serial, vendor, signature, user)
cuser = winreg.HKEY_CURRENT_USER
try:
Expand Down