]> xmof Git - DeDRM.git/commitdiff
MobiDeDRM 0.09 and AppleScript
authorApprentice Alf <apprenticealf@gmail.com>
Wed, 7 Jan 2009 10:45:21 +0000 (10:45 +0000)
committerApprentice Alf <apprenticealf@gmail.com>
Sat, 28 Feb 2015 10:46:39 +0000 (10:46 +0000)
Kindle_Mobi_Tools/lib/mobidedrm.py
Macintosh_Applications/Mobipocket Unlocker.app/Contents/Info.plist
Macintosh_Applications/Mobipocket Unlocker.app/Contents/Resources/MobiDeDRM.py
Macintosh_Applications/Mobipocket Unlocker.app/Contents/Resources/Scripts/main.scpt
Macintosh_Applications/Mobipocket Unlocker.app/Contents/Resources/Scripts/main.scpt.txt
Macintosh_Applications/Mobipocket Unlocker.app/Contents/Resources/description.rtfd/TXT.rtf
Macintosh_Applications/Mobipocket Unlocker.app/Contents/Resources/droplet.rsrc

index 707545ce4dca742e9efe08d8c838129f59d5c2c5..1f02cf93f8fad24d8b269e5cb8e6288cf412ce90 100644 (file)
@@ -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:"
index 3b2dedddcd8b1bba5c2b5daf3bf865d632c5e143..bea9496e06f96158d228b8d96d858dc21c096b37 100644 (file)
@@ -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>
index 707545ce4dca742e9efe08d8c838129f59d5c2c5..1f02cf93f8fad24d8b269e5cb8e6288cf412ce90 100644 (file)
@@ -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:"
index 72c8be4cdd2df365af35be4f312e689f3458adc6..f781afc5a116ee1ec7034b73c86b529fadbced63 100644 (file)
Binary files a/Macintosh_Applications/Mobipocket Unlocker.app/Contents/Resources/Scripts/main.scpt and b/Macintosh_Applications/Mobipocket Unlocker.app/Contents/Resources/Scripts/main.scpt differ
index b4f777eae84c39d0bc47de008e2102951ca8f7df..4b3883bd8985ef0f4fcb5ad189391c4fa7142495 100644 (file)
@@ -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
index 19b353516e879a0b7d7888d4907fa338638d4455..0f8be61c4ef5a03538444534b5d6fddd1d0162af 100644 (file)
@@ -1,4 +1,4 @@
-{\rtf1\ansi\ansicpg1252\cocoartf949\cocoasubrtf330
+{\rtf1\ansi\ansicpg1252\cocoartf949\cocoasubrtf540
 {\fonttbl}
 {\colortbl;\red255\green255\blue255;}
 }
\ No newline at end of file
index 18bcf1616a3af063a4eff9bfb6ef681bc84cb0dd..7de74fad68b8a9aa4683c00f88c0b28b677e73e8 100644 (file)
Binary files a/Macintosh_Applications/Mobipocket Unlocker.app/Contents/Resources/droplet.rsrc and b/Macintosh_Applications/Mobipocket Unlocker.app/Contents/Resources/droplet.rsrc differ