Update kgenpids.py

pull/458/head
tomthumb1997 7 years ago committed by GitHub
parent 75cad40804
commit ffd7d41bcd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -12,6 +12,7 @@ __version__ = '2.1'
# Revision history:
# 2.0 - Fix for non-ascii Windows user names
# 2.1 - Actual fix for non-ascii WIndows user names.
# x.x - Return information needed for KFX decryption
import sys
import os, csv
@ -172,6 +173,9 @@ def pidFromSerial(s, l):
# Parse the EXTH header records and use the Kindle serial number to calculate the book pid.
def getKindlePids(rec209, token, serialnum):
if rec209 is None:
return [serialnum]
pids=[]
if isinstance(serialnum,unicode):
@ -249,6 +253,10 @@ def getK4Pids(rec209, token, kindleDatabase):
#print u"DSN",DSN.encode('hex')
pass
if rec209 is None:
pids.append(DSN+kindleAccountToken)
return pids
# Compute the device PID (for which I can tell, is used for nothing).
table = generatePidEncryptionTable()
devicePID = generateDevicePID(table,DSN,4)

Loading…
Cancel
Save