summaryrefslogtreecommitdiffstats
path: root/DeDRM_Windows_Application
diff options
context:
space:
mode:
authorApprentice Harper <[email protected]>2017-01-12 07:24:42 +0000
committerApprentice Harper <[email protected]>2017-01-12 07:24:42 +0000
commit956f3034ada12a07f8df4f08d134a2c70c9a4d05 (patch)
tree5d5b9a5936a341bb7130d75b6c10859f0f7deaf1 /DeDRM_Windows_Application
parentfca7eaab8e26bf79d0515b3e33317e23b09c5c29 (diff)
Explicitly warn about KFX files. Bump version number to 6.5.3
Diffstat (limited to 'DeDRM_Windows_Application')
-rw-r--r--DeDRM_Windows_Application/DeDRM_App/DeDRM_lib/DeDRM_App.pyw3
-rw-r--r--DeDRM_Windows_Application/DeDRM_App/DeDRM_lib/lib/__init__.py3
-rw-r--r--DeDRM_Windows_Application/DeDRM_App/DeDRM_lib/lib/k4mobidedrm.py12
-rw-r--r--DeDRM_Windows_Application/DeDRM_App_ReadMe.txt2
4 files changed, 14 insertions, 6 deletions
diff --git a/DeDRM_Windows_Application/DeDRM_App/DeDRM_lib/DeDRM_App.pyw b/DeDRM_Windows_Application/DeDRM_App/DeDRM_lib/DeDRM_App.pyw
index c3a40d4..f4864f8 100644
--- a/DeDRM_Windows_Application/DeDRM_App/DeDRM_lib/DeDRM_App.pyw
+++ b/DeDRM_Windows_Application/DeDRM_App/DeDRM_lib/DeDRM_App.pyw
@@ -28,8 +28,9 @@
# 6.5.0 - Fix for some new tags in Topaz ebooks
# 6.5.1 - Version bump to match plugin & Mac app
# 6.5.2 - Fix for a new tag in Topaz ebooks
+# 6.5.3 - Explicitly warn about KFX files
-__version__ = '6.5.2'
+__version__ = '6.5.3'
import sys
import os, os.path
diff --git a/DeDRM_Windows_Application/DeDRM_App/DeDRM_lib/lib/__init__.py b/DeDRM_Windows_Application/DeDRM_App/DeDRM_lib/lib/__init__.py
index b359451..6fffb40 100644
--- a/DeDRM_Windows_Application/DeDRM_App/DeDRM_lib/lib/__init__.py
+++ b/DeDRM_Windows_Application/DeDRM_App/DeDRM_lib/lib/__init__.py
@@ -56,6 +56,7 @@ __docformat__ = 'restructuredtext en'
# Fix an error in wineutils.py
# 6.5.1 - Updated version number, added PDF check for DRM-free documents
# 6.5.2 - Another Topaz fix
+# 6.5.3 - Warn about KFX files explicitly
"""
@@ -63,7 +64,7 @@ Decrypt DRMed ebooks.
"""
PLUGIN_NAME = u"DeDRM"
-PLUGIN_VERSION_TUPLE = (6, 5, 2)
+PLUGIN_VERSION_TUPLE = (6, 5, 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_Windows_Application/DeDRM_App/DeDRM_lib/lib/k4mobidedrm.py b/DeDRM_Windows_Application/DeDRM_App/DeDRM_lib/lib/k4mobidedrm.py
index 67eb4cb..c3e475c 100644
--- a/DeDRM_Windows_Application/DeDRM_App/DeDRM_lib/lib/k4mobidedrm.py
+++ b/DeDRM_Windows_Application/DeDRM_App/DeDRM_lib/lib/k4mobidedrm.py
@@ -56,8 +56,9 @@ from __future__ import with_statement
# 5.1 - moved unicode_argv call inside main for Windows DeDRM compatibility
# 5.2 - Fixed error in command line processing of unicode arguments
# 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.
-__version__ = '5.3'
+__version__ = '5.4'
import sys, os, re
@@ -194,7 +195,11 @@ def GetDecryptedBook(infile, kDatabases, androidFiles, serials, pids, starttime
raise DrmException(u"Input file does not exist.")
mobi = True
- magic3 = open(infile,'rb').read(3)
+ magic8 = open(infile,'rb').read(8)
+ if magic8 == '\xeaDRMION\xee':
+ raise DrmException(u"KFX format detected. This format cannot be decrypted yet.")
+
+ magic3 = magic8[:3]
if magic3 == 'TPZ':
mobi = False
@@ -215,8 +220,9 @@ def GetDecryptedBook(infile, kDatabases, androidFiles, serials, pids, starttime
md1, md2 = mb.getPIDMetaInfo()
totalpids.extend(kgenpids.getPidList(md1, md2, serials, kDatabases))
# remove any duplicates
- totalpid = list(set(totalpids))
+ totalpids = list(set(totalpids))
print u"Found {1:d} keys to try after {0:.1f} seconds".format(time.time()-starttime, len(totalpids))
+ #print totalpids
try:
mb.processBook(totalpids)
diff --git a/DeDRM_Windows_Application/DeDRM_App_ReadMe.txt b/DeDRM_Windows_Application/DeDRM_App_ReadMe.txt
index 056dc3f..772b946 100644
--- a/DeDRM_Windows_Application/DeDRM_App_ReadMe.txt
+++ b/DeDRM_Windows_Application/DeDRM_App_ReadMe.txt
@@ -20,7 +20,7 @@ Installation
------------
0. If you don't already have a correct version of Python and PyCrypto installed, follow the "Installing Python on Windows" and "Installing PyCrypto on Windows" sections below before continuing.
-1. Drag the DeDRM_App folder from tools_v6.3.4a/DeDRM_Application_Windows to your "My Documents" folder.
+1. Drag the DeDRM_App folder from DeDRM_Application_Windows to your "My Documents" folder.
2. Open the DeDRM_App folder you've just dragged, and make a short-cut of the DeDRM_Drop_Target.bat file (right-click/Create Shortcut). Drag the shortcut file onto your Desktop.