]> xmof Git - DeDRM.git/commitdiff
Convert all to bytes first before concat
authorfireattack <human.peng@gmail.com>
Mon, 2 Nov 2020 08:09:52 +0000 (02:09 -0600)
committerfireattack <human.peng@gmail.com>
Mon, 2 Nov 2020 08:09:52 +0000 (02:09 -0600)
DeDRM_plugin/kindlekey.py

index 808b1b70ff2bc1680f65a70b7cb22928bba8c704..aabb275e053730d18ff2085d8cbcec2c942e761a 100644 (file)
@@ -1084,7 +1084,7 @@ if iswindows:
             added_entropy = build + guid
         elif version == 6:  # .kinf2018
             salt = str(0x6d8 * int(build)).encode('utf-8') + guid
-            sp = GetUserName() + '+@#$%+' + GetIDString()
+            sp = GetUserName() + b'+@#$%+' + GetIDString().encode('utf-8')
             passwd = encode(SHA256(sp), charMap5)
             key = KeyIVGen().pbkdf2(passwd, salt, 10000, 0x400)[:32]  # this is very slow