tools v5.6.2

This commit is contained in:
Apprentice Alf 2013-02-07 10:28:25 +00:00
parent 490ee4e5d8
commit 748bd2d471
13 changed files with 65 additions and 67 deletions

View file

@ -1,4 +1,4 @@
Inept PDF Plugin - ineptpdf_v01.9_plugin.zip
Inept PDF Plugin - ineptpdf_v02.0_plugin.zip
============================================
All credit given to i♥cabbages for the original standalone scripts. I had the much easier job of converting them to a Calibre plugin.
@ -9,7 +9,7 @@ This plugin is meant to decrypt Adobe Digital Edition PDFs that are protected wi
Installation
------------
Do **NOT** select "Get plugins to enhance calibre" as this is reserved for "official" calibre plugins, instead select "Change calibre behavior" to go to Calibre's Preferences page. Under "Advanced" click on the Plugins button. Use the "Load plugin from file" button to select the plugin's zip file (ineptpdf_v01.9_plugin.zip) and click the 'Add' button. Click 'Yes' in the the "Are you sure?" dialog. Click OK in the "Success" dialog.
Do **NOT** select "Get plugins to enhance calibre" as this is reserved for "official" calibre plugins, instead select "Change calibre behavior" to go to Calibre's Preferences page. Under "Advanced" click on the Plugins button. Use the "Load plugin from file" button to select the plugin's zip file (ineptpdf_v02.0_plugin.zip) and click the 'Add' button. Click 'Yes' in the the "Are you sure?" dialog. Click OK in the "Success" dialog.
Customization
@ -54,7 +54,7 @@ Paste the information into a comment at my blog, http://apprenticealf.wordpress.
Linux and Adobe Digital Editions PDFs
--------------------------------------
Here are the instructions for using the tools with ePub books and Adobe Digital Editions on Linux under Wine. (Thank you mclien and Fadel!)
Here are the instructions for using the tools with PDF books and Adobe Digital Editions on Linux under Wine. (Thank you mclien and Fadel!)
1. download the most recent version of wine from winehq.org (1.3.29 in my case)
@ -105,9 +105,9 @@ cd ~/.wine/drive_c/tools_vX.X/Other_Tools/
wine python ineptkey.py (only need once!)
(key will be here: ~/.wine/drive_c/tools_vX.X/Other_Tools/adeptkey.der)
9. Use ADE running under Wine to dowload all of your purchased ePub ebooks
9. Use ADE running under Wine to dowload all of your purchased PDF ebooks
10. install the ineptepub and ineptpdf plugins from the tools as discribed in the readmes.
10. install the ineptpdf plugins from the tools as discribed in the readmes.
11. copy the adeptkey.der into the config dir of calibre (~/.config/calibre in debian). Your ADE books imported to calibre will automatically be freed from DRM.

Binary file not shown.

View file

@ -59,14 +59,15 @@ __license__ = 'GPL v3'
# 0.1.6 - Fix for potential problem with PyCrypto
# 0.1.7 - Fix for potential problem with ADE keys and fix possible output/unicode problem
# 0.1.8 - Fix for code copying error
# 0.1.9 - Major code change to use unaltered ineptepub.py
# 0.1.9 - Major code change to use unaltered ineptpdf.py
# 0.2.0 - Fix erroneous dependency on ineptepub plugin
"""
Decrypts Adobe ADEPT-encrypted PDF files.
"""
PLUGIN_NAME = u"Inept PDF DeDRM"
PLUGIN_VERSION_TUPLE = (0, 1, 9)
PLUGIN_VERSION_TUPLE = (0, 2, 0)
PLUGIN_VERSION = u'.'.join([str(x) for x in PLUGIN_VERSION_TUPLE])
import sys
@ -151,7 +152,7 @@ class IneptPDFDeDRM(FileTypePlugin):
warnings.filterwarnings('ignore', category=FutureWarning)
# ADE key retrieval script included in respective OS folder.
from calibre_plugins.ineptepub.ineptkey import retrieve_keys
from calibre_plugins.ineptpdf.ineptkey import retrieve_keys
try:
keys = retrieve_keys()
for i,key in enumerate(keys):

View file

@ -15,10 +15,10 @@ from __future__ import with_statement
# from <http://www.python.org/download/> and PyCrypto from
# <http://www.voidspace.org.uk/python/modules.shtml#pycrypto> (make sure to
# install the version for Python 2.6). Save this script file as
# ineptepub.pyw and double-click on it to run it.
# ineptpdf.pyw and double-click on it to run it.
#
# Mac OS X users: Save this script file as ineptepub.pyw. You can run this
# program from the command line (pythonw ineptepub.pyw) or by double-clicking
# Mac OS X users: Save this script file as ineptpdf.pyw. You can run this
# program from the command line (pythonw ineptpdf.pyw) or by double-clicking
# it when it has been associated with PythonLauncher.
# Revision history:
@ -49,13 +49,14 @@ from __future__ import with_statement
# 7.10 - Various tweaks to fix minor problems.
# 7.11 - More tweaks to fix minor problems.
# 7.12 - Revised to allow use in calibre plugins to eliminate need for duplicate code
# 7.13 - Fixed erroneous mentions of ineptepub
"""
Decrypts Adobe ADEPT-encrypted PDF files.
"""
__license__ = 'GPL v3'
__version__ = "7.12"
__version__ = "7.13"
import sys
import os
@ -115,7 +116,7 @@ def unicode_argv():
start = argc.value - len(sys.argv)
return [argv[i] for i in
xrange(start, argc.value)]
return [u"ineptepub.py"]
return [u"ineptpdf.py"]
else:
argvencoding = sys.stdin.encoding
if argvencoding == None:

View file

@ -41,7 +41,7 @@ Mac OS X 10.5 and above: You do
\i not
\i0 need to install Python.\
\
Drag the DeDRM application from from tools_v5.6.1\\DeDRM_Applications\\Macintosh (the location of this ReadMe) to your Applications folder, or anywhere else you find convenient.\
Drag the DeDRM application from from tools_v5.6.2\\DeDRM_Applications\\Macintosh (the location of this ReadMe) to your Applications folder, or anywhere else you find convenient.\
\
\

View file

@ -24,17 +24,17 @@
<key>CFBundleExecutable</key>
<string>droplet</string>
<key>CFBundleGetInfoString</key>
<string>DeDRM 5.6.1. AppleScript written 20102013 by Apprentice Alf and others.</string>
<string>DeDRM 5.6.2. AppleScript written 20102013 by Apprentice Alf and others.</string>
<key>CFBundleIconFile</key>
<string>DeDRM</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>DeDRM 5.6.1</string>
<string>DeDRM 5.6.2</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>5.6.1</string>
<string>5.6.2</string>
<key>CFBundleSignature</key>
<string>dplt</string>
<key>LSRequiresCarbon</key>

View file

@ -15,10 +15,10 @@ from __future__ import with_statement
# from <http://www.python.org/download/> and PyCrypto from
# <http://www.voidspace.org.uk/python/modules.shtml#pycrypto> (make sure to
# install the version for Python 2.6). Save this script file as
# ineptepub.pyw and double-click on it to run it.
# ineptpdf.pyw and double-click on it to run it.
#
# Mac OS X users: Save this script file as ineptepub.pyw. You can run this
# program from the command line (pythonw ineptepub.pyw) or by double-clicking
# Mac OS X users: Save this script file as ineptpdf.pyw. You can run this
# program from the command line (pythonw ineptpdf.pyw) or by double-clicking
# it when it has been associated with PythonLauncher.
# Revision history:
@ -49,13 +49,14 @@ from __future__ import with_statement
# 7.10 - Various tweaks to fix minor problems.
# 7.11 - More tweaks to fix minor problems.
# 7.12 - Revised to allow use in calibre plugins to eliminate need for duplicate code
# 7.13 - Fixed erroneous mentions of ineptepub
"""
Decrypts Adobe ADEPT-encrypted PDF files.
"""
__license__ = 'GPL v3'
__version__ = "7.12"
__version__ = "7.13"
import sys
import os
@ -115,7 +116,7 @@ def unicode_argv():
start = argc.value - len(sys.argv)
return [argv[i] for i in
xrange(start, argc.value)]
return [u"ineptepub.py"]
return [u"ineptpdf.py"]
else:
argvencoding = sys.stdin.encoding
if argvencoding == None:

View file

@ -1,4 +1 @@
echo off
set PWD=%~dp0
cd /d %PWD%DeDRM_lib && start /min python DeDRM_app.pyw %*
exit
chcp 65001 > nul && set PWD=%~dp0 && cd /d %~dp0DeDRM_lib && start /min python DeDRM_app.pyw %*

View file

@ -1,7 +1,7 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# DeDRM.pyw, version 5.6.1
# DeDRM.pyw, version 5.6.2
# By some_updates and Apprentice Alf
import sys
@ -10,7 +10,7 @@ sys.path.append(os.path.join(sys.path[0],"lib"))
import sys, os
import codecs
from argv_utils import add_cp65001_codec, set_utf8_default_encoding, utf8_argv
from argv_utils import add_cp65001_codec, set_utf8_default_encoding, unicode_argv
add_cp65001_codec()
set_utf8_default_encoding()
@ -46,7 +46,7 @@ class QueuedUTF8Stream:
def __getattr__(self, attr):
return getattr(self.stream, attr)
__version__ = '5.6.1'
__version__ = '5.6.2'
class DrmException(Exception):
pass
@ -567,7 +567,7 @@ def processPDB(q, infile, outdir, rscpath):
sys.exit(rv)
def main(argv=utf8_argv()):
def main(argv=unicode_argv()):
apphome = os.path.dirname(argv[0])
apphome = os.path.abspath(apphome)

View file

@ -6,12 +6,15 @@ import locale
import codecs
# get sys.argv arguments and encode them into utf-8
def utf8_argv():
def unicode_argv():
if sys.platform.startswith('win'):
# Uses shell32.GetCommandLineArgvW to get sys.argv as a list of Unicode
# strings.
# Versions 2.x of Python don't support Unicode in sys.argv on
# Windows, with the underlying Windows API instead replacing multi-byte
# characters with '?'. So use shell32.GetCommandLineArgvW to get sys.argv
# as a list of Unicode strings and encode them as utf-8
# characters with '?'.
from ctypes import POINTER, byref, cdll, c_int, windll
from ctypes.wintypes import LPCWSTR, LPWSTR
@ -30,23 +33,16 @@ def utf8_argv():
if argc.value > 0:
# Remove Python executable and commands if present
start = argc.value - len(sys.argv)
return [argv[i].encode('utf-8') for i in
return [argv[i] for i in
xrange(start, argc.value)]
# if we don't have any arguments at all, just pass back script name
# this should never happen
return None
return [u"DeDRM.py"]
else:
argv = []
argvencoding = sys.stdin.encoding
if argvencoding == None:
argvencoding = sys.getfilesystemencoding()
if argvencoding == None:
argvencoding = 'utf-8'
for arg in sys.argv:
if type(arg) == unicode:
argv.append(arg.encode('utf-8'))
else:
argv.append(arg.decode(argvencoding).encode('utf-8'))
return argv
argvencoding = "utf-8"
return [arg if (type(arg) == unicode) else unicode(arg,argvencoding) for arg in sys.argv]
def add_cp65001_codec():

View file

@ -15,10 +15,10 @@ from __future__ import with_statement
# from <http://www.python.org/download/> and PyCrypto from
# <http://www.voidspace.org.uk/python/modules.shtml#pycrypto> (make sure to
# install the version for Python 2.6). Save this script file as
# ineptepub.pyw and double-click on it to run it.
# ineptpdf.pyw and double-click on it to run it.
#
# Mac OS X users: Save this script file as ineptepub.pyw. You can run this
# program from the command line (pythonw ineptepub.pyw) or by double-clicking
# Mac OS X users: Save this script file as ineptpdf.pyw. You can run this
# program from the command line (pythonw ineptpdf.pyw) or by double-clicking
# it when it has been associated with PythonLauncher.
# Revision history:
@ -49,13 +49,14 @@ from __future__ import with_statement
# 7.10 - Various tweaks to fix minor problems.
# 7.11 - More tweaks to fix minor problems.
# 7.12 - Revised to allow use in calibre plugins to eliminate need for duplicate code
# 7.13 - Fixed erroneous mentions of ineptepub
"""
Decrypts Adobe ADEPT-encrypted PDF files.
"""
__license__ = 'GPL v3'
__version__ = "7.12"
__version__ = "7.13"
import sys
import os
@ -115,7 +116,7 @@ def unicode_argv():
start = argc.value - len(sys.argv)
return [argv[i] for i in
xrange(start, argc.value)]
return [u"ineptepub.py"]
return [u"ineptpdf.py"]
else:
argvencoding = sys.stdin.encoding
if argvencoding == None:

View file

@ -1,7 +1,7 @@
ReadMe_DeDRM_v5.6_WinApp
ReadMe_DeDRM_v5.6.2_WinApp
========================
DeDRM_v5.6_WinApp is a pure python drag and drop application that allows users to drag and drop ebooks or folders of ebooks onto the DeDRM_Drop_Target to have the DRM removed. It repackages all the "tools" python software in one easy to use program that remembers preferences and settings.
DeDRM_v5.6.2_WinApp is a pure python drag and drop application that allows users to drag and drop ebooks or folders of ebooks onto the DeDRM_Drop_Target to have the DRM removed. It repackages all the "tools" python software in one easy to use program that remembers preferences and settings.
It will work without manual configuration for Kindle for PC ebooks and Adobe Adept epub and pdf ebooks.
@ -16,16 +16,16 @@ Once these preferences have been set, the user can simply drag and drop ebooks o
This program requires that a 32 bit version of Python 2.X (tested with Python 2.5 through Python 2.7) and PyCrypto be installed on your computer before it will work. See below for where to get theese programs for Windows.
NB Although the individual scripts have been updated to work with unicode file names, the Windows DeDRM script has not yet been updated for technical reasons. Therefore, if you try to use it with paths or file names that contain non-ASCII characters, it might not work.
As from version 5.6.2, the DeDRM application should work correctly with file names containing non-ASCII characters.
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_5.6 folder from tools_v5.6/DeDRM_Applications/Windows to your "My Documents" folder.
1. Drag the DeDRM_5.6.2 folder from tools_v5.6.2/DeDRM_Applications/Windows to your "My Documents" folder.
2. Open the DeDRM_5.6 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.
2. Open the DeDRM_5.6.2 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.
3. To set the preferences simply double-click on your just created short-cut.

View file

@ -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 v5.6 archive.
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 v5.6.2 archive.
The is archive includes tools to remove DRM from:
@ -51,7 +51,7 @@ DeDRM application for Mac OS X users: (Mac OS X 10.4 and above)
----------------------------------------------------------------------
This application combines all the tools into one easy-to-use tool for Mac OS X users.
Drag the "DeDRM 5.6.app" application from the DeDRM_Applications/Macintosh folder to your Desktop (or your Applications Folder, or anywhere else you find convenient). Double-click on the application to run it and it will guide you through collecting the data it needs to remove the DRM from any of the kinds of DRMed ebook listed in the first section of this ReadMe.
Drag the "DeDRM 5.6.2.app" application from the DeDRM_Applications/Macintosh folder to your Desktop (or your Applications Folder, or anywhere else you find convenient). Double-click on the application to run it and it will guide you through collecting the data it needs to remove the DRM from any of the kinds of DRMed ebook listed in the first section of this ReadMe.
To use the DeDRM application, simply drag ebooks, or folders containing ebooks, onto the DeDRM application and it will remove the DRM of the kinds listed above.
@ -67,7 +67,7 @@ DeDRM application for Windows users: (Windows XP through Windows 8)
This application combines all the tools into one easy-to-use tool for Windows users.
Drag the DeDRM_5.6 folder that's in the DeDRM_Applications/Windows folder, to your "My Documents" folder (or anywhere else you find convenient). Make a short-cut on your Desktop of the DeDRM_Drop_Target.bat file that's in the DeDRM_5.6 folder. Double-click on the shortcut and the DeDRM application will run and guide you through collecting the data it needs to remove the DRM from any of the kinds of DRMed ebook listed in the first section of this ReadMe.
Drag the DeDRM_5.6.2 folder that's in the DeDRM_Applications/Windows folder, to your "My Documents" folder (or anywhere else you find convenient). Make a short-cut on your Desktop of the DeDRM_Drop_Target.bat file that's in the DeDRM_5.6.2 folder. Double-click on the shortcut and the DeDRM application will run and guide you through collecting the data it needs to remove the DRM from any of the kinds of DRMed ebook listed in the first section of this ReadMe.
To use the DeDRM application, simply drag ebooks, or folders containing ebooks, onto the DeDRM_Drop_Target.bat shortcut and it will remove the DRM of the kinds listed above.
@ -132,20 +132,21 @@ Once Windows users have installed Python 2.X for 32 bits, and the matching OpenS
Apple's iBooks FairPlay DRM
---------------------------
The only tool that removed Apple's iBooks Fairplay DRM was Requiem by Brahms version 3.3.x. Requiem is NOT included in this tools package. It is under active development because Apple constantly updates its DRM scheme to stop Requiem from working.
The latest version that worked was 3.3.5 and worked with iTunes 10.5 and above. Requiem 4.0 and later do not remove DRM from ebooks.
The only tool that removes Apple's iBooks Fairplay DRM is Requiem by Brahms version 3.3.6 and works with iTunes 10.5. Requiem 4.0 and later do not remove DRM from ebooks.
Requiem has a Tor website: http://tag3ulp55xczs3pn.onion. To reach the site using Tor, you will need to install Tor (http://www.torproject.org). If you're willing to sacrifice your anonymity, you can use the regular web with tor2web. Just go to http://tag3ulp55xczs3pn.tor2web.com.
Alternatively, you can download the 3.3.5 version from the following locationss:
Alternatively, you can download it from these download links:
Requiem Windows application: http://www.datafilehost.com/download-b015485b.html
MD5: 954f9ecf42635fae77afbc3a24489004
Requiem 3.3.6 for Windows: http://www.datafilehost.com/download-f7916922.html
MD5: 10ab191f2d86c692d57f6a07b4622cf8
Requiem Mac OS X application: http://www.datafilehost.com/download-50608ba6.html
MD5: 4e7dc46ad7e0b54bea6182c5ad024ffe
Requiem 3.3.6 for Mac OS X: http://www.datafilehost.com/download-47fce8b7.html
MD5: 6d4167d47e6982ddbb8528212198b520
Requiem source code: http://www.datafilehost.com/download-af8f91a1.html
MD5: e175560590a154859c0344e30870ac73
Requiem 3.3.6 source code: http://www.datafilehost.com/download-172920e9.html
MD5: 1636862796d573c693d56bcc526b60bd
If you have any problems with Requiem, I suggest you contact Brahms directly through their Tor website.
No support for requiem is provided at Apprentice Alf's blog.