]> xmof Git - DeDRM.git/commitdiff
Revert changes to k4mobidedrm.py
authorpenenkel <7736404+penenkel@users.noreply.github.com>
Wed, 2 Dec 2020 21:36:29 +0000 (22:36 +0100)
committerGitHub <noreply@github.com>
Wed, 2 Dec 2020 21:36:29 +0000 (22:36 +0100)
DeDRM_plugin/k4mobidedrm.py

index 6f49dbb965565269fd87923bfd596af080448cd1..43392eed3e31719c9c3cf620ad1776d5d014a193 100644 (file)
@@ -228,10 +228,7 @@ def GetDecryptedBook(infile, kDatabases, androidFiles, serials, pids, starttime
         serials.extend(androidkindlekey.get_serials(aFile))
     # extend PID list with book-specific PIDs from seriala and kDatabases
     md1, md2 = mb.getPIDMetaInfo()
-    bookspecific = kgenpids.getPidList(md1, md2, serials, kDatabases)
-    # kgenpids.getPidList returns each pid as a (mutable) bytearray
-    # conversion to (immutable) bytes is nessesary as otherwise the set() function below will fail
-    totalpids.extend((bytes(pid) for pid in bookspecific))
+    totalpids.extend(kgenpids.getPidList(md1, md2, serials, kDatabases))
     # remove any duplicates
     totalpids = list(set(totalpids))
     print("Found {1:d} keys to try after {0:.1f} seconds".format(time.time()-starttime, len(totalpids)))