From d54dc38c2d3083eb802557aa363498cf27f25f39 Mon Sep 17 00:00:00 2001 From: apprenticeharper Date: Thu, 3 Sep 2015 07:49:09 +0100 Subject: [PATCH] Fix for Kobo Desktop 3.17 --- Obok_calibre_plugin/obok_plugin.zip | Bin 60308 -> 60470 bytes Obok_calibre_plugin/obok_plugin/__init__.py | 2 +- Obok_calibre_plugin/obok_plugin/action.py | 3 +- Obok_calibre_plugin/obok_plugin/obok/obok.py | 40 +++++++++++++---- Other_Tools/Kobo/obok.py | 45 ++++++++++++++----- 5 files changed, 69 insertions(+), 21 deletions(-) diff --git a/Obok_calibre_plugin/obok_plugin.zip b/Obok_calibre_plugin/obok_plugin.zip index aace56178c3ace958ce991583f8ef768418c8dde..a1264e1451e3a730959e4087089d587e84ad8f88 100644 GIT binary patch delta 12935 zcmZvjQ*fpYu&slMCbo@Z;Y%SADlG z*3+G|0@<<(iKZ+E`3(aM3=9@5nuAR05pUHg0gV>Y#}Y9?hyX}LE4?xbA!(`FJILg6 z2;~h*rXOxs4d>-ZUyNEPU0WKPF}YC`irLEe=fxtaMEn^Q9|qIT0YxFB|2A%%7(g#; zB7i{400)6iDWILd3Cr4^sE8*3!QvsQMg-#ZboB(g(JfA1M{iRUs3ssHA|RspmR{iA zh1*LbzOtaB=?6r=%9zh@u8MkkODfUxI#ed5n-LlC=f&depGxU|gZ!n&pjZ^z?g(3s zHvPqXE4ijh&C`lgn*2}_4;-lPMo{UwB` zsL%^+MnEuCbF@S-MDP$?=|GT8Fhh>l8$l578+aC;T>%SEhm7rfAI@VcJ2O*ky1PRI zsg^I7cbDhR__J_v<Ipx-0vlzfYufsQ`!*)V|NE& z1-m152Z4R+zZ22|ud-DzOkyNJAN)l<@+H2=rtY?4EmdnRo5K)y34w!h^4&akwWftq zW9CPg)b_nR{_`2&bqMI`Rv60feh-0I3dOx-nRT4pvxQZFUR#Ol7G2KA?MONw!}$>7 zlc>^Yt1yK(Nm1Ss;Ht7w_l;Rru`s_{g&pn|2X@Xe3-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vn_;S_D2;I?{_fSR!Fx}5P+3{ivbiaJ6rZpNAyoBJQdr|wP5km# zAn*^y%5BJv*XPz`5b#qKVgOk#m${}baT+59?NUVh1EJsbXd3b~0$hp0gVIY#6beg3 za)h>%&EchvB z-s3k5igNm0XYHu*OmtS3x%u9#Rs$lmv7G!GzmL7@?Hv>bN^L{)3C(Juj@w~Lc)589 zlS7Ynjv*rus z{h#5>WRaqsPE5xEE@%*}#+A`UP&g?k>ezdYOBj4Fx3RU-ebO|?FjBS9VXH<636 zq3a~k^A#>4P-3Z(sBYz=TV#!Z%Oh)WM{j+-&GGQRH}sbBEz^W~S$h%l^DCSG9Kem~ zJ8?n``%)v4*S$J;__ap_WVWmq>N~!d#)F)--8=$a1Iw8Yz2Z;K--HS`Q# z2KbsxeDPa2i|YO=NPwERVb_5UgPa-+qA=b>rD&ihmQHnrqeCC}v9$hqTu5p3$%iTZIQbQD(QQ?q%`MSA4)t5wd^fhVxitPAW- z>UvFQ6wXrNg0{pse@d0z<*T`%Rl~ag4W91Y?ytqeGj7YdDa1s&OsCe>0yAX#+fx4C$_sEhD)qneW75Sh<^*TrL z>^D+>oWKUucbDY??(skLJD|AGYqDib_L%EIqbDmgkNxe-_-kmm(bHapQUm`8c>j?_qXXPs9p+s*v^5s-+AiIM*s&kssdz!6-1Kd)I4ueZriMs$YcH|ebPh6|=R z@h%A{AUY+frF9$hxj1Tb8?dZpKtVkdqzMZ=X?-O zZlK 5: self.kobodir = os.environ['LOCALAPPDATA'] @@ -249,9 +252,8 @@ class KoboLibrary(object): """ if len(self._userkeys) != 0: return self._userkeys - userid = self.__getuserid() for macaddr in self.__getmacaddrs(): - self._userkeys.append(self.__getuserkey(macaddr, userid)) + self._userkeys.extend(self.__getuserkeys(macaddr)) return self._userkeys @property @@ -297,13 +299,33 @@ class KoboLibrary(object): macaddrs.append(m[0].upper()) return macaddrs - def __getuserid (self): - return self.__cursor.execute('SELECT UserID FROM user WHERE HasMadePurchase = "true"').fetchone()[0] - - def __getuserkey (self, macaddr, userid): + def __getuserids (self): + userids = [] + cursor = self.__cursor.execute('SELECT UserID FROM user WHERE HasMadePurchase = "true"') + row = cursor.fetchone() + while row is not None: + try: + userid = row[0] + userids.append(userid) + except: + pass + row = cursor.fetchone() + return userids + + def __getuserkeys (self, macaddr): + userids = self.__getuserids() + userkeys = [] + # This version is used for versions before 3.17.0. deviceid = hashlib.sha256('NoCanLook' + macaddr).hexdigest() - userkey = hashlib.sha256(deviceid + userid).hexdigest() - return binascii.a2b_hex(userkey[32:]) + for userid in userids: + userkey = hashlib.sha256(deviceid + userid).hexdigest() + userkeys.append(binascii.a2b_hex(userkey[32:])) + # This version is used for 3.17.0 and later. + deviceid = hashlib.sha256('XzUhGYdFp' + macaddr).hexdigest() + for userid in userids: + userkey = hashlib.sha256(deviceid + userid).hexdigest() + userkeys.append(binascii.a2b_hex(userkey[32:])) + return userkeys class KoboBook(object): """A Kobo book. diff --git a/Other_Tools/Kobo/obok.py b/Other_Tools/Kobo/obok.py index 42620d2..0545152 100644 --- a/Other_Tools/Kobo/obok.py +++ b/Other_Tools/Kobo/obok.py @@ -1,6 +1,12 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- +# Version 3.1.4 September 2015 +# Updated for version 3.17 of the Windows Desktop app. +# +# Version 3.1.3 August 2015 +# Add translations for Portuguese and Arabic +# # Version 3.1.2 January 2015 # Add coding, version number and version announcement # @@ -109,7 +115,7 @@ # """Manage all Kobo books, either encrypted or DRM-free.""" -__version__ = '3.1.1' +__version__ = '3.1.3' import sys import os @@ -217,7 +223,7 @@ class KoboLibrary(object): of books, their titles, and the user's encryption key(s).""" def __init__ (self): - print u"Obok v{0}\nCopyright © 2012-2014 Physisticated et al.".format(__version__) + print u"Obok v{0}\nCopyright © 2012-2015 Physisticated et al.".format(__version__) if sys.platform.startswith('win'): if sys.getwindowsversion().major > 5: self.kobodir = os.environ['LOCALAPPDATA'] @@ -246,9 +252,8 @@ class KoboLibrary(object): """ if len(self._userkeys) != 0: return self._userkeys - userid = self.__getuserid() for macaddr in self.__getmacaddrs(): - self._userkeys.append(self.__getuserkey(macaddr, userid)) + self._userkeys.extend(self.__getuserkeys(macaddr)) return self._userkeys @property @@ -294,13 +299,33 @@ class KoboLibrary(object): macaddrs.append(m[0].upper()) return macaddrs - def __getuserid (self): - return self.__cursor.execute('SELECT UserID FROM user WHERE HasMadePurchase = "true"').fetchone()[0] - - def __getuserkey (self, macaddr, userid): + def __getuserids (self): + userids = [] + cursor = self.__cursor.execute('SELECT UserID FROM user WHERE HasMadePurchase = "true"') + row = cursor.fetchone() + while row is not None: + try: + userid = row[0] + userids.append(userid) + except: + pass + row = cursor.fetchone() + return userids + + def __getuserkeys (self, macaddr): + userids = self.__getuserids() + userkeys = [] + # This version is used for versions before 3.17.0. deviceid = hashlib.sha256('NoCanLook' + macaddr).hexdigest() - userkey = hashlib.sha256(deviceid + userid).hexdigest() - return binascii.a2b_hex(userkey[32:]) + for userid in userids: + userkey = hashlib.sha256(deviceid + userid).hexdigest() + userkeys.append(binascii.a2b_hex(userkey[32:])) + # This version is used for 3.17.0 and later. + deviceid = hashlib.sha256('XzUhGYdFp' + macaddr).hexdigest() + for userid in userids: + userkey = hashlib.sha256(deviceid + userid).hexdigest() + userkeys.append(binascii.a2b_hex(userkey[32:])) + return userkeys class KoboBook(object): """A Kobo book.