Revert changes to k4mobidedrm.py

pull/156/head
penenkel 2020-12-02 22:36:29 +01:00 zatwierdzone przez GitHub
rodzic 6732be1434
commit a3cc221932
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
1 zmienionych plików z 1 dodań i 4 usunięć

Wyświetl plik

@ -228,10 +228,7 @@ def GetDecryptedBook(infile, kDatabases, androidFiles, serials, pids, starttime
serials.extend(androidkindlekey.get_serials(aFile)) serials.extend(androidkindlekey.get_serials(aFile))
# extend PID list with book-specific PIDs from seriala and kDatabases # extend PID list with book-specific PIDs from seriala and kDatabases
md1, md2 = mb.getPIDMetaInfo() md1, md2 = mb.getPIDMetaInfo()
bookspecific = kgenpids.getPidList(md1, md2, serials, kDatabases) totalpids.extend(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))
# remove any duplicates # remove any duplicates
totalpids = list(set(totalpids)) totalpids = list(set(totalpids))
print("Found {1:d} keys to try after {0:.1f} seconds".format(time.time()-starttime, len(totalpids))) print("Found {1:d} keys to try after {0:.1f} seconds".format(time.time()-starttime, len(totalpids)))