Skip to content

Commit

Permalink
Completely remove erroneous check
Browse files Browse the repository at this point in the history
  • Loading branch information
apprenticeharper committed Jan 15, 2016
1 parent ca42e02 commit 8aa2157
Show file tree
Hide file tree
Showing 8 changed files with 19 additions and 43 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

from __future__ import with_statement

# ineptepub.pyw, version 6.4
# ineptepub.pyw, version 6.5
# Copyright © 2009-2010 by i♥cabbages

# Released under the terms of the GNU General Public Licence, version 3
Expand Down Expand Up @@ -41,13 +41,14 @@
# 6.2 - Handle UTF-8 file names inside an ePub, fix by Jose Luis
# 6.3 - Add additional check on DER file sanity
# 6.4 - Remove erroneous check on DER file sanity
# 6.5 - Completely remove erroneous check on DER file sanity

"""
Decrypt Adobe Digital Editions encrypted ePub books.
"""

__license__ = 'GPL v3'
__version__ = "6.4"
__version__ = "6.5"

import sys
import os
Expand Down Expand Up @@ -316,11 +317,6 @@ def __init__(self, der):
key = [key.getChild(x).value for x in xrange(1, 4)]
key = [self.bytesToNumber(v) for v in key]
self._rsa = _RSA.construct(key)
# check if pointer is not NULL
try:
c = self._rsa.contents
except ValueError:
raise ADEPTError('Error parsing ADEPT user key DER')

def bytesToNumber(self, bytes):
total = 0L
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

from __future__ import with_statement

# ineptpdf.pyw, version 8.0.3
# ineptpdf.pyw, version 8.0.4
# Copyright © 2009-2010 by i♥cabbages

# Released under the terms of the GNU General Public Licence, version 3
Expand Down Expand Up @@ -56,14 +56,15 @@
# 8.0.1 - Broken Metadata fix.
# 8.0.2 - Add additional check on DER file sanity
# 8.0.3 - Remove erroneous check on DER file sanity
# 8.0.4 - Completely remove erroneous check on DER file sanity


"""
Decrypts Adobe ADEPT-encrypted PDF files.
"""

__license__ = 'GPL v3'
__version__ = "8.0.3"
__version__ = "8.0.4"

import sys
import os
Expand Down Expand Up @@ -387,11 +388,6 @@ def __init__(self, der):
key = [key.getChild(x).value for x in xrange(1, 4)]
key = [self.bytesToNumber(v) for v in key]
self._rsa = _RSA.construct(key)
# check if pointer is not NULL
try:
c = self._rsa.contents
except ValueError:
raise ADEPTError('Error parsing ADEPT user key DER')

def bytesToNumber(self, bytes):
total = 0L
Expand Down
10 changes: 3 additions & 7 deletions DeDRM_Windows_Application/DeDRM_App/DeDRM_lib/lib/ineptepub.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

from __future__ import with_statement

# ineptepub.pyw, version 6.4
# ineptepub.pyw, version 6.5
# Copyright © 2009-2010 by i♥cabbages

# Released under the terms of the GNU General Public Licence, version 3
Expand Down Expand Up @@ -41,13 +41,14 @@
# 6.2 - Handle UTF-8 file names inside an ePub, fix by Jose Luis
# 6.3 - Add additional check on DER file sanity
# 6.4 - Remove erroneous check on DER file sanity
# 6.5 - Completely remove erroneous check on DER file sanity

"""
Decrypt Adobe Digital Editions encrypted ePub books.
"""

__license__ = 'GPL v3'
__version__ = "6.4"
__version__ = "6.5"

import sys
import os
Expand Down Expand Up @@ -316,11 +317,6 @@ def __init__(self, der):
key = [key.getChild(x).value for x in xrange(1, 4)]
key = [self.bytesToNumber(v) for v in key]
self._rsa = _RSA.construct(key)
# check if pointer is not NULL
try:
c = self._rsa.contents
except ValueError:
raise ADEPTError('Error parsing ADEPT user key DER')

def bytesToNumber(self, bytes):
total = 0L
Expand Down
10 changes: 3 additions & 7 deletions DeDRM_Windows_Application/DeDRM_App/DeDRM_lib/lib/ineptpdf.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

from __future__ import with_statement

# ineptpdf.pyw, version 8.0.3
# ineptpdf.pyw, version 8.0.4
# Copyright © 2009-2010 by i♥cabbages

# Released under the terms of the GNU General Public Licence, version 3
Expand Down Expand Up @@ -56,14 +56,15 @@
# 8.0.1 - Broken Metadata fix.
# 8.0.2 - Add additional check on DER file sanity
# 8.0.3 - Remove erroneous check on DER file sanity
# 8.0.4 - Completely remove erroneous check on DER file sanity


"""
Decrypts Adobe ADEPT-encrypted PDF files.
"""

__license__ = 'GPL v3'
__version__ = "8.0.3"
__version__ = "8.0.4"

import sys
import os
Expand Down Expand Up @@ -387,11 +388,6 @@ def __init__(self, der):
key = [key.getChild(x).value for x in xrange(1, 4)]
key = [self.bytesToNumber(v) for v in key]
self._rsa = _RSA.construct(key)
# check if pointer is not NULL
try:
c = self._rsa.contents
except ValueError:
raise ADEPTError('Error parsing ADEPT user key DER')

def bytesToNumber(self, bytes):
total = 0L
Expand Down
Binary file modified DeDRM_calibre_plugin/DeDRM_plugin.zip
Binary file not shown.
10 changes: 3 additions & 7 deletions DeDRM_calibre_plugin/DeDRM_plugin/ineptepub.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

from __future__ import with_statement

# ineptepub.pyw, version 6.4
# ineptepub.pyw, version 6.5
# Copyright © 2009-2010 by i♥cabbages

# Released under the terms of the GNU General Public Licence, version 3
Expand Down Expand Up @@ -41,13 +41,14 @@
# 6.2 - Handle UTF-8 file names inside an ePub, fix by Jose Luis
# 6.3 - Add additional check on DER file sanity
# 6.4 - Remove erroneous check on DER file sanity
# 6.5 - Completely remove erroneous check on DER file sanity

"""
Decrypt Adobe Digital Editions encrypted ePub books.
"""

__license__ = 'GPL v3'
__version__ = "6.4"
__version__ = "6.5"

import sys
import os
Expand Down Expand Up @@ -316,11 +317,6 @@ def __init__(self, der):
key = [key.getChild(x).value for x in xrange(1, 4)]
key = [self.bytesToNumber(v) for v in key]
self._rsa = _RSA.construct(key)
# check if pointer is not NULL
try:
c = self._rsa.contents
except ValueError:
raise ADEPTError('Error parsing ADEPT user key DER')

def bytesToNumber(self, bytes):
total = 0L
Expand Down
10 changes: 3 additions & 7 deletions DeDRM_calibre_plugin/DeDRM_plugin/ineptpdf.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

from __future__ import with_statement

# ineptpdf.pyw, version 8.0.3
# ineptpdf.pyw, version 8.0.4
# Copyright © 2009-2010 by i♥cabbages

# Released under the terms of the GNU General Public Licence, version 3
Expand Down Expand Up @@ -56,14 +56,15 @@
# 8.0.1 - Broken Metadata fix.
# 8.0.2 - Add additional check on DER file sanity
# 8.0.3 - Remove erroneous check on DER file sanity
# 8.0.4 - Completely remove erroneous check on DER file sanity


"""
Decrypts Adobe ADEPT-encrypted PDF files.
"""

__license__ = 'GPL v3'
__version__ = "8.0.3"
__version__ = "8.0.4"

import sys
import os
Expand Down Expand Up @@ -387,11 +388,6 @@ def __init__(self, der):
key = [key.getChild(x).value for x in xrange(1, 4)]
key = [self.bytesToNumber(v) for v in key]
self._rsa = _RSA.construct(key)
# check if pointer is not NULL
try:
c = self._rsa.contents
except ValueError:
raise ADEPTError('Error parsing ADEPT user key DER')

def bytesToNumber(self, bytes):
total = 0L
Expand Down
2 changes: 1 addition & 1 deletion Other_Tools/Kobo/obok.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-

# Version 6.3.5 January 2016
# Version 3.2.0 January 2016
# Update for latest version of Windows Desktop app.
# Support Kobo devices in the command line version.
#
Expand Down

0 comments on commit 8aa2157

Please sign in to comment.