summaryrefslogtreecommitdiffstats
path: root/DeDRM_calibre_plugin
diff options
context:
space:
mode:
authorApprentice Alf <[email protected]>2013-04-10 11:50:10 +0100
committerApprentice Alf <[email protected]>2015-03-07 14:55:09 +0000
commitcd2d74601a742198c7b5ef530c3660f1b176b68b (patch)
treea97382da7f934a147aa6b6c8c163e94b3ad8bf61 /DeDRM_calibre_plugin
parent51919284caf90a72c99e2471bfb32306aec8dc8a (diff)
tools v6.0.4
Diffstat (limited to 'DeDRM_calibre_plugin')
-rw-r--r--DeDRM_calibre_plugin/DeDRM_plugin.zipbin323428 -> 323530 bytes
-rw-r--r--DeDRM_calibre_plugin/DeDRM_plugin/__init__.py6
-rw-r--r--DeDRM_calibre_plugin/DeDRM_plugin/ineptpdf.py5
-rw-r--r--DeDRM_calibre_plugin/DeDRM_plugin/libalfcrypto64.so5
-rw-r--r--DeDRM_calibre_plugin/DeDRM_plugin/plugin-import-name-dedrm.txt7
-rw-r--r--DeDRM_calibre_plugin/DeDRM_plugin/utilities.py5
6 files changed, 16 insertions, 12 deletions
diff --git a/DeDRM_calibre_plugin/DeDRM_plugin.zip b/DeDRM_calibre_plugin/DeDRM_plugin.zip
index 8025aba..0420378 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 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} <infile> <outfile> [<Comma separated list of PIDs to try>]".format(os.path.basename(sys.argv[0]))
+ print u" {0} <infile> <outfile> [<Comma separated list of PIDs to try>]".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)