View Single Post
Old 07-07-2008, 12:19 PM   #100
SeaWolf
Connoisseur
SeaWolf has read every ebook posted at MobileReadSeaWolf has read every ebook posted at MobileReadSeaWolf has read every ebook posted at MobileReadSeaWolf has read every ebook posted at MobileReadSeaWolf has read every ebook posted at MobileReadSeaWolf has read every ebook posted at MobileReadSeaWolf has read every ebook posted at MobileReadSeaWolf has read every ebook posted at MobileReadSeaWolf has read every ebook posted at MobileReadSeaWolf has read every ebook posted at MobileReadSeaWolf has read every ebook posted at MobileRead
 
SeaWolf's Avatar
 
Posts: 63
Karma: 65091
Join Date: Jul 2008
Location: Sydney, Australia
Device: Kindle Paperwhite WiFi
After a bit of fiddling around, I've been trying to get mobidedrm to work. I've taken the .02 script and made the tweaks described in post #76, but when I go to run it I hit a brick wall.
Code:
./MobiDeDRM.py:49: FutureWarning: hex/oct constants > sys.maxint will return positive values in Python 2.4 and up
  crc = (~binascii.crc32(s,-1))&0xFFFFFFFF
MobiDeDrm v0.02. Copyright (c) 2008 The Dark Reverser
Traceback (most recent call last):
  File "./MobiDeDRM.py", line 178, in ?
    file(outfile, 'wb').write(DrmStripper(data_file, pid).getResult())
  File "./MobiDeDRM.py", line 146, in __init__
    found_key = self.parseDRM(sect[drm_ptr:drm_ptr+drm_size], drm_count, pid)
  File "./MobiDeDRM.py", line 103, in parseDRM
    pid = pid.ljust(16,'\0')
TypeError: ljust() takes exactly 1 argument (2 given)
I don't know Python at all so I'm hoping someone here with a better idea than me can explain why the seemingly totally broken line 103 works for everyone else, but not for me. From the error it seems like a fundamental, fatal flaw in the code. Yet clearly that can't be the case since it's working for everyone else...

I'm running
Code:
Python 2.3.5 (#1, Mar 20 2005, 20:38:20) 
[GCC 3.3 20030304 (Apple Computer, Inc. build 1809)] on darwin
Anyone have any ideas?
SeaWolf is offline   Reply With Quote