Compare commits

...

2 Commits

Author SHA1 Message Date
Apprentice Harper
3d0aa17b2e Version to 6.6.3 with update for kindle book name cleanup and .kinf2018 support (initial) 2019-03-30 15:02:40 +00:00
Apprentice Harper
b17b913839 Update FAQs.md
confirmed that it's Kindle for Mac and PC 1.25 that's incompatible at present.
2019-02-23 16:45:16 +00:00
6 changed files with 31 additions and 13 deletions

View File

@@ -15,11 +15,12 @@ Just download and use these tools, that's all! Uh, almost. There are a few, uh,
* You must own the ebook - the tools won't work on library ebooks or rented ebooks or books from a friend.
* You must not use these tools to give your ebooks to a hundred of your closest friends. Or to a million strangers. Authors need to sell books to be able to write more books. Don't be mean to the authors.
* Do NOT use Adobe Digital Editions 3.0 or later to download your ePubs. ADE 3.0 and later might use a new encryption scheme that the tools can't handle. While major ebook stores aren't using the new scheme yet, using ADE 2.0.1 will ensure that your ebooks are downloaded using the old scheme. Once a book has been downloaded with the new scheme, it's IMPOSSIBLE to re-download using the old scheme (without buying it again).
* Do NOT use Kindle for PC/Mac version 1.25 or later. The tools don't current work with those versions.
But otherwise, if your ebook is from Amazon, Kobo, Barnes & Noble or any of the ebook stores selling ebooks compatible with Adobe Digital Editions 2.0.1, you should be able to remove the DRM that's been applied to your ebooks.
### A Recent Change to Kindle for PC/Kindle for Mac
Starting with version 1.19, Kindle for PC/Mac uses Amazon's new KFX format which isn't quite as good a source fro conversion to ePub as the older KF8 (& MOBI) formats. There are two options to get the older formats. Either stick with version 1.17 or earlier, or modify the executable by changing a file name. Note that with Kindle for Mac 1.25 and later, there is no current solution even for FKX. You must use 1.24 or earlier.
Starting with version 1.19, Kindle for PC/Mac uses Amazon's new KFX format which isn't quite as good a source fro conversion to ePub as the older KF8 (& MOBI) formats. There are two options to get the older formats. Either stick with version 1.17 or earlier, or modify the executable by changing a file name. Note that with Kindle for PC/Mac 1.25 and later, there is no current solution even for FKX. You must use 1.24 or earlier.
Version 1.17 of Kindle is are no longer available directly from Amazon, so you will need to search for the proper file name and find it on a third party site. The name is "KindleForPC-installer-1.17.44170.exe" for PC and "KindleForMac-44182.dmg" for Mac.
Verify the one of the following cryptographic hash values, using software of your choice, before installing the downloaded file in order to avoid viruses. If the hash does not match, delete the downloaded file and try again from another site.

View File

@@ -34,7 +34,7 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>6.6.2</string>
<string>6.6.3</string>
<key>CFBundleSignature</key>
<string>dplt</string>
<key>LSMinimumSystemVersionByArchitecture</key>

View File

@@ -2,7 +2,7 @@
# -*- coding: utf-8 -*-
# DeDRM.pyw
# Copyright 2010-2016 some_updates, Apprentice Alf and Apprentice Harper
# Copyright 2010-2019 some_updates, Apprentice Alf and Apprentice Harper
# Revision history:
# 6.0.0 - Release along with unified plugin
@@ -34,8 +34,9 @@
# 6.6.0 - Initial KFX support from TomThumb
# 6.6.1 - Standalong app fix from wzyboy
# 6.6.2 - Version bump for 64-bit Mac OS X app and various fixes.
# 6.6.3 - Version bump for Kindle book name fixes and start of support for .kinf2018
__version__ = '6.6.2'
__version__ = '6.6.3'
import sys
import os, os.path

View File

@@ -4,9 +4,10 @@
from __future__ import with_statement
# __init__.py for DeDRM_plugin
# Copyright © 2008-2018 Apprentice Harper et al.
# Copyright © 2008-2019 Apprentice Harper et al.
__license__ = 'GPL v3'
__version__ = '6.6.3'
__docformat__ = 'restructuredtext en'
@@ -67,6 +68,7 @@ __docformat__ = 'restructuredtext en'
# imported format was azw8 since that may be converted to kfx)
# 6.6.1 - Thanks to wzyboy for a fix for stand-alone tools, and the new folder structure.
# 6.6.2 - revamp of folders to get Mac OS X app working. Updated to 64-bit app. Various fixes.
# 6.6.3 - More cleanup of kindle book names and start of support for .kinf2018
"""
@@ -74,7 +76,7 @@ Decrypt DRMed ebooks.
"""
PLUGIN_NAME = u"DeDRM"
PLUGIN_VERSION_TUPLE = (6, 6, 2)
PLUGIN_VERSION_TUPLE = (6, 6, 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'

View File

@@ -4,10 +4,10 @@
from __future__ import with_statement
# k4mobidedrm.py
# Copyright © 2008-2017 by Apprentice Harper et al.
# Copyright © 2008-2019 by Apprentice Harper et al.
__license__ = 'GPL v3'
__version__ = '5.5'
__version__ = '5.7'
# Engine to remove drm from Kindle and Mobipocket ebooks
# for personal use for archiving and converting your ebooks
@@ -60,7 +60,8 @@ __version__ = '5.5'
# 5.3 - Changed Android support to allow passing of backup .ab files
# 5.4 - Recognise KFX files masquerading as azw, even if we can't decrypt them yet.
# 5.5 - Added GPL v3 licence explicitly.
# 5.x - Invoke KFXZipBook to handle zipped KFX files
# 5.6 - Invoke KFXZipBook to handle zipped KFX files
# 5.7 - Revamp cleanup_name
import sys, os, re
import csv
@@ -155,19 +156,24 @@ def unicode_argv():
# added in removal of control (<32) chars
# and removal of . at start and end
# and with some (heavily edited) code from Paul Durrant's kindlenamer.py
# and some improvements suggested by jhaisley
def cleanup_name(name):
# substitute filename unfriendly characters
name = name.replace(u"<",u"[").replace(u">",u"]").replace(u" : ",u" ").replace(u": ",u" ").replace(u":",u"").replace(u"/",u"_").replace(u"\\",u"_").replace(u"|",u"_").replace(u"\"",u"\'").replace(u"*",u"_").replace(u"?",u"")
# delete control characters
name = u"".join(char for char in name if ord(char)>=32)
# white space to single space, delete leading and trailing while space
name = re.sub(ur"\s", u" ", name).strip()
# delete control characters
name = u"".join(char for char in name if ord(char)>=32)
# delete non-ascii characters
name = u"".join(char for char in name if ord(char)<=126)
# remove leading dots
while len(name)>0 and name[0] == u".":
name = name[1:]
# remove trailing dots (Windows doesn't like them)
if name.endswith(u'.'):
while name.endswith(u'.'):
name = name[:-1]
if len(name)==0:
name=u"DecryptedBook"
return name
# must be passed unicode

View File

@@ -7,7 +7,7 @@ from __future__ import with_statement
# Copyright © 2008-2017 Apprentice Harper et al.
__license__ = 'GPL v3'
__version__ = '2.5'
__version__ = '2.6'
# Revision history:
# 1.0 - Kindle info file decryption, extracted from k4mobidedrm, etc.
@@ -28,6 +28,7 @@ __version__ = '2.5'
# 2.3 - Added more field names thanks to concavegit's KFX code.
# 2.4 - Fix for complex Mac disk setups, thanks to Tibs
# 2.5 - Final Fix for Windows user names with non-ascii characters, thanks to oneofusoneofus
# 2.6 - Start adding support for Kindle 2.25+ .kinf2018 file
"""
@@ -973,6 +974,13 @@ if iswindows:
# Probably not the best. To Fix (shouldn't ignore in encoding) or use utf-8
print(u'searching for kinfoFiles in ' + path.encode('ascii', 'ignore'))
# look for (K4PC 2.25.1and later) .kinf2018 file
kinfopath = path +'\\Amazon\\Kindle\\storage\\.kinf2018'
if os.path.isfile(kinfopath):
found = True
print('Found K4PC 2.25+ kinf2018 file: ' + kinfopath.encode('ascii','ignore'))
kInfoFiles.append(kinfopath)
# look for (K4PC 1.9.0 and later) .kinf2011 file
kinfopath = path +'\\Amazon\\Kindle\\storage\\.kinf2011'
if os.path.isfile(kinfopath):