mirror of
https://github.com/noDRM/DeDRM_tools.git
synced 2024-12-25 10:44:35 +06:00
MobiDeDRM 0.09 and AppleScript
This commit is contained in:
parent
d35dd536c7
commit
16fbfcdba9
@ -20,6 +20,7 @@
|
||||
# 0.06 - And that low bit does mean something after all :-)
|
||||
# 0.07 - The extra data flags aren't present in MOBI header < 0xE8 in size
|
||||
# 0.08 - ...and also not in Mobi header version < 6
|
||||
# 0.09 - ...but they are there with Mobi header version 6, header size 0xE4!
|
||||
|
||||
import sys,struct,binascii
|
||||
|
||||
@ -157,7 +158,7 @@ class DrmStripper:
|
||||
extra_data_flags = 0
|
||||
print "MOBI header length = %d" %mobi_length
|
||||
print "MOBI header version = %d" %mobi_version
|
||||
if (mobi_length >= 0xE8) and (mobi_version > 5):
|
||||
if (mobi_length >= 0xE4) and (mobi_version > 5):
|
||||
extra_data_flags, = struct.unpack('>H', sect[0xF2:0xF4])
|
||||
print "Extra Data Flags = %d" %extra_data_flags
|
||||
|
||||
@ -205,7 +206,7 @@ if not __name__ == "__main__":
|
||||
description = 'Removes DRM from secure Mobi files'
|
||||
supported_platforms = ['linux', 'osx', 'windows'] # Platforms this plugin will run on
|
||||
author = 'The Dark Reverser' # The author of this plugin
|
||||
version = (0, 0, 8) # The version number of this plugin
|
||||
version = (0, 0, 9) # The version number of this plugin
|
||||
file_types = set(['prc','mobi','azw']) # The file types that this plugin will be applied to
|
||||
on_import = True # Run this plugin during the import
|
||||
|
||||
@ -232,7 +233,7 @@ if not __name__ == "__main__":
|
||||
return 'Enter PID (separate multiple PIDs with comma)'
|
||||
|
||||
if __name__ == "__main__":
|
||||
print "MobiDeDrm v0.08. Copyright (c) 2008 The Dark Reverser"
|
||||
print "MobiDeDrm v0.09. Copyright (c) 2008 The Dark Reverser"
|
||||
if len(sys.argv)<4:
|
||||
print "Removes protection from Mobipocket books"
|
||||
print "Usage:"
|
||||
|
@ -28,7 +28,7 @@
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>Mobipocket Unlocker 4</string>
|
||||
<string>Mobipocket Unlocker 9</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleSignature</key>
|
||||
@ -40,9 +40,9 @@
|
||||
<key>name</key>
|
||||
<string>ScriptWindowState</string>
|
||||
<key>positionOfDivider</key>
|
||||
<real>435</real>
|
||||
<real>422</real>
|
||||
<key>savedFrame</key>
|
||||
<string>53 78 661 691 0 0 1280 778 </string>
|
||||
<string>91 171 1059 678 0 0 1440 878 </string>
|
||||
<key>selectedTabView</key>
|
||||
<string>result</string>
|
||||
</dict>
|
||||
|
@ -20,6 +20,7 @@
|
||||
# 0.06 - And that low bit does mean something after all :-)
|
||||
# 0.07 - The extra data flags aren't present in MOBI header < 0xE8 in size
|
||||
# 0.08 - ...and also not in Mobi header version < 6
|
||||
# 0.09 - ...but they are there with Mobi header version 6, header size 0xE4!
|
||||
|
||||
import sys,struct,binascii
|
||||
|
||||
@ -157,7 +158,7 @@ class DrmStripper:
|
||||
extra_data_flags = 0
|
||||
print "MOBI header length = %d" %mobi_length
|
||||
print "MOBI header version = %d" %mobi_version
|
||||
if (mobi_length >= 0xE8) and (mobi_version > 5):
|
||||
if (mobi_length >= 0xE4) and (mobi_version > 5):
|
||||
extra_data_flags, = struct.unpack('>H', sect[0xF2:0xF4])
|
||||
print "Extra Data Flags = %d" %extra_data_flags
|
||||
|
||||
@ -205,7 +206,7 @@ if not __name__ == "__main__":
|
||||
description = 'Removes DRM from secure Mobi files'
|
||||
supported_platforms = ['linux', 'osx', 'windows'] # Platforms this plugin will run on
|
||||
author = 'The Dark Reverser' # The author of this plugin
|
||||
version = (0, 0, 8) # The version number of this plugin
|
||||
version = (0, 0, 9) # The version number of this plugin
|
||||
file_types = set(['prc','mobi','azw']) # The file types that this plugin will be applied to
|
||||
on_import = True # Run this plugin during the import
|
||||
|
||||
@ -232,7 +233,7 @@ if not __name__ == "__main__":
|
||||
return 'Enter PID (separate multiple PIDs with comma)'
|
||||
|
||||
if __name__ == "__main__":
|
||||
print "MobiDeDrm v0.08. Copyright (c) 2008 The Dark Reverser"
|
||||
print "MobiDeDrm v0.09. Copyright (c) 2008 The Dark Reverser"
|
||||
if len(sys.argv)<4:
|
||||
print "Removes protection from Mobipocket books"
|
||||
print "Usage:"
|
||||
|
Binary file not shown.
@ -1,10 +1,12 @@
|
||||
on unlockfile(encryptedFile, MobiDeDRMPath, encryptionKey)
|
||||
set encryptedFilePath to POSIX path of file encryptedFile
|
||||
-- display dialog "filepath " & encryptedFilePath buttons {"OK"} default button 1 giving up after 10
|
||||
tell application "Finder" to Â
|
||||
set parent_folder to (container of file encryptedFile) as text
|
||||
tell application "Finder" to set fileName to (name of file encryptedFile) as text
|
||||
set unlockedFilePath to POSIX path of file (parent_folder & "Unlocked_" & fileName)
|
||||
set shellcommand to "python \"" & MobiDeDRMPath & "\" \"" & encryptedFilePath & "\" \"" & unlockedFilePath & "\" '" & encryptionKey & "'"
|
||||
set shellcommand to "python '" & MobiDeDRMPath & "' '" & encryptedFilePath & "' '" & unlockedFilePath & "' '" & encryptionKey & "'"
|
||||
-- display dialog "shellcommand: " & shellcommand buttons {"OK"} default button 1 giving up after 10
|
||||
try
|
||||
--with timeout of 5 seconds
|
||||
-- display dialog "About to Unlock " & fileName buttons {"Unlock"} default button 1 giving up after 1
|
||||
|
@ -1,4 +1,4 @@
|
||||
{\rtf1\ansi\ansicpg1252\cocoartf949\cocoasubrtf330
|
||||
{\rtf1\ansi\ansicpg1252\cocoartf949\cocoasubrtf540
|
||||
{\fonttbl}
|
||||
{\colortbl;\red255\green255\blue255;}
|
||||
}
|
Binary file not shown.
Before Width: | Height: | Size: 362 B After Width: | Height: | Size: 336 B |
Loading…
Reference in New Issue
Block a user