08-22-2009, 01:05 PM | #1 |
Zealot
Posts: 138
Karma: 372
Join Date: Apr 2008
Location: New York, NY
Device: Sony PRS-600, Nook Color, iPad
|
ePub & PDF decryption on Mac OSX
I did a test today to see if this is possible, and I was very pleased with the results. I've looked around and I haven't seen anyone post about this, so I thought I would mention it in case there are other Mac users who need to do this. You won't need to install python (it's already there) but you will need to install PyCrypto. Here are the steps:
Prerequisites: A Windows PC A Mac PC inept[epub|pdf] on each platform, with PyCrypto installed Adobe Digital editions on each platform, authorized to your email address 1. From the Windows PC (It can be a virtual machine) setup Adobe DE, and extract the 'adeptkey.der' using ineptkey.pyw. I tested this with the current version and 'ineptkey_v3.pyw'. 2. Copy the key to your Mac, into your 'Documents' folder. 3. Rename the '*.pyw' files to '*.py'. 4. Double-click the python script, it will create an applet. Open the applet and use the key from your Windows box. I've tested using 'ineptepub_v2'. From this point, it's exactly like using the inept tools under windows. The only thing missing on a Mac is the key extraction. This will let you buy ePub books from stores like Sony and use it on your PRS500. - Ed |
08-23-2009, 11:01 AM | #2 |
Exwyzeeologist
Posts: 535
Karma: 3261
Join Date: Jun 2009
Device: :PRS-505::iPod touch:
|
Thanks for getting me to revisit this. I took a few stabs at it before, but didn't get very far. I installed the pycrypto modules on OS X (had to install the developer tools first, natch), and I can get the ineptepub.py script to run, but I have to do it from the command line ('python ineptepub.py'). For some reason I can't get it to simply be a clickable applet/script. I've fiddled with the settings in the Python Launcher, but no go. Did you change any of the settings there, or did it all just work right once you had the necessary components? It seems to work fine once I get it launched, but getting it launched is a minor nuisance (better than firing up the VM, though). Again, thanks for the tips!
|
Advert | |
|
08-23-2009, 11:20 AM | #3 |
Exwyzeeologist
Posts: 535
Karma: 3261
Join Date: Jun 2009
Device: :PRS-505::iPod touch:
|
I take that back. Everything isn't working fine after I decrypt. For some reason, after unzipping all the files come out with 000 permissions on all of them. Easy enough to fix, but it's still one more thing that needs to be done. Are you running into this, edembowski?
|
08-23-2009, 06:11 PM | #4 |
Enthusiast
Posts: 35
Karma: 483720
Join Date: Aug 2009
Device: none
|
You can run shell scripts by double clicking them by using the .command extension.
Make sure that the first line of the script points to the proper interpreter. e.g. for python on the Mac it would look like: #!/usr/bin/python Then change the extension (for a gui'd python it would probably be .pyw) to .command. Run chmod +x mypythonscript.command just to make sure it's executable. Now you should be able to run it by double clicking. Dragging and dropping files on the icon are a wee bit more complicated, and might require the use of an applescript. |
08-23-2009, 06:58 PM | #5 |
Zealot
Posts: 138
Karma: 372
Join Date: Apr 2008
Location: New York, NY
Device: Sony PRS-600, Nook Color, iPad
|
@Abecedary
After unzipping them, you may have to fix the permissions from the command line, I didn't have that problem. You can always `chmod rwx`the file. The shebang is probably correct on it already, it's easy to put there. (the shebang is the first line adullday pointed out starting with #!) @adullday I usually change the extension to .py, not .command. It avoids a few problems: - If you change it to .py, you don't need to worry about the execute bit being set. - If you use .command, it will launch in a terminal window. - It will not create an applet package. Both methods certainly work, I just think using .py is easier for non-unix types. - Ed |
Advert | |
|
08-23-2009, 08:46 PM | #6 | |
K3, K4B, KDX, KFHD, PW1&2
Posts: 704
Karma: 3000002
Join Date: Jun 2009
Location: USA
Device: K3, K4B, KDX3G, KFHD, PW1, PW2
|
Quote:
|
|
08-23-2009, 09:51 PM | #7 |
Enthusiast
Posts: 35
Karma: 483720
Join Date: Aug 2009
Device: none
|
|
08-24-2009, 09:39 AM | #8 |
Fanatic
Posts: 597
Karma: 430
Join Date: Aug 2008
Location: Ellesmere Port, UK
Device: DR1000S Sony PRS505 iPad iPhone
|
Hmm,
I can't seem to get pycrypto to install & because I have Windows in a VM environment, the .py or .pyw always tries to start windows. I can't get it to stop the latter and I don't quite see why pycrypto doesn't install. It gets upset with something called gcc. Still, it'l give me something to play with. It took a while to get it working on the VM machine. Howard |
08-24-2009, 10:10 AM | #9 |
Enthusiast
Posts: 35
Karma: 483720
Join Date: Aug 2009
Device: none
|
What's the error message you're getting when you try to build the package?
And... you've probably tried this already... but if you open up the info window in the Finder for the .py and .pyw files, what comes up as the default application? (I'm guessing here.... I'm an avid VMware user on Linux and Windows, but my Mac is a powerbook so I'm not familiar with the workings of MacIntel virtualization.) |
08-24-2009, 10:11 AM | #10 |
Enthusiast
Posts: 35
Karma: 483720
Join Date: Aug 2009
Device: none
|
Hey pthwaite... just a thought.... have you installed the Developer Tools from your MacOS X dvd's?
|
08-24-2009, 10:20 AM | #11 |
Exwyzeeologist
Posts: 535
Karma: 3261
Join Date: Jun 2009
Device: :PRS-505::iPod touch:
|
Yep, first step before installing pycrypto is to install the OS X Developer Tools off the DVD. After doing that, pycrypto builds and installs just fine. I was able to change some of the preferences for Python Launcher to get the ineptepub.py file to launch with a double-click (but it now has a white console window behind the ineptepub GUI). Still, it's working! I'm sure I'll sort out the few minor issues with time.
|
08-24-2009, 02:16 PM | #12 |
Fanatic
Posts: 597
Karma: 430
Join Date: Aug 2008
Location: Ellesmere Port, UK
Device: DR1000S Sony PRS505 iPad iPhone
|
Adullday et al,
Thanks, I've just installed the tools so we shall see what happens now. WRT the .py association, yes its the VM Windows one. However I have modified that to the MAC Python launcher but am unsure as to whether that is the right one. |
08-24-2009, 02:37 PM | #13 |
Fanatic
Posts: 597
Karma: 430
Join Date: Aug 2008
Location: Ellesmere Port, UK
Device: DR1000S Sony PRS505 iPad iPhone
|
Okay, minor update.
Tools installed. I think the pycrypto has now installed, the test programme doesn't appear to leave any errors. Now I still have my file association issue. The launcher does indeed open the terminal which I then have to drop all the bits into to get it to run. Irritating really as before I involved windows it used to work quite happily but I cannot seem to get the Mac python to just run the flipping script. Ah, to coin a phrase, "Peace and love everyone". DRM goes fizz. Now if only I can get the script to associate properly Last edited by pthwaite; 08-24-2009 at 03:02 PM. Reason: Proved it works :) |
08-24-2009, 04:10 PM | #14 |
K3, K4B, KDX, KFHD, PW1&2
Posts: 704
Karma: 3000002
Join Date: Jun 2009
Location: USA
Device: K3, K4B, KDX3G, KFHD, PW1, PW2
|
Do you have to have Windows?
Since Pycrypto looks like .exe only on the install website, does this mean I can't use it? I have a Windows computer, and a Mac computer. I do not have Windows on my Mac. Does this mean I can't do this?
|
08-24-2009, 04:46 PM | #15 | |
Resident Curmudgeon
Posts: 77,503
Karma: 140318952
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
http://tmrc.mit.edu/mirror/twisted/D....5_osx10.5.pkg PyCrypto 2.0.1 for OS X 10.5 Try either one of those. |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
If a pdf won't epub, try this (on a Mac) | Paulc15 | Kobo Reader | 6 | 05-09-2010 11:16 PM |
Sony ereader & Mac OSX | brockman | Introduce Yourself | 10 | 07-24-2009 04:37 PM |
How to use iLiad with Mac OsX? | jasem200 | iRex | 6 | 08-17-2008 11:48 AM |
Help with HandStory & Mac OSX! | daught | Reading and Management | 7 | 01-22-2004 01:44 PM |
Mac OSX vs Windows XP | Alexander Turcic | Lounge | 5 | 06-05-2003 02:30 PM |