mirror of
https://github.com/noDRM/DeDRM_tools.git
synced 2026-03-27 23:38:55 +00:00
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
cd2d74601a | ||
|
|
51919284ca |
Binary file not shown.
@@ -24,9 +24,11 @@
|
|||||||
<key>CFBundleExecutable</key>
|
<key>CFBundleExecutable</key>
|
||||||
<string>droplet</string>
|
<string>droplet</string>
|
||||||
<key>CFBundleGetInfoString</key>
|
<key>CFBundleGetInfoString</key>
|
||||||
<string>DeDRM AppleScript 6.0.2. Written 2010–2013 by Apprentice Alf and others.</string>
|
<string>DeDRM AppleScript 6.0.4. Written 2010–2013 by Apprentice Alf and others.</string>
|
||||||
<key>CFBundleIconFile</key>
|
<key>CFBundleIconFile</key>
|
||||||
<string>DeDRM</string>
|
<string>DeDRM</string>
|
||||||
|
<key>CFBundleIdentifier</key>
|
||||||
|
<string>com.apple.ScriptEditor.id.707CCCD5-0C6C-4BEB-B67C-B6E866ADE85A</string>
|
||||||
<key>CFBundleInfoDictionaryVersion</key>
|
<key>CFBundleInfoDictionaryVersion</key>
|
||||||
<string>6.0</string>
|
<string>6.0</string>
|
||||||
<key>CFBundleName</key>
|
<key>CFBundleName</key>
|
||||||
@@ -34,7 +36,7 @@
|
|||||||
<key>CFBundlePackageType</key>
|
<key>CFBundlePackageType</key>
|
||||||
<string>APPL</string>
|
<string>APPL</string>
|
||||||
<key>CFBundleShortVersionString</key>
|
<key>CFBundleShortVersionString</key>
|
||||||
<string>6.0.2</string>
|
<string>6.0.4</string>
|
||||||
<key>CFBundleSignature</key>
|
<key>CFBundleSignature</key>
|
||||||
<string>dplt</string>
|
<string>dplt</string>
|
||||||
<key>LSRequiresCarbon</key>
|
<key>LSRequiresCarbon</key>
|
||||||
@@ -48,9 +50,9 @@
|
|||||||
<key>name</key>
|
<key>name</key>
|
||||||
<string>ScriptWindowState</string>
|
<string>ScriptWindowState</string>
|
||||||
<key>positionOfDivider</key>
|
<key>positionOfDivider</key>
|
||||||
<real>0</real>
|
<real>0.0</real>
|
||||||
<key>savedFrame</key>
|
<key>savedFrame</key>
|
||||||
<string>1616 -35 765 818 1440 -180 1920 1080 </string>
|
<string>85 100 1002 753 0 0 1440 878 </string>
|
||||||
<key>selectedTabView</key>
|
<key>selectedTabView</key>
|
||||||
<string>event log</string>
|
<string>event log</string>
|
||||||
</dict>
|
</dict>
|
||||||
|
|||||||
Binary file not shown.
@@ -1,4 +1,4 @@
|
|||||||
{\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf340
|
{\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf370
|
||||||
{\fonttbl}
|
{\fonttbl}
|
||||||
{\colortbl;\red255\green255\blue255;}
|
{\colortbl;\red255\green255\blue255;}
|
||||||
}
|
}
|
||||||
@@ -54,8 +54,9 @@ from __future__ import with_statement
|
|||||||
# 5.0 - Extraction of info from Kindle for PC/Mac moved into kindlekey.py
|
# 5.0 - Extraction of info from Kindle for PC/Mac moved into kindlekey.py
|
||||||
# - tweaked GetDecryptedBook interface to leave passed parameters unchanged
|
# - tweaked GetDecryptedBook interface to leave passed parameters unchanged
|
||||||
# 5.1 - moved unicode_argv call inside main for Windows DeDRM compatibility
|
# 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
|
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__)
|
print u"K4MobiDeDrm v{0}.\nCopyright © 2008-2013 The Dark Reverser et al.".format(__version__)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
opts, args = getopt.getopt(sys.argv[1:], "k:p:s:")
|
opts, args = getopt.getopt(argv[1:], "k:p:s:")
|
||||||
except getopt.GetoptError, err:
|
except getopt.GetoptError, err:
|
||||||
print u"Error in options or arguments: {0}".format(err.args[0])
|
print u"Error in options or arguments: {0}".format(err.args[0])
|
||||||
usage(progname)
|
usage(progname)
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ from __future__ import with_statement
|
|||||||
# 1.5 - moved unicode_argv call inside main for Windows DeDRM compatibility
|
# 1.5 - moved unicode_argv call inside main for Windows DeDRM compatibility
|
||||||
# 1.6 - Fixed a problem getting the disk serial numbers
|
# 1.6 - Fixed a problem getting the disk serial numbers
|
||||||
# 1.7 - Work if TkInter is missing
|
# 1.7 - Work if TkInter is missing
|
||||||
|
# 1.8 - Fixes for Kindle for Mac, and non-ascii in Windows user names
|
||||||
|
|
||||||
|
|
||||||
"""
|
"""
|
||||||
@@ -25,7 +26,7 @@ Retrieve Kindle for PC/Mac user key.
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
__license__ = 'GPL v3'
|
__license__ = 'GPL v3'
|
||||||
__version__ = '1.7'
|
__version__ = '1.8'
|
||||||
|
|
||||||
import sys, os, re
|
import sys, os, re
|
||||||
from struct import pack, unpack, unpack_from
|
from struct import pack, unpack, unpack_from
|
||||||
@@ -1142,7 +1143,7 @@ if iswindows:
|
|||||||
DB[keyname] = cleartext
|
DB[keyname] = cleartext
|
||||||
|
|
||||||
if 'MazamaRandomNumber' in DB and 'kindle.account.tokens' in DB:
|
if 'MazamaRandomNumber' in DB and 'kindle.account.tokens' in DB:
|
||||||
print u"Decrypted key file using IDString '{0:s}' and UserName '{1:s}'".format(GetIDString(), GetUserName())
|
print u"Decrypted key file using IDString '{0:s}' and UserName '{1:s}'".format(GetIDString(), GetUserName().decode("latin-1"))
|
||||||
# store values used in decryption
|
# store values used in decryption
|
||||||
DB['IDString'] = GetIDString()
|
DB['IDString'] = GetIDString()
|
||||||
DB['UserName'] = GetUserName()
|
DB['UserName'] = GetUserName()
|
||||||
@@ -1521,20 +1522,32 @@ elif isosx:
|
|||||||
kInfoFiles.append(testpath)
|
kInfoFiles.append(testpath)
|
||||||
print('Found k4Mac kinf2011 file: ' + testpath)
|
print('Found k4Mac kinf2011 file: ' + testpath)
|
||||||
found = True
|
found = True
|
||||||
# check for .kinf2011 files
|
# check for .kinf2011 files from 1.10
|
||||||
testpath = home + '/Library/Application Support/Kindle/storage/.kinf2011'
|
testpath = home + '/Library/Application Support/Kindle/storage/.kinf2011'
|
||||||
if os.path.isfile(testpath):
|
if os.path.isfile(testpath):
|
||||||
kInfoFiles.append(testpath)
|
kInfoFiles.append(testpath)
|
||||||
print('Found k4Mac kinf2011 file: ' + testpath)
|
print('Found k4Mac kinf2011 file: ' + testpath)
|
||||||
found = True
|
found = True
|
||||||
# check for .rainier-2.1.1-kinf files
|
# check for .rainier-2.1.1-kinf files from 1.6
|
||||||
testpath = home + '/Library/Application Support/Kindle/storage/.rainier-2.1.1-kinf'
|
testpath = home + '/Library/Application Support/Kindle/storage/.rainier-2.1.1-kinf'
|
||||||
if os.path.isfile(testpath):
|
if os.path.isfile(testpath):
|
||||||
kInfoFiles.append(testpath)
|
kInfoFiles.append(testpath)
|
||||||
print('Found k4Mac rainier file: ' + testpath)
|
print('Found k4Mac rainier file: ' + testpath)
|
||||||
found = True
|
found = True
|
||||||
# check for .kindle-info files
|
# check for .kindle-info files from 1.4
|
||||||
testpath = home + '/Library/Application Support/Kindle/storage/.kindle-info'
|
testpath = home + '/Library/Application Support/Kindle/storage/.kindle-info'
|
||||||
|
if os.path.isfile(testpath):
|
||||||
|
kInfoFiles.append(testpath)
|
||||||
|
print('Found k4Mac kindle-info file: ' + testpath)
|
||||||
|
found = True
|
||||||
|
# check for .kindle-info file from 1.2.2
|
||||||
|
testpath = home + '/Library/Application Support/Amazon/Kindle/storage/.kindle-info'
|
||||||
|
if os.path.isfile(testpath):
|
||||||
|
kInfoFiles.append(testpath)
|
||||||
|
print('Found k4Mac kindle-info file: ' + testpath)
|
||||||
|
found = True
|
||||||
|
# check for .kindle-info file from 1.0 beta 1 (27214)
|
||||||
|
testpath = home + '/Library/Application Support/Amazon/Kindle for Mac/storage/.kindle-info'
|
||||||
if os.path.isfile(testpath):
|
if os.path.isfile(testpath):
|
||||||
kInfoFiles.append(testpath)
|
kInfoFiles.append(testpath)
|
||||||
print('Found k4Mac kindle-info file: ' + testpath)
|
print('Found k4Mac kindle-info file: ' + testpath)
|
||||||
|
|||||||
@@ -68,9 +68,10 @@
|
|||||||
# 0.38 - Unicode used wherever possible, cope with absent alfcrypto
|
# 0.38 - Unicode used wherever possible, cope with absent alfcrypto
|
||||||
# 0.39 - Fixed problem with TEXtREAd and getBookType interface
|
# 0.39 - Fixed problem with TEXtREAd and getBookType interface
|
||||||
# 0.40 - moved unicode_argv call inside main for Windows DeDRM compatibility
|
# 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 sys
|
||||||
import os
|
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"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"Removes protection from Kindle/Mobipocket, Kindle/KF8 and Kindle/Print Replica ebooks"
|
||||||
print u"Usage:"
|
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
|
return 1
|
||||||
else:
|
else:
|
||||||
infile = argv[1]
|
infile = argv[1]
|
||||||
|
|||||||
@@ -6,8 +6,9 @@
|
|||||||
|
|
||||||
# Changelog
|
# Changelog
|
||||||
# 4.9 - moved unicode_argv call inside main for Windows DeDRM compatibility
|
# 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 sys
|
||||||
import os, csv, getopt
|
import os, csv, getopt
|
||||||
@@ -451,7 +452,7 @@ def cli_main():
|
|||||||
print u"TopazExtract v{0}.".format(__version__)
|
print u"TopazExtract v{0}.".format(__version__)
|
||||||
|
|
||||||
try:
|
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:
|
except getopt.GetoptError, err:
|
||||||
print u"Error in options or arguments: {0}".format(err.args[0])
|
print u"Error in options or arguments: {0}".format(err.args[0])
|
||||||
usage(progname)
|
usage(progname)
|
||||||
|
|||||||
@@ -7,9 +7,11 @@
|
|||||||
# Revision history:
|
# Revision history:
|
||||||
# 6.0.0 - Release along with unified plugin
|
# 6.0.0 - Release along with unified plugin
|
||||||
# 6.0.1 - Bug Fixes for Windows App
|
# 6.0.1 - Bug Fixes for Windows App
|
||||||
# 6.0.2 - Changes only in the plugin so far
|
# 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.2'
|
__version__ = '6.0.4'
|
||||||
|
|
||||||
import sys
|
import sys
|
||||||
import os, os.path
|
import os, os.path
|
||||||
|
|||||||
@@ -54,8 +54,9 @@ from __future__ import with_statement
|
|||||||
# 5.0 - Extraction of info from Kindle for PC/Mac moved into kindlekey.py
|
# 5.0 - Extraction of info from Kindle for PC/Mac moved into kindlekey.py
|
||||||
# - tweaked GetDecryptedBook interface to leave passed parameters unchanged
|
# - tweaked GetDecryptedBook interface to leave passed parameters unchanged
|
||||||
# 5.1 - moved unicode_argv call inside main for Windows DeDRM compatibility
|
# 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
|
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__)
|
print u"K4MobiDeDrm v{0}.\nCopyright © 2008-2013 The Dark Reverser et al.".format(__version__)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
opts, args = getopt.getopt(sys.argv[1:], "k:p:s:")
|
opts, args = getopt.getopt(argv[1:], "k:p:s:")
|
||||||
except getopt.GetoptError, err:
|
except getopt.GetoptError, err:
|
||||||
print u"Error in options or arguments: {0}".format(err.args[0])
|
print u"Error in options or arguments: {0}".format(err.args[0])
|
||||||
usage(progname)
|
usage(progname)
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ from __future__ import with_statement
|
|||||||
# 1.5 - moved unicode_argv call inside main for Windows DeDRM compatibility
|
# 1.5 - moved unicode_argv call inside main for Windows DeDRM compatibility
|
||||||
# 1.6 - Fixed a problem getting the disk serial numbers
|
# 1.6 - Fixed a problem getting the disk serial numbers
|
||||||
# 1.7 - Work if TkInter is missing
|
# 1.7 - Work if TkInter is missing
|
||||||
|
# 1.8 - Fixes for Kindle for Mac, and non-ascii in Windows user names
|
||||||
|
|
||||||
|
|
||||||
"""
|
"""
|
||||||
@@ -25,7 +26,7 @@ Retrieve Kindle for PC/Mac user key.
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
__license__ = 'GPL v3'
|
__license__ = 'GPL v3'
|
||||||
__version__ = '1.7'
|
__version__ = '1.8'
|
||||||
|
|
||||||
import sys, os, re
|
import sys, os, re
|
||||||
from struct import pack, unpack, unpack_from
|
from struct import pack, unpack, unpack_from
|
||||||
@@ -1142,7 +1143,7 @@ if iswindows:
|
|||||||
DB[keyname] = cleartext
|
DB[keyname] = cleartext
|
||||||
|
|
||||||
if 'MazamaRandomNumber' in DB and 'kindle.account.tokens' in DB:
|
if 'MazamaRandomNumber' in DB and 'kindle.account.tokens' in DB:
|
||||||
print u"Decrypted key file using IDString '{0:s}' and UserName '{1:s}'".format(GetIDString(), GetUserName())
|
print u"Decrypted key file using IDString '{0:s}' and UserName '{1:s}'".format(GetIDString(), GetUserName().decode("latin-1"))
|
||||||
# store values used in decryption
|
# store values used in decryption
|
||||||
DB['IDString'] = GetIDString()
|
DB['IDString'] = GetIDString()
|
||||||
DB['UserName'] = GetUserName()
|
DB['UserName'] = GetUserName()
|
||||||
@@ -1521,20 +1522,32 @@ elif isosx:
|
|||||||
kInfoFiles.append(testpath)
|
kInfoFiles.append(testpath)
|
||||||
print('Found k4Mac kinf2011 file: ' + testpath)
|
print('Found k4Mac kinf2011 file: ' + testpath)
|
||||||
found = True
|
found = True
|
||||||
# check for .kinf2011 files
|
# check for .kinf2011 files from 1.10
|
||||||
testpath = home + '/Library/Application Support/Kindle/storage/.kinf2011'
|
testpath = home + '/Library/Application Support/Kindle/storage/.kinf2011'
|
||||||
if os.path.isfile(testpath):
|
if os.path.isfile(testpath):
|
||||||
kInfoFiles.append(testpath)
|
kInfoFiles.append(testpath)
|
||||||
print('Found k4Mac kinf2011 file: ' + testpath)
|
print('Found k4Mac kinf2011 file: ' + testpath)
|
||||||
found = True
|
found = True
|
||||||
# check for .rainier-2.1.1-kinf files
|
# check for .rainier-2.1.1-kinf files from 1.6
|
||||||
testpath = home + '/Library/Application Support/Kindle/storage/.rainier-2.1.1-kinf'
|
testpath = home + '/Library/Application Support/Kindle/storage/.rainier-2.1.1-kinf'
|
||||||
if os.path.isfile(testpath):
|
if os.path.isfile(testpath):
|
||||||
kInfoFiles.append(testpath)
|
kInfoFiles.append(testpath)
|
||||||
print('Found k4Mac rainier file: ' + testpath)
|
print('Found k4Mac rainier file: ' + testpath)
|
||||||
found = True
|
found = True
|
||||||
# check for .kindle-info files
|
# check for .kindle-info files from 1.4
|
||||||
testpath = home + '/Library/Application Support/Kindle/storage/.kindle-info'
|
testpath = home + '/Library/Application Support/Kindle/storage/.kindle-info'
|
||||||
|
if os.path.isfile(testpath):
|
||||||
|
kInfoFiles.append(testpath)
|
||||||
|
print('Found k4Mac kindle-info file: ' + testpath)
|
||||||
|
found = True
|
||||||
|
# check for .kindle-info file from 1.2.2
|
||||||
|
testpath = home + '/Library/Application Support/Amazon/Kindle/storage/.kindle-info'
|
||||||
|
if os.path.isfile(testpath):
|
||||||
|
kInfoFiles.append(testpath)
|
||||||
|
print('Found k4Mac kindle-info file: ' + testpath)
|
||||||
|
found = True
|
||||||
|
# check for .kindle-info file from 1.0 beta 1 (27214)
|
||||||
|
testpath = home + '/Library/Application Support/Amazon/Kindle for Mac/storage/.kindle-info'
|
||||||
if os.path.isfile(testpath):
|
if os.path.isfile(testpath):
|
||||||
kInfoFiles.append(testpath)
|
kInfoFiles.append(testpath)
|
||||||
print('Found k4Mac kindle-info file: ' + testpath)
|
print('Found k4Mac kindle-info file: ' + testpath)
|
||||||
|
|||||||
@@ -68,9 +68,10 @@
|
|||||||
# 0.38 - Unicode used wherever possible, cope with absent alfcrypto
|
# 0.38 - Unicode used wherever possible, cope with absent alfcrypto
|
||||||
# 0.39 - Fixed problem with TEXtREAd and getBookType interface
|
# 0.39 - Fixed problem with TEXtREAd and getBookType interface
|
||||||
# 0.40 - moved unicode_argv call inside main for Windows DeDRM compatibility
|
# 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 sys
|
||||||
import os
|
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"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"Removes protection from Kindle/Mobipocket, Kindle/KF8 and Kindle/Print Replica ebooks"
|
||||||
print u"Usage:"
|
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
|
return 1
|
||||||
else:
|
else:
|
||||||
infile = argv[1]
|
infile = argv[1]
|
||||||
|
|||||||
@@ -6,8 +6,9 @@
|
|||||||
|
|
||||||
# Changelog
|
# Changelog
|
||||||
# 4.9 - moved unicode_argv call inside main for Windows DeDRM compatibility
|
# 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 sys
|
||||||
import os, csv, getopt
|
import os, csv, getopt
|
||||||
@@ -451,7 +452,7 @@ def cli_main():
|
|||||||
print u"TopazExtract v{0}.".format(__version__)
|
print u"TopazExtract v{0}.".format(__version__)
|
||||||
|
|
||||||
try:
|
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:
|
except getopt.GetoptError, err:
|
||||||
print u"Error in options or arguments: {0}".format(err.args[0])
|
print u"Error in options or arguments: {0}".format(err.args[0])
|
||||||
usage(progname)
|
usage(progname)
|
||||||
|
|||||||
Binary file not shown.
@@ -27,14 +27,17 @@ __docformat__ = 'restructuredtext en'
|
|||||||
# Revision history:
|
# Revision history:
|
||||||
# 6.0.0 - Initial release
|
# 6.0.0 - Initial release
|
||||||
# 6.0.1 - Bug Fixes for Windows App, Kindle for Mac and Windows Adobe Digital Editions
|
# 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
|
# 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.
|
Decrypt DRMed ebooks.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
PLUGIN_NAME = u"DeDRM"
|
PLUGIN_NAME = u"DeDRM"
|
||||||
PLUGIN_VERSION_TUPLE = (6, 0, 2)
|
PLUGIN_VERSION_TUPLE = (6, 0, 4)
|
||||||
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'
|
||||||
@@ -426,7 +429,7 @@ class DeDRM(FileTypePlugin):
|
|||||||
import calibre_plugins.dedrm.prefs as prefs
|
import calibre_plugins.dedrm.prefs as prefs
|
||||||
import calibre_plugins.dedrm.erdr2pml
|
import calibre_plugins.dedrm.erdr2pml
|
||||||
|
|
||||||
dedrmrefs = prefs.DeDRM_Prefs()
|
dedrmprefs = prefs.DeDRM_Prefs()
|
||||||
# Attempt to decrypt epub with each encryption key (generated or provided).
|
# Attempt to decrypt epub with each encryption key (generated or provided).
|
||||||
for keyname, userkey in dedrmprefs['ereaderkeys'].items():
|
for keyname, userkey in dedrmprefs['ereaderkeys'].items():
|
||||||
keyname_masked = u"".join((u'X' if (x.isdigit()) else x) for x in keyname)
|
keyname_masked = u"".join((u'X' if (x.isdigit()) else x) for x in keyname)
|
||||||
|
|||||||
@@ -54,8 +54,9 @@ from __future__ import with_statement
|
|||||||
# 5.0 - Extraction of info from Kindle for PC/Mac moved into kindlekey.py
|
# 5.0 - Extraction of info from Kindle for PC/Mac moved into kindlekey.py
|
||||||
# - tweaked GetDecryptedBook interface to leave passed parameters unchanged
|
# - tweaked GetDecryptedBook interface to leave passed parameters unchanged
|
||||||
# 5.1 - moved unicode_argv call inside main for Windows DeDRM compatibility
|
# 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
|
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__)
|
print u"K4MobiDeDrm v{0}.\nCopyright © 2008-2013 The Dark Reverser et al.".format(__version__)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
opts, args = getopt.getopt(sys.argv[1:], "k:p:s:")
|
opts, args = getopt.getopt(argv[1:], "k:p:s:")
|
||||||
except getopt.GetoptError, err:
|
except getopt.GetoptError, err:
|
||||||
print u"Error in options or arguments: {0}".format(err.args[0])
|
print u"Error in options or arguments: {0}".format(err.args[0])
|
||||||
usage(progname)
|
usage(progname)
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ from __future__ import with_statement
|
|||||||
# 1.5 - moved unicode_argv call inside main for Windows DeDRM compatibility
|
# 1.5 - moved unicode_argv call inside main for Windows DeDRM compatibility
|
||||||
# 1.6 - Fixed a problem getting the disk serial numbers
|
# 1.6 - Fixed a problem getting the disk serial numbers
|
||||||
# 1.7 - Work if TkInter is missing
|
# 1.7 - Work if TkInter is missing
|
||||||
|
# 1.8 - Fixes for Kindle for Mac, and non-ascii in Windows user names
|
||||||
|
|
||||||
|
|
||||||
"""
|
"""
|
||||||
@@ -25,7 +26,7 @@ Retrieve Kindle for PC/Mac user key.
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
__license__ = 'GPL v3'
|
__license__ = 'GPL v3'
|
||||||
__version__ = '1.7'
|
__version__ = '1.8'
|
||||||
|
|
||||||
import sys, os, re
|
import sys, os, re
|
||||||
from struct import pack, unpack, unpack_from
|
from struct import pack, unpack, unpack_from
|
||||||
@@ -1142,7 +1143,7 @@ if iswindows:
|
|||||||
DB[keyname] = cleartext
|
DB[keyname] = cleartext
|
||||||
|
|
||||||
if 'MazamaRandomNumber' in DB and 'kindle.account.tokens' in DB:
|
if 'MazamaRandomNumber' in DB and 'kindle.account.tokens' in DB:
|
||||||
print u"Decrypted key file using IDString '{0:s}' and UserName '{1:s}'".format(GetIDString(), GetUserName())
|
print u"Decrypted key file using IDString '{0:s}' and UserName '{1:s}'".format(GetIDString(), GetUserName().decode("latin-1"))
|
||||||
# store values used in decryption
|
# store values used in decryption
|
||||||
DB['IDString'] = GetIDString()
|
DB['IDString'] = GetIDString()
|
||||||
DB['UserName'] = GetUserName()
|
DB['UserName'] = GetUserName()
|
||||||
@@ -1521,20 +1522,32 @@ elif isosx:
|
|||||||
kInfoFiles.append(testpath)
|
kInfoFiles.append(testpath)
|
||||||
print('Found k4Mac kinf2011 file: ' + testpath)
|
print('Found k4Mac kinf2011 file: ' + testpath)
|
||||||
found = True
|
found = True
|
||||||
# check for .kinf2011 files
|
# check for .kinf2011 files from 1.10
|
||||||
testpath = home + '/Library/Application Support/Kindle/storage/.kinf2011'
|
testpath = home + '/Library/Application Support/Kindle/storage/.kinf2011'
|
||||||
if os.path.isfile(testpath):
|
if os.path.isfile(testpath):
|
||||||
kInfoFiles.append(testpath)
|
kInfoFiles.append(testpath)
|
||||||
print('Found k4Mac kinf2011 file: ' + testpath)
|
print('Found k4Mac kinf2011 file: ' + testpath)
|
||||||
found = True
|
found = True
|
||||||
# check for .rainier-2.1.1-kinf files
|
# check for .rainier-2.1.1-kinf files from 1.6
|
||||||
testpath = home + '/Library/Application Support/Kindle/storage/.rainier-2.1.1-kinf'
|
testpath = home + '/Library/Application Support/Kindle/storage/.rainier-2.1.1-kinf'
|
||||||
if os.path.isfile(testpath):
|
if os.path.isfile(testpath):
|
||||||
kInfoFiles.append(testpath)
|
kInfoFiles.append(testpath)
|
||||||
print('Found k4Mac rainier file: ' + testpath)
|
print('Found k4Mac rainier file: ' + testpath)
|
||||||
found = True
|
found = True
|
||||||
# check for .kindle-info files
|
# check for .kindle-info files from 1.4
|
||||||
testpath = home + '/Library/Application Support/Kindle/storage/.kindle-info'
|
testpath = home + '/Library/Application Support/Kindle/storage/.kindle-info'
|
||||||
|
if os.path.isfile(testpath):
|
||||||
|
kInfoFiles.append(testpath)
|
||||||
|
print('Found k4Mac kindle-info file: ' + testpath)
|
||||||
|
found = True
|
||||||
|
# check for .kindle-info file from 1.2.2
|
||||||
|
testpath = home + '/Library/Application Support/Amazon/Kindle/storage/.kindle-info'
|
||||||
|
if os.path.isfile(testpath):
|
||||||
|
kInfoFiles.append(testpath)
|
||||||
|
print('Found k4Mac kindle-info file: ' + testpath)
|
||||||
|
found = True
|
||||||
|
# check for .kindle-info file from 1.0 beta 1 (27214)
|
||||||
|
testpath = home + '/Library/Application Support/Amazon/Kindle for Mac/storage/.kindle-info'
|
||||||
if os.path.isfile(testpath):
|
if os.path.isfile(testpath):
|
||||||
kInfoFiles.append(testpath)
|
kInfoFiles.append(testpath)
|
||||||
print('Found k4Mac kindle-info file: ' + testpath)
|
print('Found k4Mac kindle-info file: ' + testpath)
|
||||||
|
|||||||
@@ -68,9 +68,10 @@
|
|||||||
# 0.38 - Unicode used wherever possible, cope with absent alfcrypto
|
# 0.38 - Unicode used wherever possible, cope with absent alfcrypto
|
||||||
# 0.39 - Fixed problem with TEXtREAd and getBookType interface
|
# 0.39 - Fixed problem with TEXtREAd and getBookType interface
|
||||||
# 0.40 - moved unicode_argv call inside main for Windows DeDRM compatibility
|
# 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 sys
|
||||||
import os
|
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"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"Removes protection from Kindle/Mobipocket, Kindle/KF8 and Kindle/Print Replica ebooks"
|
||||||
print u"Usage:"
|
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
|
return 1
|
||||||
else:
|
else:
|
||||||
infile = argv[1]
|
infile = argv[1]
|
||||||
|
|||||||
@@ -231,21 +231,20 @@ def convertprefs(always = False):
|
|||||||
dedrmprefs.addnamedvaluetoprefs('bandnkeys', name, value)
|
dedrmprefs.addnamedvaluetoprefs('bandnkeys', name, value)
|
||||||
addedkeycount = len(dedrmprefs['bandnkeys'])-priorkeycount
|
addedkeycount = len(dedrmprefs['bandnkeys'])-priorkeycount
|
||||||
if addedkeycount > 0:
|
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
|
# Make the json write all the prefs to disk
|
||||||
dedrmprefs.writeprefs(False)
|
dedrmprefs.writeprefs(False)
|
||||||
|
|
||||||
# get any .der files in the config dir
|
# get any .der files in the config dir
|
||||||
priorkeycount = len(dedrmprefs['adeptkeys'])
|
priorkeycount = len(dedrmprefs['adeptkeys'])
|
||||||
adeptfilekeys = getConfigFiles('.der','hex')
|
adeptfilekeys = getConfigFiles('.der','hex')
|
||||||
ineptcount = addConfigFiles('.der', 'adeptkeys')
|
|
||||||
for keypair in adeptfilekeys:
|
for keypair in adeptfilekeys:
|
||||||
name = keypair[0]
|
name = keypair[0]
|
||||||
value = keypair[1]
|
value = keypair[1]
|
||||||
dedrmprefs.addnamedvaluetoprefs('adeptkeys', name, value)
|
dedrmprefs.addnamedvaluetoprefs('adeptkeys', name, value)
|
||||||
addedkeycount = len(dedrmprefs['adeptkeys'])-priorkeycount
|
addedkeycount = len(dedrmprefs['adeptkeys'])-priorkeycount
|
||||||
if addedkeycount > 0:
|
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
|
# Make the json write all the prefs to disk
|
||||||
dedrmprefs.writeprefs(False)
|
dedrmprefs.writeprefs(False)
|
||||||
|
|
||||||
@@ -280,7 +279,7 @@ def convertprefs(always = False):
|
|||||||
if addedserialcount > 0:
|
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")
|
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:
|
try:
|
||||||
if kindleprefs['wineprefix'] != "":
|
if 'wineprefix' in kindleprefs and kindleprefs['wineprefix'] != "":
|
||||||
dedrmprefs.set('adobewineprefix',kindleprefs['wineprefix'])
|
dedrmprefs.set('adobewineprefix',kindleprefs['wineprefix'])
|
||||||
dedrmprefs.set('kindlewineprefix',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'])
|
print u"{0} v{1}: WINEPREFIX ‘(2)’ imported from Kindle plugin preferences".format(PLUGIN_NAME, PLUGIN_VERSION, kindleprefs['wineprefix'])
|
||||||
|
|||||||
@@ -6,8 +6,9 @@
|
|||||||
|
|
||||||
# Changelog
|
# Changelog
|
||||||
# 4.9 - moved unicode_argv call inside main for Windows DeDRM compatibility
|
# 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 sys
|
||||||
import os, csv, getopt
|
import os, csv, getopt
|
||||||
@@ -451,7 +452,7 @@ def cli_main():
|
|||||||
print u"TopazExtract v{0}.".format(__version__)
|
print u"TopazExtract v{0}.".format(__version__)
|
||||||
|
|
||||||
try:
|
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:
|
except getopt.GetoptError, err:
|
||||||
print u"Error in options or arguments: {0}".format(err.args[0])
|
print u"Error in options or arguments: {0}".format(err.args[0])
|
||||||
usage(progname)
|
usage(progname)
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ from __future__ import with_statement
|
|||||||
# 1.5 - moved unicode_argv call inside main for Windows DeDRM compatibility
|
# 1.5 - moved unicode_argv call inside main for Windows DeDRM compatibility
|
||||||
# 1.6 - Fixed a problem getting the disk serial numbers
|
# 1.6 - Fixed a problem getting the disk serial numbers
|
||||||
# 1.7 - Work if TkInter is missing
|
# 1.7 - Work if TkInter is missing
|
||||||
|
# 1.8 - Fixes for Kindle for Mac, and non-ascii in Windows user names
|
||||||
|
|
||||||
|
|
||||||
"""
|
"""
|
||||||
@@ -25,7 +26,7 @@ Retrieve Kindle for PC/Mac user key.
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
__license__ = 'GPL v3'
|
__license__ = 'GPL v3'
|
||||||
__version__ = '1.7'
|
__version__ = '1.8'
|
||||||
|
|
||||||
import sys, os, re
|
import sys, os, re
|
||||||
from struct import pack, unpack, unpack_from
|
from struct import pack, unpack, unpack_from
|
||||||
@@ -1142,7 +1143,7 @@ if iswindows:
|
|||||||
DB[keyname] = cleartext
|
DB[keyname] = cleartext
|
||||||
|
|
||||||
if 'MazamaRandomNumber' in DB and 'kindle.account.tokens' in DB:
|
if 'MazamaRandomNumber' in DB and 'kindle.account.tokens' in DB:
|
||||||
print u"Decrypted key file using IDString '{0:s}' and UserName '{1:s}'".format(GetIDString(), GetUserName())
|
print u"Decrypted key file using IDString '{0:s}' and UserName '{1:s}'".format(GetIDString(), GetUserName().decode("latin-1"))
|
||||||
# store values used in decryption
|
# store values used in decryption
|
||||||
DB['IDString'] = GetIDString()
|
DB['IDString'] = GetIDString()
|
||||||
DB['UserName'] = GetUserName()
|
DB['UserName'] = GetUserName()
|
||||||
@@ -1521,20 +1522,32 @@ elif isosx:
|
|||||||
kInfoFiles.append(testpath)
|
kInfoFiles.append(testpath)
|
||||||
print('Found k4Mac kinf2011 file: ' + testpath)
|
print('Found k4Mac kinf2011 file: ' + testpath)
|
||||||
found = True
|
found = True
|
||||||
# check for .kinf2011 files
|
# check for .kinf2011 files from 1.10
|
||||||
testpath = home + '/Library/Application Support/Kindle/storage/.kinf2011'
|
testpath = home + '/Library/Application Support/Kindle/storage/.kinf2011'
|
||||||
if os.path.isfile(testpath):
|
if os.path.isfile(testpath):
|
||||||
kInfoFiles.append(testpath)
|
kInfoFiles.append(testpath)
|
||||||
print('Found k4Mac kinf2011 file: ' + testpath)
|
print('Found k4Mac kinf2011 file: ' + testpath)
|
||||||
found = True
|
found = True
|
||||||
# check for .rainier-2.1.1-kinf files
|
# check for .rainier-2.1.1-kinf files from 1.6
|
||||||
testpath = home + '/Library/Application Support/Kindle/storage/.rainier-2.1.1-kinf'
|
testpath = home + '/Library/Application Support/Kindle/storage/.rainier-2.1.1-kinf'
|
||||||
if os.path.isfile(testpath):
|
if os.path.isfile(testpath):
|
||||||
kInfoFiles.append(testpath)
|
kInfoFiles.append(testpath)
|
||||||
print('Found k4Mac rainier file: ' + testpath)
|
print('Found k4Mac rainier file: ' + testpath)
|
||||||
found = True
|
found = True
|
||||||
# check for .kindle-info files
|
# check for .kindle-info files from 1.4
|
||||||
testpath = home + '/Library/Application Support/Kindle/storage/.kindle-info'
|
testpath = home + '/Library/Application Support/Kindle/storage/.kindle-info'
|
||||||
|
if os.path.isfile(testpath):
|
||||||
|
kInfoFiles.append(testpath)
|
||||||
|
print('Found k4Mac kindle-info file: ' + testpath)
|
||||||
|
found = True
|
||||||
|
# check for .kindle-info file from 1.2.2
|
||||||
|
testpath = home + '/Library/Application Support/Amazon/Kindle/storage/.kindle-info'
|
||||||
|
if os.path.isfile(testpath):
|
||||||
|
kInfoFiles.append(testpath)
|
||||||
|
print('Found k4Mac kindle-info file: ' + testpath)
|
||||||
|
found = True
|
||||||
|
# check for .kindle-info file from 1.0 beta 1 (27214)
|
||||||
|
testpath = home + '/Library/Application Support/Amazon/Kindle for Mac/storage/.kindle-info'
|
||||||
if os.path.isfile(testpath):
|
if os.path.isfile(testpath):
|
||||||
kInfoFiles.append(testpath)
|
kInfoFiles.append(testpath)
|
||||||
print('Found k4Mac kindle-info file: ' + testpath)
|
print('Found k4Mac kindle-info file: ' + testpath)
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
Welcome to the tools!
|
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.2 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:
|
The is archive includes tools to remove DRM from:
|
||||||
|
|
||||||
@@ -85,6 +85,9 @@ A Javascript to enable a download button at the B&N website for ebooks that norm
|
|||||||
Scuolabook_DRM
|
Scuolabook_DRM
|
||||||
A windows-only application (including source code) for removing DRM from ScuolaBooks PDFs, created by "Hex" and included with permission.
|
A windows-only application (including source code) for removing DRM from ScuolaBooks PDFs, created by "Hex" and included with permission.
|
||||||
|
|
||||||
|
Rocket_ebooks
|
||||||
|
Information about the now-obsolete Rocket ebook format and DRM, along with source for a tool to remove the DRM.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user