summaryrefslogtreecommitdiffstats
path: root/DeDRM_calibre_plugin
diff options
context:
space:
mode:
authorApprentice Alf <[email protected]>2013-04-08 16:47:22 +0100
committerApprentice Alf <[email protected]>2015-03-07 14:47:45 +0000
commit51919284caf90a72c99e2471bfb32306aec8dc8a (patch)
tree2f7c3b4db7c69d2c134f14322182fed753d908ca /DeDRM_calibre_plugin
parentd586f74faabe2011ea4f7d2116563b15e45a9052 (diff)
tools v6.0.3
Diffstat (limited to 'DeDRM_calibre_plugin')
-rw-r--r--DeDRM_calibre_plugin/DeDRM_plugin.zipbin323312 -> 323428 bytes
-rw-r--r--DeDRM_calibre_plugin/DeDRM_plugin/__init__.py5
-rw-r--r--DeDRM_calibre_plugin/DeDRM_plugin/kgenpids.py23
3 files changed, 21 insertions, 7 deletions
diff --git a/DeDRM_calibre_plugin/DeDRM_plugin.zip b/DeDRM_calibre_plugin/DeDRM_plugin.zip
index 1868b81..8025aba 100644
--- a/DeDRM_calibre_plugin/DeDRM_plugin.zip
+++ b/DeDRM_calibre_plugin/DeDRM_plugin.zip
Binary files differ
diff --git a/DeDRM_calibre_plugin/DeDRM_plugin/__init__.py b/DeDRM_calibre_plugin/DeDRM_plugin/__init__.py
index ce72c8d..9c62f40 100644
--- a/DeDRM_calibre_plugin/DeDRM_plugin/__init__.py
+++ b/DeDRM_calibre_plugin/DeDRM_plugin/__init__.py
@@ -27,14 +27,15 @@ __docformat__ = 'restructuredtext en'
# Revision history:
# 6.0.0 - Initial release
# 6.0.1 - Bug Fixes for Windows App, Kindle for Mac and Windows Adobe Digital Editions
-# 6.0.2 - Restored call to Wine to get Kindle for PC keys
+# 6.0.2 - Restored call to Wine to get Kindle for PC keys, added for ADE
+# 6.0.3 - Fixes for Kindle for Mac and Windows non-ascii user names
"""
Decrypt DRMed ebooks.
"""
PLUGIN_NAME = u"DeDRM"
-PLUGIN_VERSION_TUPLE = (6, 0, 2)
+PLUGIN_VERSION_TUPLE = (6, 0, 3)
PLUGIN_VERSION = u".".join([unicode(str(x)) for x in PLUGIN_VERSION_TUPLE])
# Include an html helpfile in the plugin's zipfile with the following name.
RESOURCE_NAME = PLUGIN_NAME + '_Help.htm'
diff --git a/DeDRM_calibre_plugin/DeDRM_plugin/kgenpids.py b/DeDRM_calibre_plugin/DeDRM_plugin/kgenpids.py
index c84c458..f58e973 100644
--- a/DeDRM_calibre_plugin/DeDRM_plugin/kgenpids.py
+++ b/DeDRM_calibre_plugin/DeDRM_plugin/kgenpids.py
@@ -18,6 +18,7 @@ from __future__ import with_statement
# 1.5 - moved unicode_argv call inside main for Windows DeDRM compatibility
# 1.6 - Fixed a problem getting the disk serial numbers
# 1.7 - Work if TkInter is missing
+# 1.8 - Fixes for Kindle for Mac, and non-ascii in Windows user names
"""
@@ -25,7 +26,7 @@ Retrieve Kindle for PC/Mac user key.
"""
__license__ = 'GPL v3'
-__version__ = '1.7'
+__version__ = '1.8'
import sys, os, re
from struct import pack, unpack, unpack_from
@@ -1142,7 +1143,7 @@ if iswindows:
DB[keyname] = cleartext
if 'MazamaRandomNumber' in DB and 'kindle.account.tokens' in DB:
- print u"Decrypted key file using IDString '{0:s}' and UserName '{1:s}'".format(GetIDString(), GetUserName())
+ print u"Decrypted key file using IDString '{0:s}' and UserName '{1:s}'".format(GetIDString(), GetUserName().decode("latin-1"))
# store values used in decryption
DB['IDString'] = GetIDString()
DB['UserName'] = GetUserName()
@@ -1521,24 +1522,36 @@ elif isosx:
kInfoFiles.append(testpath)
print('Found k4Mac kinf2011 file: ' + testpath)
found = True
- # check for .kinf2011 files
+ # check for .kinf2011 files from 1.10
testpath = home + '/Library/Application Support/Kindle/storage/.kinf2011'
if os.path.isfile(testpath):
kInfoFiles.append(testpath)
print('Found k4Mac kinf2011 file: ' + testpath)
found = True
- # check for .rainier-2.1.1-kinf files
+ # check for .rainier-2.1.1-kinf files from 1.6
testpath = home + '/Library/Application Support/Kindle/storage/.rainier-2.1.1-kinf'
if os.path.isfile(testpath):
kInfoFiles.append(testpath)
print('Found k4Mac rainier file: ' + testpath)
found = True
- # check for .kindle-info files
+ # check for .kindle-info files from 1.4
testpath = home + '/Library/Application Support/Kindle/storage/.kindle-info'
if os.path.isfile(testpath):
kInfoFiles.append(testpath)
print('Found k4Mac kindle-info file: ' + testpath)
found = True
+ # check for .kindle-info file from 1.2.2
+ testpath = home + '/Library/Application Support/Amazon/Kindle/storage/.kindle-info'
+ if os.path.isfile(testpath):
+ kInfoFiles.append(testpath)
+ print('Found k4Mac kindle-info file: ' + testpath)
+ found = True
+ # check for .kindle-info file from 1.0 beta 1 (27214)
+ testpath = home + '/Library/Application Support/Amazon/Kindle for Mac/storage/.kindle-info'
+ if os.path.isfile(testpath):
+ kInfoFiles.append(testpath)
+ print('Found k4Mac kindle-info file: ' + testpath)
+ found = True
if not found:
print('No k4Mac kindle-info/rainier/kinf2011 files have been found.')
return kInfoFiles