mirror of
https://github.com/noDRM/DeDRM_tools.git
synced 2025-01-12 03:14:43 +06:00
Regression bug fixes
This commit is contained in:
parent
10963f6011
commit
ca42e028a7
@ -24,7 +24,7 @@
|
|||||||
<key>CFBundleExecutable</key>
|
<key>CFBundleExecutable</key>
|
||||||
<string>droplet</string>
|
<string>droplet</string>
|
||||||
<key>CFBundleGetInfoString</key>
|
<key>CFBundleGetInfoString</key>
|
||||||
<string>DeDRM AppleScript 6.3.5 Written 2010–2016 by Apprentice Alf et al.</string>
|
<string>DeDRM AppleScript 6.3.6 Written 2010–2016 by Apprentice Alf et al.</string>
|
||||||
<key>CFBundleIconFile</key>
|
<key>CFBundleIconFile</key>
|
||||||
<string>DeDRM</string>
|
<string>DeDRM</string>
|
||||||
<key>CFBundleIdentifier</key>
|
<key>CFBundleIdentifier</key>
|
||||||
@ -36,7 +36,7 @@
|
|||||||
<key>CFBundlePackageType</key>
|
<key>CFBundlePackageType</key>
|
||||||
<string>APPL</string>
|
<string>APPL</string>
|
||||||
<key>CFBundleShortVersionString</key>
|
<key>CFBundleShortVersionString</key>
|
||||||
<string>6.3.5</string>
|
<string>6.3.6</string>
|
||||||
<key>CFBundleSignature</key>
|
<key>CFBundleSignature</key>
|
||||||
<string>dplt</string>
|
<string>dplt</string>
|
||||||
<key>LSRequiresCarbon</key>
|
<key>LSRequiresCarbon</key>
|
||||||
|
@ -47,6 +47,7 @@ __docformat__ = 'restructuredtext en'
|
|||||||
# 6.3.3 - Bug fix for Kindle for PC support
|
# 6.3.3 - Bug fix for Kindle for PC support
|
||||||
# 6.3.4 - Fixes for Kindle for Android, Linux, and Kobo 3.17
|
# 6.3.4 - Fixes for Kindle for Android, Linux, and Kobo 3.17
|
||||||
# 6.3.5 - Fixes for Linux, and Kobo 3.19 and more logging
|
# 6.3.5 - Fixes for Linux, and Kobo 3.19 and more logging
|
||||||
|
# 6.3.6 - Fixes for ADE ePub and PDF introduced in 6.3.5
|
||||||
|
|
||||||
|
|
||||||
"""
|
"""
|
||||||
@ -54,7 +55,7 @@ Decrypt DRMed ebooks.
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
PLUGIN_NAME = u"DeDRM"
|
PLUGIN_NAME = u"DeDRM"
|
||||||
PLUGIN_VERSION_TUPLE = (6, 3, 5)
|
PLUGIN_VERSION_TUPLE = (6, 3, 6)
|
||||||
PLUGIN_VERSION = u".".join([unicode(str(x)) for x in PLUGIN_VERSION_TUPLE])
|
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.
|
# Include an html helpfile in the plugin's zipfile with the following name.
|
||||||
RESOURCE_NAME = PLUGIN_NAME + '_Help.htm'
|
RESOURCE_NAME = PLUGIN_NAME + '_Help.htm'
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
from __future__ import with_statement
|
from __future__ import with_statement
|
||||||
|
|
||||||
# ineptepub.pyw, version 6.3
|
# ineptepub.pyw, version 6.4
|
||||||
# Copyright © 2009-2010 by i♥cabbages
|
# Copyright © 2009-2010 by i♥cabbages
|
||||||
|
|
||||||
# Released under the terms of the GNU General Public Licence, version 3
|
# Released under the terms of the GNU General Public Licence, version 3
|
||||||
@ -40,13 +40,14 @@ from __future__ import with_statement
|
|||||||
# 6.1 - Work if TkInter is missing
|
# 6.1 - Work if TkInter is missing
|
||||||
# 6.2 - Handle UTF-8 file names inside an ePub, fix by Jose Luis
|
# 6.2 - Handle UTF-8 file names inside an ePub, fix by Jose Luis
|
||||||
# 6.3 - Add additional check on DER file sanity
|
# 6.3 - Add additional check on DER file sanity
|
||||||
|
# 6.4 - Remove erroneous check on DER file sanity
|
||||||
|
|
||||||
"""
|
"""
|
||||||
Decrypt Adobe Digital Editions encrypted ePub books.
|
Decrypt Adobe Digital Editions encrypted ePub books.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
__license__ = 'GPL v3'
|
__license__ = 'GPL v3'
|
||||||
__version__ = "6.3"
|
__version__ = "6.4"
|
||||||
|
|
||||||
import sys
|
import sys
|
||||||
import os
|
import os
|
||||||
@ -174,11 +175,6 @@ def _load_crypto_libcrypto():
|
|||||||
rsa = self._rsa = d2i_RSAPrivateKey(None, pp, len(der))
|
rsa = self._rsa = d2i_RSAPrivateKey(None, pp, len(der))
|
||||||
if rsa is None:
|
if rsa is None:
|
||||||
raise ADEPTError('Error parsing ADEPT user key DER')
|
raise ADEPTError('Error parsing ADEPT user key DER')
|
||||||
# check if pointer is not NULL
|
|
||||||
try:
|
|
||||||
c = self._rsa.contents
|
|
||||||
except ValueError:
|
|
||||||
raise ADEPTError('Error parsing ADEPT user key DER')
|
|
||||||
|
|
||||||
def decrypt(self, from_):
|
def decrypt(self, from_):
|
||||||
rsa = self._rsa
|
rsa = self._rsa
|
||||||
@ -326,7 +322,6 @@ def _load_crypto_pycrypto():
|
|||||||
except ValueError:
|
except ValueError:
|
||||||
raise ADEPTError('Error parsing ADEPT user key DER')
|
raise ADEPTError('Error parsing ADEPT user key DER')
|
||||||
|
|
||||||
|
|
||||||
def bytesToNumber(self, bytes):
|
def bytesToNumber(self, bytes):
|
||||||
total = 0L
|
total = 0L
|
||||||
for byte in bytes:
|
for byte in bytes:
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
from __future__ import with_statement
|
from __future__ import with_statement
|
||||||
|
|
||||||
# ineptpdf.pyw, version 8.0.2
|
# ineptpdf.pyw, version 8.0.3
|
||||||
# Copyright © 2009-2010 by i♥cabbages
|
# Copyright © 2009-2010 by i♥cabbages
|
||||||
|
|
||||||
# Released under the terms of the GNU General Public Licence, version 3
|
# Released under the terms of the GNU General Public Licence, version 3
|
||||||
@ -55,6 +55,7 @@ from __future__ import with_statement
|
|||||||
# 8.0 - Work if TkInter is missing
|
# 8.0 - Work if TkInter is missing
|
||||||
# 8.0.1 - Broken Metadata fix.
|
# 8.0.1 - Broken Metadata fix.
|
||||||
# 8.0.2 - Add additional check on DER file sanity
|
# 8.0.2 - Add additional check on DER file sanity
|
||||||
|
# 8.0.3 - Remove erroneous check on DER file sanity
|
||||||
|
|
||||||
|
|
||||||
"""
|
"""
|
||||||
@ -62,7 +63,7 @@ Decrypts Adobe ADEPT-encrypted PDF files.
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
__license__ = 'GPL v3'
|
__license__ = 'GPL v3'
|
||||||
__version__ = "8.0.2"
|
__version__ = "8.0.3"
|
||||||
|
|
||||||
import sys
|
import sys
|
||||||
import os
|
import os
|
||||||
@ -201,11 +202,6 @@ def _load_crypto_libcrypto():
|
|||||||
rsa = self._rsa = d2i_RSAPrivateKey(None, pp, len(der))
|
rsa = self._rsa = d2i_RSAPrivateKey(None, pp, len(der))
|
||||||
if rsa is None:
|
if rsa is None:
|
||||||
raise ADEPTError('Error parsing ADEPT user key DER')
|
raise ADEPTError('Error parsing ADEPT user key DER')
|
||||||
# check if pointer is not NULL
|
|
||||||
try:
|
|
||||||
c = self._rsa.contents
|
|
||||||
except ValueError:
|
|
||||||
raise ADEPTError('Error parsing ADEPT user key DER')
|
|
||||||
|
|
||||||
def decrypt(self, from_):
|
def decrypt(self, from_):
|
||||||
rsa = self._rsa
|
rsa = self._rsa
|
||||||
|
@ -41,15 +41,15 @@ def WineGetKeys(scriptpath, extension, wineprefix=""):
|
|||||||
print u"{0} v{1}: Wine subprocess call error: {2}".format(PLUGIN_NAME, PLUGIN_VERSION, e.args[0])
|
print u"{0} v{1}: Wine subprocess call error: {2}".format(PLUGIN_NAME, PLUGIN_VERSION, e.args[0])
|
||||||
if wineprefix != "" and os.path.exists(wineprefix):
|
if wineprefix != "" and os.path.exists(wineprefix):
|
||||||
cmdline = u"WINEPREFIX=\"{2}\" wine C:\\Python27\\python.exe \"{0}\" \"{1}\"".format(scriptpath,outdirpath,wineprefix)
|
cmdline = u"WINEPREFIX=\"{2}\" wine C:\\Python27\\python.exe \"{0}\" \"{1}\"".format(scriptpath,outdirpath,wineprefix)
|
||||||
else:
|
else:
|
||||||
cmdline = u"wine C:\\Python27\\python.exe \"{0}\" \"{1}\"".format(scriptpath,outdirpath)
|
cmdline = u"wine C:\\Python27\\python.exe \"{0}\" \"{1}\"".format(scriptpath,outdirpath)
|
||||||
print u"{0} v{1}: Command line: “{2}”".format(PLUGIN_NAME, PLUGIN_VERSION, cmdline)
|
print u"{0} v{1}: Command line: “{2}”".format(PLUGIN_NAME, PLUGIN_VERSION, cmdline)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
cmdline = cmdline.encode(sys.getfilesystemencoding())
|
cmdline = cmdline.encode(sys.getfilesystemencoding())
|
||||||
p2 = Process(cmdline, shell=True, bufsize=1, stdin=None, stdout=sys.stdout, stderr=STDOUT, close_fds=False)
|
p2 = Process(cmdline, shell=True, bufsize=1, stdin=None, stdout=sys.stdout, stderr=STDOUT, close_fds=False)
|
||||||
result = p2.wait("wait")
|
result = p2.wait("wait")
|
||||||
except Exception, e:
|
except Exception, e:
|
||||||
print u"{0} v{1}: Wine subprocess call error: {2}".format(PLUGIN_NAME, PLUGIN_VERSION, e.args[0])
|
print u"{0} v{1}: Wine subprocess call error: {2}".format(PLUGIN_NAME, PLUGIN_VERSION, e.args[0])
|
||||||
|
|
||||||
# try finding winekeys anyway, even if above code errored
|
# try finding winekeys anyway, even if above code errored
|
||||||
|
@ -20,8 +20,9 @@
|
|||||||
# 6.3.3 - Version bump to match plugin
|
# 6.3.3 - Version bump to match plugin
|
||||||
# 6.3.4 - Version bump to match plugin
|
# 6.3.4 - Version bump to match plugin
|
||||||
# 6.3.5 - Version bump to match plugin
|
# 6.3.5 - Version bump to match plugin
|
||||||
|
# 6.3.6 - Version bump to match plugin
|
||||||
|
|
||||||
__version__ = '6.3.5'
|
__version__ = '6.3.6'
|
||||||
|
|
||||||
import sys
|
import sys
|
||||||
import os, os.path
|
import os, os.path
|
||||||
|
@ -47,6 +47,7 @@ __docformat__ = 'restructuredtext en'
|
|||||||
# 6.3.3 - Bug fix for Kindle for PC support
|
# 6.3.3 - Bug fix for Kindle for PC support
|
||||||
# 6.3.4 - Fixes for Kindle for Android, Linux, and Kobo 3.17
|
# 6.3.4 - Fixes for Kindle for Android, Linux, and Kobo 3.17
|
||||||
# 6.3.5 - Fixes for Linux, and Kobo 3.19 and more logging
|
# 6.3.5 - Fixes for Linux, and Kobo 3.19 and more logging
|
||||||
|
# 6.3.6 - Fixes for ADE ePub and PDF introduced in 6.3.5
|
||||||
|
|
||||||
|
|
||||||
"""
|
"""
|
||||||
@ -54,7 +55,7 @@ Decrypt DRMed ebooks.
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
PLUGIN_NAME = u"DeDRM"
|
PLUGIN_NAME = u"DeDRM"
|
||||||
PLUGIN_VERSION_TUPLE = (6, 3, 5)
|
PLUGIN_VERSION_TUPLE = (6, 3, 6)
|
||||||
PLUGIN_VERSION = u".".join([unicode(str(x)) for x in PLUGIN_VERSION_TUPLE])
|
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.
|
# Include an html helpfile in the plugin's zipfile with the following name.
|
||||||
RESOURCE_NAME = PLUGIN_NAME + '_Help.htm'
|
RESOURCE_NAME = PLUGIN_NAME + '_Help.htm'
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
from __future__ import with_statement
|
from __future__ import with_statement
|
||||||
|
|
||||||
# ineptepub.pyw, version 6.3
|
# ineptepub.pyw, version 6.4
|
||||||
# Copyright © 2009-2010 by i♥cabbages
|
# Copyright © 2009-2010 by i♥cabbages
|
||||||
|
|
||||||
# Released under the terms of the GNU General Public Licence, version 3
|
# Released under the terms of the GNU General Public Licence, version 3
|
||||||
@ -40,13 +40,14 @@ from __future__ import with_statement
|
|||||||
# 6.1 - Work if TkInter is missing
|
# 6.1 - Work if TkInter is missing
|
||||||
# 6.2 - Handle UTF-8 file names inside an ePub, fix by Jose Luis
|
# 6.2 - Handle UTF-8 file names inside an ePub, fix by Jose Luis
|
||||||
# 6.3 - Add additional check on DER file sanity
|
# 6.3 - Add additional check on DER file sanity
|
||||||
|
# 6.4 - Remove erroneous check on DER file sanity
|
||||||
|
|
||||||
"""
|
"""
|
||||||
Decrypt Adobe Digital Editions encrypted ePub books.
|
Decrypt Adobe Digital Editions encrypted ePub books.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
__license__ = 'GPL v3'
|
__license__ = 'GPL v3'
|
||||||
__version__ = "6.3"
|
__version__ = "6.4"
|
||||||
|
|
||||||
import sys
|
import sys
|
||||||
import os
|
import os
|
||||||
@ -174,11 +175,6 @@ def _load_crypto_libcrypto():
|
|||||||
rsa = self._rsa = d2i_RSAPrivateKey(None, pp, len(der))
|
rsa = self._rsa = d2i_RSAPrivateKey(None, pp, len(der))
|
||||||
if rsa is None:
|
if rsa is None:
|
||||||
raise ADEPTError('Error parsing ADEPT user key DER')
|
raise ADEPTError('Error parsing ADEPT user key DER')
|
||||||
# check if pointer is not NULL
|
|
||||||
try:
|
|
||||||
c = self._rsa.contents
|
|
||||||
except ValueError:
|
|
||||||
raise ADEPTError('Error parsing ADEPT user key DER')
|
|
||||||
|
|
||||||
def decrypt(self, from_):
|
def decrypt(self, from_):
|
||||||
rsa = self._rsa
|
rsa = self._rsa
|
||||||
@ -326,7 +322,6 @@ def _load_crypto_pycrypto():
|
|||||||
except ValueError:
|
except ValueError:
|
||||||
raise ADEPTError('Error parsing ADEPT user key DER')
|
raise ADEPTError('Error parsing ADEPT user key DER')
|
||||||
|
|
||||||
|
|
||||||
def bytesToNumber(self, bytes):
|
def bytesToNumber(self, bytes):
|
||||||
total = 0L
|
total = 0L
|
||||||
for byte in bytes:
|
for byte in bytes:
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
from __future__ import with_statement
|
from __future__ import with_statement
|
||||||
|
|
||||||
# ineptpdf.pyw, version 8.0.2
|
# ineptpdf.pyw, version 8.0.3
|
||||||
# Copyright © 2009-2010 by i♥cabbages
|
# Copyright © 2009-2010 by i♥cabbages
|
||||||
|
|
||||||
# Released under the terms of the GNU General Public Licence, version 3
|
# Released under the terms of the GNU General Public Licence, version 3
|
||||||
@ -55,6 +55,7 @@ from __future__ import with_statement
|
|||||||
# 8.0 - Work if TkInter is missing
|
# 8.0 - Work if TkInter is missing
|
||||||
# 8.0.1 - Broken Metadata fix.
|
# 8.0.1 - Broken Metadata fix.
|
||||||
# 8.0.2 - Add additional check on DER file sanity
|
# 8.0.2 - Add additional check on DER file sanity
|
||||||
|
# 8.0.3 - Remove erroneous check on DER file sanity
|
||||||
|
|
||||||
|
|
||||||
"""
|
"""
|
||||||
@ -62,7 +63,7 @@ Decrypts Adobe ADEPT-encrypted PDF files.
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
__license__ = 'GPL v3'
|
__license__ = 'GPL v3'
|
||||||
__version__ = "8.0.2"
|
__version__ = "8.0.3"
|
||||||
|
|
||||||
import sys
|
import sys
|
||||||
import os
|
import os
|
||||||
@ -201,11 +202,6 @@ def _load_crypto_libcrypto():
|
|||||||
rsa = self._rsa = d2i_RSAPrivateKey(None, pp, len(der))
|
rsa = self._rsa = d2i_RSAPrivateKey(None, pp, len(der))
|
||||||
if rsa is None:
|
if rsa is None:
|
||||||
raise ADEPTError('Error parsing ADEPT user key DER')
|
raise ADEPTError('Error parsing ADEPT user key DER')
|
||||||
# check if pointer is not NULL
|
|
||||||
try:
|
|
||||||
c = self._rsa.contents
|
|
||||||
except ValueError:
|
|
||||||
raise ADEPTError('Error parsing ADEPT user key DER')
|
|
||||||
|
|
||||||
def decrypt(self, from_):
|
def decrypt(self, from_):
|
||||||
rsa = self._rsa
|
rsa = self._rsa
|
||||||
|
@ -41,15 +41,15 @@ def WineGetKeys(scriptpath, extension, wineprefix=""):
|
|||||||
print u"{0} v{1}: Wine subprocess call error: {2}".format(PLUGIN_NAME, PLUGIN_VERSION, e.args[0])
|
print u"{0} v{1}: Wine subprocess call error: {2}".format(PLUGIN_NAME, PLUGIN_VERSION, e.args[0])
|
||||||
if wineprefix != "" and os.path.exists(wineprefix):
|
if wineprefix != "" and os.path.exists(wineprefix):
|
||||||
cmdline = u"WINEPREFIX=\"{2}\" wine C:\\Python27\\python.exe \"{0}\" \"{1}\"".format(scriptpath,outdirpath,wineprefix)
|
cmdline = u"WINEPREFIX=\"{2}\" wine C:\\Python27\\python.exe \"{0}\" \"{1}\"".format(scriptpath,outdirpath,wineprefix)
|
||||||
else:
|
else:
|
||||||
cmdline = u"wine C:\\Python27\\python.exe \"{0}\" \"{1}\"".format(scriptpath,outdirpath)
|
cmdline = u"wine C:\\Python27\\python.exe \"{0}\" \"{1}\"".format(scriptpath,outdirpath)
|
||||||
print u"{0} v{1}: Command line: “{2}”".format(PLUGIN_NAME, PLUGIN_VERSION, cmdline)
|
print u"{0} v{1}: Command line: “{2}”".format(PLUGIN_NAME, PLUGIN_VERSION, cmdline)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
cmdline = cmdline.encode(sys.getfilesystemencoding())
|
cmdline = cmdline.encode(sys.getfilesystemencoding())
|
||||||
p2 = Process(cmdline, shell=True, bufsize=1, stdin=None, stdout=sys.stdout, stderr=STDOUT, close_fds=False)
|
p2 = Process(cmdline, shell=True, bufsize=1, stdin=None, stdout=sys.stdout, stderr=STDOUT, close_fds=False)
|
||||||
result = p2.wait("wait")
|
result = p2.wait("wait")
|
||||||
except Exception, e:
|
except Exception, e:
|
||||||
print u"{0} v{1}: Wine subprocess call error: {2}".format(PLUGIN_NAME, PLUGIN_VERSION, e.args[0])
|
print u"{0} v{1}: Wine subprocess call error: {2}".format(PLUGIN_NAME, PLUGIN_VERSION, e.args[0])
|
||||||
|
|
||||||
# try finding winekeys anyway, even if above code errored
|
# try finding winekeys anyway, even if above code errored
|
||||||
|
Binary file not shown.
@ -47,6 +47,7 @@ __docformat__ = 'restructuredtext en'
|
|||||||
# 6.3.3 - Bug fix for Kindle for PC support
|
# 6.3.3 - Bug fix for Kindle for PC support
|
||||||
# 6.3.4 - Fixes for Kindle for Android, Linux, and Kobo 3.17
|
# 6.3.4 - Fixes for Kindle for Android, Linux, and Kobo 3.17
|
||||||
# 6.3.5 - Fixes for Linux, and Kobo 3.19 and more logging
|
# 6.3.5 - Fixes for Linux, and Kobo 3.19 and more logging
|
||||||
|
# 6.3.6 - Fixes for ADE ePub and PDF introduced in 6.3.5
|
||||||
|
|
||||||
|
|
||||||
"""
|
"""
|
||||||
@ -54,7 +55,7 @@ Decrypt DRMed ebooks.
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
PLUGIN_NAME = u"DeDRM"
|
PLUGIN_NAME = u"DeDRM"
|
||||||
PLUGIN_VERSION_TUPLE = (6, 3, 5)
|
PLUGIN_VERSION_TUPLE = (6, 3, 6)
|
||||||
PLUGIN_VERSION = u".".join([unicode(str(x)) for x in PLUGIN_VERSION_TUPLE])
|
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.
|
# Include an html helpfile in the plugin's zipfile with the following name.
|
||||||
RESOURCE_NAME = PLUGIN_NAME + '_Help.htm'
|
RESOURCE_NAME = PLUGIN_NAME + '_Help.htm'
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
from __future__ import with_statement
|
from __future__ import with_statement
|
||||||
|
|
||||||
# ineptepub.pyw, version 6.3
|
# ineptepub.pyw, version 6.4
|
||||||
# Copyright © 2009-2010 by i♥cabbages
|
# Copyright © 2009-2010 by i♥cabbages
|
||||||
|
|
||||||
# Released under the terms of the GNU General Public Licence, version 3
|
# Released under the terms of the GNU General Public Licence, version 3
|
||||||
@ -40,13 +40,14 @@ from __future__ import with_statement
|
|||||||
# 6.1 - Work if TkInter is missing
|
# 6.1 - Work if TkInter is missing
|
||||||
# 6.2 - Handle UTF-8 file names inside an ePub, fix by Jose Luis
|
# 6.2 - Handle UTF-8 file names inside an ePub, fix by Jose Luis
|
||||||
# 6.3 - Add additional check on DER file sanity
|
# 6.3 - Add additional check on DER file sanity
|
||||||
|
# 6.4 - Remove erroneous check on DER file sanity
|
||||||
|
|
||||||
"""
|
"""
|
||||||
Decrypt Adobe Digital Editions encrypted ePub books.
|
Decrypt Adobe Digital Editions encrypted ePub books.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
__license__ = 'GPL v3'
|
__license__ = 'GPL v3'
|
||||||
__version__ = "6.3"
|
__version__ = "6.4"
|
||||||
|
|
||||||
import sys
|
import sys
|
||||||
import os
|
import os
|
||||||
@ -174,11 +175,6 @@ def _load_crypto_libcrypto():
|
|||||||
rsa = self._rsa = d2i_RSAPrivateKey(None, pp, len(der))
|
rsa = self._rsa = d2i_RSAPrivateKey(None, pp, len(der))
|
||||||
if rsa is None:
|
if rsa is None:
|
||||||
raise ADEPTError('Error parsing ADEPT user key DER')
|
raise ADEPTError('Error parsing ADEPT user key DER')
|
||||||
# check if pointer is not NULL
|
|
||||||
try:
|
|
||||||
c = self._rsa.contents
|
|
||||||
except ValueError:
|
|
||||||
raise ADEPTError('Error parsing ADEPT user key DER')
|
|
||||||
|
|
||||||
def decrypt(self, from_):
|
def decrypt(self, from_):
|
||||||
rsa = self._rsa
|
rsa = self._rsa
|
||||||
@ -326,7 +322,6 @@ def _load_crypto_pycrypto():
|
|||||||
except ValueError:
|
except ValueError:
|
||||||
raise ADEPTError('Error parsing ADEPT user key DER')
|
raise ADEPTError('Error parsing ADEPT user key DER')
|
||||||
|
|
||||||
|
|
||||||
def bytesToNumber(self, bytes):
|
def bytesToNumber(self, bytes):
|
||||||
total = 0L
|
total = 0L
|
||||||
for byte in bytes:
|
for byte in bytes:
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
from __future__ import with_statement
|
from __future__ import with_statement
|
||||||
|
|
||||||
# ineptpdf.pyw, version 8.0.2
|
# ineptpdf.pyw, version 8.0.3
|
||||||
# Copyright © 2009-2010 by i♥cabbages
|
# Copyright © 2009-2010 by i♥cabbages
|
||||||
|
|
||||||
# Released under the terms of the GNU General Public Licence, version 3
|
# Released under the terms of the GNU General Public Licence, version 3
|
||||||
@ -55,6 +55,7 @@ from __future__ import with_statement
|
|||||||
# 8.0 - Work if TkInter is missing
|
# 8.0 - Work if TkInter is missing
|
||||||
# 8.0.1 - Broken Metadata fix.
|
# 8.0.1 - Broken Metadata fix.
|
||||||
# 8.0.2 - Add additional check on DER file sanity
|
# 8.0.2 - Add additional check on DER file sanity
|
||||||
|
# 8.0.3 - Remove erroneous check on DER file sanity
|
||||||
|
|
||||||
|
|
||||||
"""
|
"""
|
||||||
@ -62,7 +63,7 @@ Decrypts Adobe ADEPT-encrypted PDF files.
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
__license__ = 'GPL v3'
|
__license__ = 'GPL v3'
|
||||||
__version__ = "8.0.2"
|
__version__ = "8.0.3"
|
||||||
|
|
||||||
import sys
|
import sys
|
||||||
import os
|
import os
|
||||||
@ -201,11 +202,6 @@ def _load_crypto_libcrypto():
|
|||||||
rsa = self._rsa = d2i_RSAPrivateKey(None, pp, len(der))
|
rsa = self._rsa = d2i_RSAPrivateKey(None, pp, len(der))
|
||||||
if rsa is None:
|
if rsa is None:
|
||||||
raise ADEPTError('Error parsing ADEPT user key DER')
|
raise ADEPTError('Error parsing ADEPT user key DER')
|
||||||
# check if pointer is not NULL
|
|
||||||
try:
|
|
||||||
c = self._rsa.contents
|
|
||||||
except ValueError:
|
|
||||||
raise ADEPTError('Error parsing ADEPT user key DER')
|
|
||||||
|
|
||||||
def decrypt(self, from_):
|
def decrypt(self, from_):
|
||||||
rsa = self._rsa
|
rsa = self._rsa
|
||||||
|
@ -41,15 +41,15 @@ def WineGetKeys(scriptpath, extension, wineprefix=""):
|
|||||||
print u"{0} v{1}: Wine subprocess call error: {2}".format(PLUGIN_NAME, PLUGIN_VERSION, e.args[0])
|
print u"{0} v{1}: Wine subprocess call error: {2}".format(PLUGIN_NAME, PLUGIN_VERSION, e.args[0])
|
||||||
if wineprefix != "" and os.path.exists(wineprefix):
|
if wineprefix != "" and os.path.exists(wineprefix):
|
||||||
cmdline = u"WINEPREFIX=\"{2}\" wine C:\\Python27\\python.exe \"{0}\" \"{1}\"".format(scriptpath,outdirpath,wineprefix)
|
cmdline = u"WINEPREFIX=\"{2}\" wine C:\\Python27\\python.exe \"{0}\" \"{1}\"".format(scriptpath,outdirpath,wineprefix)
|
||||||
else:
|
else:
|
||||||
cmdline = u"wine C:\\Python27\\python.exe \"{0}\" \"{1}\"".format(scriptpath,outdirpath)
|
cmdline = u"wine C:\\Python27\\python.exe \"{0}\" \"{1}\"".format(scriptpath,outdirpath)
|
||||||
print u"{0} v{1}: Command line: “{2}”".format(PLUGIN_NAME, PLUGIN_VERSION, cmdline)
|
print u"{0} v{1}: Command line: “{2}”".format(PLUGIN_NAME, PLUGIN_VERSION, cmdline)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
cmdline = cmdline.encode(sys.getfilesystemencoding())
|
cmdline = cmdline.encode(sys.getfilesystemencoding())
|
||||||
p2 = Process(cmdline, shell=True, bufsize=1, stdin=None, stdout=sys.stdout, stderr=STDOUT, close_fds=False)
|
p2 = Process(cmdline, shell=True, bufsize=1, stdin=None, stdout=sys.stdout, stderr=STDOUT, close_fds=False)
|
||||||
result = p2.wait("wait")
|
result = p2.wait("wait")
|
||||||
except Exception, e:
|
except Exception, e:
|
||||||
print u"{0} v{1}: Wine subprocess call error: {2}".format(PLUGIN_NAME, PLUGIN_VERSION, e.args[0])
|
print u"{0} v{1}: Wine subprocess call error: {2}".format(PLUGIN_NAME, PLUGIN_VERSION, e.args[0])
|
||||||
|
|
||||||
# try finding winekeys anyway, even if above code errored
|
# try finding winekeys anyway, even if above code errored
|
||||||
|
Binary file not shown.
@ -19,7 +19,7 @@ except NameError:
|
|||||||
PLUGIN_NAME = 'Obok DeDRM'
|
PLUGIN_NAME = 'Obok DeDRM'
|
||||||
PLUGIN_SAFE_NAME = PLUGIN_NAME.strip().lower().replace(' ', '_')
|
PLUGIN_SAFE_NAME = PLUGIN_NAME.strip().lower().replace(' ', '_')
|
||||||
PLUGIN_DESCRIPTION = _('Removes DRM from Kobo kepubs and adds them to the library.')
|
PLUGIN_DESCRIPTION = _('Removes DRM from Kobo kepubs and adds them to the library.')
|
||||||
PLUGIN_VERSION_TUPLE = (6, 3, 5)
|
PLUGIN_VERSION_TUPLE = (6, 3, 6)
|
||||||
PLUGIN_VERSION = '.'.join([str(x) for x in PLUGIN_VERSION_TUPLE])
|
PLUGIN_VERSION = '.'.join([str(x) for x in PLUGIN_VERSION_TUPLE])
|
||||||
HELPFILE_NAME = PLUGIN_SAFE_NAME + '_Help.htm'
|
HELPFILE_NAME = PLUGIN_SAFE_NAME + '_Help.htm'
|
||||||
PLUGIN_AUTHORS = 'Anon'
|
PLUGIN_AUTHORS = 'Anon'
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
# Version 6.3.5 January 2016
|
# Version 3.2.0 January 2016
|
||||||
# Update for latest version of Windows Desktop app.
|
# Update for latest version of Windows Desktop app.
|
||||||
# Support Kobo devices in the command line version.
|
# Support Kobo devices in the command line version.
|
||||||
#
|
#
|
||||||
|
Loading…
Reference in New Issue
Block a user