Open rApeNB opened 2 months ago
I thought that had been fixed. Which version of DeDRM?
I thought that had been fixed. Which version of DeDRM?
It's v10.0.3. Latest version of releases.
I use windows 10, Kindle For PC v2.4.0, and windows uername is Chinese name.
I also checked the git log at Kindlekey. v2.5 of the py file claims to have solved the problem. I did run into the problem though.
The previous key was replacing non-ascii characters in username.
` def GetUserName(): GetUserNameW = advapi32.GetUserNameW GetUserNameW.argtypes = [c_wchar_p, POINTER(c_uint)] GetUserNameW.restype = c_uint def GetUserName(): buffer = create_unicode_buffer(2) size = c_uint(len(buffer)) while not GetUserNameW(buffer, byref(size)): errcd = getLastError() if errcd == 234:
return "AlternateUserName"
# double the buffer size
buffer = create_unicode_buffer(len(buffer) * 2)
size.value = len(buffer)
# replace any non-ASCII values with 0xfffd
for i in range(0,len(buffer)):
if sys.version_info[0] == 2:
if buffer[i]>u"\u007f":
#print "swapping char "+str(i)+" ("+buffer[i]+")"
buffer[i] = u"\ufffd"
else:
if buffer[i]>"\u007f":
#print "swapping char "+str(i)+" ("+buffer[i]+")"
buffer[i] = "\ufffd"
# return utf-8 encoding of modified username
#print "modified username:"+buffer.value
return buffer.value.encode('utf-8')
return GetUserName
GetUserName = GetUserName()`
This code should work, but it really doesn't work in my environment.
Try DeDRM 10.0.9: https://github.com/noDRM/DeDRM_tools/releases/tag/v10.0.9
And let's see a log of adding a book: https://github.com/noDRM/DeDRM_tools/blob/master/FAQs.md#i-cannot-solve-my-problem-with-the-dedrm-plugin-and-now-i-need-to-post-a-log-how-do-i-do-that
I used the version you mentioned and the results are still the same.
Let's see the whole log.
There's no log. I do not use the plugins nor Calibre. I just run the kindlekey.py file, The purpose of this file is to generate the relevant key files used by kindle decryption. On my computer, Chinese username, can't generate key. If you use a plain English character username, you can generate a key.
Ok, maybe @noDRM can take a look.
Any suggestions?
Use calibre and the plugins. :) Honestly I don't know if that would help. But it has been years since I last saw this issue, and I find it hard to imagine it is because no one had non-ascii characters in their Windows user name.
On windows, if the username contains non-ASCII characters, such as using a Chinese username, you will not be able to generate a Kindle key file. Unable to decrypt books. The programme reported that it could not decrypt .kinf2018