diff --git a/DeDRM_Macintosh_Application/DeDRM.app.txt b/DeDRM_Macintosh_Application/DeDRM.app.txt
index f2d1384..0bfe842 100644
Binary files a/DeDRM_Macintosh_Application/DeDRM.app.txt and b/DeDRM_Macintosh_Application/DeDRM.app.txt differ
diff --git a/DeDRM_Macintosh_Application/DeDRM.app/Contents/Info.plist b/DeDRM_Macintosh_Application/DeDRM.app/Contents/Info.plist
index 68ef7de..d8c82fa 100644
--- a/DeDRM_Macintosh_Application/DeDRM.app/Contents/Info.plist
+++ b/DeDRM_Macintosh_Application/DeDRM.app/Contents/Info.plist
@@ -24,7 +24,7 @@
CFBundleExecutable
droplet
CFBundleGetInfoString
- DeDRM AppleScript 6.0.3. Written 2010–2013 by Apprentice Alf and others.
+ DeDRM AppleScript 6.0.4. Written 2010–2013 by Apprentice Alf and others.
CFBundleIconFile
DeDRM
CFBundleIdentifier
@@ -36,7 +36,7 @@
CFBundlePackageType
APPL
CFBundleShortVersionString
- 6.0.3
+ 6.0.4
CFBundleSignature
dplt
LSRequiresCarbon
@@ -52,7 +52,7 @@
positionOfDivider
0.0
savedFrame
- 320 125 1002 753 0 0 1440 878
+ 85 100 1002 753 0 0 1440 878
selectedTabView
event log
diff --git a/DeDRM_Macintosh_Application/DeDRM.app/Contents/Resources/Scripts/main.scpt b/DeDRM_Macintosh_Application/DeDRM.app/Contents/Resources/Scripts/main.scpt
index f1f8656..a99828f 100644
Binary files a/DeDRM_Macintosh_Application/DeDRM.app/Contents/Resources/Scripts/main.scpt and b/DeDRM_Macintosh_Application/DeDRM.app/Contents/Resources/Scripts/main.scpt differ
diff --git a/DeDRM_Macintosh_Application/DeDRM.app/Contents/Resources/k4mobidedrm.py b/DeDRM_Macintosh_Application/DeDRM.app/Contents/Resources/k4mobidedrm.py
index e15f104..0e426a1 100644
--- a/DeDRM_Macintosh_Application/DeDRM.app/Contents/Resources/k4mobidedrm.py
+++ b/DeDRM_Macintosh_Application/DeDRM.app/Contents/Resources/k4mobidedrm.py
@@ -54,8 +54,9 @@ from __future__ import with_statement
# 5.0 - Extraction of info from Kindle for PC/Mac moved into kindlekey.py
# - tweaked GetDecryptedBook interface to leave passed parameters unchanged
# 5.1 - moved unicode_argv call inside main for Windows DeDRM compatibility
+# 5.2 - Fixed error in command line processing of unicode arguments
-__version__ = '5.1'
+__version__ = '5.2'
import sys, os, re
@@ -283,7 +284,7 @@ def cli_main():
print u"K4MobiDeDrm v{0}.\nCopyright © 2008-2013 The Dark Reverser et al.".format(__version__)
try:
- opts, args = getopt.getopt(sys.argv[1:], "k:p:s:")
+ opts, args = getopt.getopt(argv[1:], "k:p:s:")
except getopt.GetoptError, err:
print u"Error in options or arguments: {0}".format(err.args[0])
usage(progname)
diff --git a/DeDRM_Macintosh_Application/DeDRM.app/Contents/Resources/mobidedrm.py b/DeDRM_Macintosh_Application/DeDRM.app/Contents/Resources/mobidedrm.py
index ee24de5..7b69edc 100644
--- a/DeDRM_Macintosh_Application/DeDRM.app/Contents/Resources/mobidedrm.py
+++ b/DeDRM_Macintosh_Application/DeDRM.app/Contents/Resources/mobidedrm.py
@@ -68,9 +68,10 @@
# 0.38 - Unicode used wherever possible, cope with absent alfcrypto
# 0.39 - Fixed problem with TEXtREAd and getBookType interface
# 0.40 - moved unicode_argv call inside main for Windows DeDRM compatibility
+# 0.41 - Fixed potential unicode problem in command line calls
-__version__ = u"0.40"
+__version__ = u"0.41"
import sys
import os
@@ -514,7 +515,7 @@ def cli_main():
print u"MobiDeDrm v{0}.\nCopyright © 2008-2012 The Dark Reverser et al.".format(__version__)
print u"Removes protection from Kindle/Mobipocket, Kindle/KF8 and Kindle/Print Replica ebooks"
print u"Usage:"
- print u" {0} []".format(os.path.basename(sys.argv[0]))
+ print u" {0} []".format(progname)
return 1
else:
infile = argv[1]
diff --git a/DeDRM_Macintosh_Application/DeDRM.app/Contents/Resources/topazextract.py b/DeDRM_Macintosh_Application/DeDRM.app/Contents/Resources/topazextract.py
index d44ae88..97f6583 100644
--- a/DeDRM_Macintosh_Application/DeDRM.app/Contents/Resources/topazextract.py
+++ b/DeDRM_Macintosh_Application/DeDRM.app/Contents/Resources/topazextract.py
@@ -6,8 +6,9 @@
# Changelog
# 4.9 - moved unicode_argv call inside main for Windows DeDRM compatibility
+# 5.0 - Fixed potential unicode problem with command line interface
-__version__ = '4.9'
+__version__ = '5.0'
import sys
import os, csv, getopt
@@ -451,7 +452,7 @@ def cli_main():
print u"TopazExtract v{0}.".format(__version__)
try:
- opts, args = getopt.getopt(sys.argv[1:], "k:p:s:x")
+ opts, args = getopt.getopt(argv[1:], "k:p:s:x")
except getopt.GetoptError, err:
print u"Error in options or arguments: {0}".format(err.args[0])
usage(progname)
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 de650c9..f00b934 100644
--- a/DeDRM_Windows_Application/DeDRM_App/DeDRM_lib/DeDRM_app.pyw
+++ b/DeDRM_Windows_Application/DeDRM_App/DeDRM_lib/DeDRM_app.pyw
@@ -9,8 +9,9 @@
# 6.0.1 - Bug Fixes for Windows App
# 6.0.2 - Fixed problem with spaces in paths and the bat file
# 6.0.3 - Fix for Windows non-ascii user names
+# 6.0.4 - Fix for other potential unicode problems
-__version__ = '6.0.3'
+__version__ = '6.0.4'
import sys
import os, os.path
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 e15f104..0e426a1 100644
--- a/DeDRM_Windows_Application/DeDRM_App/DeDRM_lib/lib/k4mobidedrm.py
+++ b/DeDRM_Windows_Application/DeDRM_App/DeDRM_lib/lib/k4mobidedrm.py
@@ -54,8 +54,9 @@ from __future__ import with_statement
# 5.0 - Extraction of info from Kindle for PC/Mac moved into kindlekey.py
# - tweaked GetDecryptedBook interface to leave passed parameters unchanged
# 5.1 - moved unicode_argv call inside main for Windows DeDRM compatibility
+# 5.2 - Fixed error in command line processing of unicode arguments
-__version__ = '5.1'
+__version__ = '5.2'
import sys, os, re
@@ -283,7 +284,7 @@ def cli_main():
print u"K4MobiDeDrm v{0}.\nCopyright © 2008-2013 The Dark Reverser et al.".format(__version__)
try:
- opts, args = getopt.getopt(sys.argv[1:], "k:p:s:")
+ opts, args = getopt.getopt(argv[1:], "k:p:s:")
except getopt.GetoptError, err:
print u"Error in options or arguments: {0}".format(err.args[0])
usage(progname)
diff --git a/DeDRM_Windows_Application/DeDRM_App/DeDRM_lib/lib/mobidedrm.py b/DeDRM_Windows_Application/DeDRM_App/DeDRM_lib/lib/mobidedrm.py
index ee24de5..7b69edc 100644
--- a/DeDRM_Windows_Application/DeDRM_App/DeDRM_lib/lib/mobidedrm.py
+++ b/DeDRM_Windows_Application/DeDRM_App/DeDRM_lib/lib/mobidedrm.py
@@ -68,9 +68,10 @@
# 0.38 - Unicode used wherever possible, cope with absent alfcrypto
# 0.39 - Fixed problem with TEXtREAd and getBookType interface
# 0.40 - moved unicode_argv call inside main for Windows DeDRM compatibility
+# 0.41 - Fixed potential unicode problem in command line calls
-__version__ = u"0.40"
+__version__ = u"0.41"
import sys
import os
@@ -514,7 +515,7 @@ def cli_main():
print u"MobiDeDrm v{0}.\nCopyright © 2008-2012 The Dark Reverser et al.".format(__version__)
print u"Removes protection from Kindle/Mobipocket, Kindle/KF8 and Kindle/Print Replica ebooks"
print u"Usage:"
- print u" {0} []".format(os.path.basename(sys.argv[0]))
+ print u" {0} []".format(progname)
return 1
else:
infile = argv[1]
diff --git a/DeDRM_Windows_Application/DeDRM_App/DeDRM_lib/lib/topazextract.py b/DeDRM_Windows_Application/DeDRM_App/DeDRM_lib/lib/topazextract.py
index d44ae88..97f6583 100644
--- a/DeDRM_Windows_Application/DeDRM_App/DeDRM_lib/lib/topazextract.py
+++ b/DeDRM_Windows_Application/DeDRM_App/DeDRM_lib/lib/topazextract.py
@@ -6,8 +6,9 @@
# Changelog
# 4.9 - moved unicode_argv call inside main for Windows DeDRM compatibility
+# 5.0 - Fixed potential unicode problem with command line interface
-__version__ = '4.9'
+__version__ = '5.0'
import sys
import os, csv, getopt
@@ -451,7 +452,7 @@ def cli_main():
print u"TopazExtract v{0}.".format(__version__)
try:
- opts, args = getopt.getopt(sys.argv[1:], "k:p:s:x")
+ opts, args = getopt.getopt(argv[1:], "k:p:s:x")
except getopt.GetoptError, err:
print u"Error in options or arguments: {0}".format(err.args[0])
usage(progname)
diff --git a/DeDRM_calibre_plugin/DeDRM_plugin.zip b/DeDRM_calibre_plugin/DeDRM_plugin.zip
index 8025aba..0420378 100644
Binary files a/DeDRM_calibre_plugin/DeDRM_plugin.zip and b/DeDRM_calibre_plugin/DeDRM_plugin.zip differ
diff --git a/DeDRM_calibre_plugin/DeDRM_plugin/__init__.py b/DeDRM_calibre_plugin/DeDRM_plugin/__init__.py
index 9c62f40..fe7e223 100644
--- a/DeDRM_calibre_plugin/DeDRM_plugin/__init__.py
+++ b/DeDRM_calibre_plugin/DeDRM_plugin/__init__.py
@@ -29,13 +29,15 @@ __docformat__ = 'restructuredtext en'
# 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, added for ADE
# 6.0.3 - Fixes for Kindle for Mac and Windows non-ascii user names
+# 6.0.4 - Fixes for stand-alone scripts and applications
+# and pdb files in plugin and initial conversion of prefs.
"""
Decrypt DRMed ebooks.
"""
PLUGIN_NAME = u"DeDRM"
-PLUGIN_VERSION_TUPLE = (6, 0, 3)
+PLUGIN_VERSION_TUPLE = (6, 0, 4)
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'
@@ -427,7 +429,7 @@ class DeDRM(FileTypePlugin):
import calibre_plugins.dedrm.prefs as prefs
import calibre_plugins.dedrm.erdr2pml
- dedrmrefs = prefs.DeDRM_Prefs()
+ dedrmprefs = prefs.DeDRM_Prefs()
# Attempt to decrypt epub with each encryption key (generated or provided).
for keyname, userkey in dedrmprefs['ereaderkeys'].items():
keyname_masked = u"".join((u'X' if (x.isdigit()) else x) for x in keyname)
diff --git a/DeDRM_calibre_plugin/DeDRM_plugin/ineptpdf.py b/DeDRM_calibre_plugin/DeDRM_plugin/ineptpdf.py
index e15f104..0e426a1 100644
--- a/DeDRM_calibre_plugin/DeDRM_plugin/ineptpdf.py
+++ b/DeDRM_calibre_plugin/DeDRM_plugin/ineptpdf.py
@@ -54,8 +54,9 @@ from __future__ import with_statement
# 5.0 - Extraction of info from Kindle for PC/Mac moved into kindlekey.py
# - tweaked GetDecryptedBook interface to leave passed parameters unchanged
# 5.1 - moved unicode_argv call inside main for Windows DeDRM compatibility
+# 5.2 - Fixed error in command line processing of unicode arguments
-__version__ = '5.1'
+__version__ = '5.2'
import sys, os, re
@@ -283,7 +284,7 @@ def cli_main():
print u"K4MobiDeDrm v{0}.\nCopyright © 2008-2013 The Dark Reverser et al.".format(__version__)
try:
- opts, args = getopt.getopt(sys.argv[1:], "k:p:s:")
+ opts, args = getopt.getopt(argv[1:], "k:p:s:")
except getopt.GetoptError, err:
print u"Error in options or arguments: {0}".format(err.args[0])
usage(progname)
diff --git a/DeDRM_calibre_plugin/DeDRM_plugin/libalfcrypto64.so b/DeDRM_calibre_plugin/DeDRM_plugin/libalfcrypto64.so
index ee24de5..7b69edc 100644
--- a/DeDRM_calibre_plugin/DeDRM_plugin/libalfcrypto64.so
+++ b/DeDRM_calibre_plugin/DeDRM_plugin/libalfcrypto64.so
@@ -68,9 +68,10 @@
# 0.38 - Unicode used wherever possible, cope with absent alfcrypto
# 0.39 - Fixed problem with TEXtREAd and getBookType interface
# 0.40 - moved unicode_argv call inside main for Windows DeDRM compatibility
+# 0.41 - Fixed potential unicode problem in command line calls
-__version__ = u"0.40"
+__version__ = u"0.41"
import sys
import os
@@ -514,7 +515,7 @@ def cli_main():
print u"MobiDeDrm v{0}.\nCopyright © 2008-2012 The Dark Reverser et al.".format(__version__)
print u"Removes protection from Kindle/Mobipocket, Kindle/KF8 and Kindle/Print Replica ebooks"
print u"Usage:"
- print u" {0} []".format(os.path.basename(sys.argv[0]))
+ print u" {0} []".format(progname)
return 1
else:
infile = argv[1]
diff --git a/DeDRM_calibre_plugin/DeDRM_plugin/plugin-import-name-dedrm.txt b/DeDRM_calibre_plugin/DeDRM_plugin/plugin-import-name-dedrm.txt
index 2c8c665..478372e 100644
--- a/DeDRM_calibre_plugin/DeDRM_plugin/plugin-import-name-dedrm.txt
+++ b/DeDRM_calibre_plugin/DeDRM_plugin/plugin-import-name-dedrm.txt
@@ -231,21 +231,20 @@ def convertprefs(always = False):
dedrmprefs.addnamedvaluetoprefs('bandnkeys', name, value)
addedkeycount = len(dedrmprefs['bandnkeys'])-priorkeycount
if addedkeycount > 0:
- print u"{0} v{1}: {2:d} Barnes and Noble {3} imported from config folder.".format(PLUGIN_NAME, PLUGIN_VERSION, ignoblecount, u"key file" if ignoblecount==1 else u"key files")
+ print u"{0} v{1}: {2:d} Barnes and Noble {3} imported from config folder.".format(PLUGIN_NAME, PLUGIN_VERSION, addedkeycount, u"key file" if addedkeycount==1 else u"key files")
# Make the json write all the prefs to disk
dedrmprefs.writeprefs(False)
# get any .der files in the config dir
priorkeycount = len(dedrmprefs['adeptkeys'])
adeptfilekeys = getConfigFiles('.der','hex')
- ineptcount = addConfigFiles('.der', 'adeptkeys')
for keypair in adeptfilekeys:
name = keypair[0]
value = keypair[1]
dedrmprefs.addnamedvaluetoprefs('adeptkeys', name, value)
addedkeycount = len(dedrmprefs['adeptkeys'])-priorkeycount
if addedkeycount > 0:
- print u"{0} v{1}: {2:d} Adobe Adept {3} imported from config folder.".format(PLUGIN_NAME, PLUGIN_VERSION, ineptcount, u"keyfile" if ineptcount==1 else u"keyfiles")
+ print u"{0} v{1}: {2:d} Adobe Adept {3} imported from config folder.".format(PLUGIN_NAME, PLUGIN_VERSION, addedkeycount, u"keyfile" if addedkeycount==1 else u"keyfiles")
# Make the json write all the prefs to disk
dedrmprefs.writeprefs(False)
@@ -280,7 +279,7 @@ def convertprefs(always = False):
if addedserialcount > 0:
print u"{0} v{1}: {2:d} {3} imported from Kindle plugin preferences".format(PLUGIN_NAME, PLUGIN_VERSION, addedserialcount, u"serial number" if addedserialcount==1 else u"serial numbers")
try:
- if kindleprefs['wineprefix'] != "":
+ if 'wineprefix' in kindleprefs and kindleprefs['wineprefix'] != "":
dedrmprefs.set('adobewineprefix',kindleprefs['wineprefix'])
dedrmprefs.set('kindlewineprefix',kindleprefs['wineprefix'])
print u"{0} v{1}: WINEPREFIX ‘(2)’ imported from Kindle plugin preferences".format(PLUGIN_NAME, PLUGIN_VERSION, kindleprefs['wineprefix'])
diff --git a/DeDRM_calibre_plugin/DeDRM_plugin/utilities.py b/DeDRM_calibre_plugin/DeDRM_plugin/utilities.py
index d44ae88..97f6583 100644
--- a/DeDRM_calibre_plugin/DeDRM_plugin/utilities.py
+++ b/DeDRM_calibre_plugin/DeDRM_plugin/utilities.py
@@ -6,8 +6,9 @@
# Changelog
# 4.9 - moved unicode_argv call inside main for Windows DeDRM compatibility
+# 5.0 - Fixed potential unicode problem with command line interface
-__version__ = '4.9'
+__version__ = '5.0'
import sys
import os, csv, getopt
@@ -451,7 +452,7 @@ def cli_main():
print u"TopazExtract v{0}.".format(__version__)
try:
- opts, args = getopt.getopt(sys.argv[1:], "k:p:s:x")
+ opts, args = getopt.getopt(argv[1:], "k:p:s:x")
except getopt.GetoptError, err:
print u"Error in options or arguments: {0}".format(err.args[0])
usage(progname)
diff --git a/ReadMe_First.txt b/ReadMe_First.txt
index af344c9..5143509 100644
--- a/ReadMe_First.txt
+++ b/ReadMe_First.txt
@@ -1,7 +1,7 @@
Welcome to the tools!
=====================
-This ReadMe_First.txt is meant to give users a quick overview of what is available and how to get started. This document is part of the Tools v6.0.3 archive from Apprentice Alf's Blog: http://apprenticealf.wordpress.com/
+This ReadMe_First.txt is meant to give users a quick overview of what is available and how to get started. This document is part of the Tools v6.0.4 archive from Apprentice Alf's Blog: http://apprenticealf.wordpress.com/
The is archive includes tools to remove DRM from: