View Single Post
Old 02-16-2010, 02:25 PM   #612
joblack
Wizard
joblack ought to be getting tired of karma fortunes by now.joblack ought to be getting tired of karma fortunes by now.joblack ought to be getting tired of karma fortunes by now.joblack ought to be getting tired of karma fortunes by now.joblack ought to be getting tired of karma fortunes by now.joblack ought to be getting tired of karma fortunes by now.joblack ought to be getting tired of karma fortunes by now.joblack ought to be getting tired of karma fortunes by now.joblack ought to be getting tired of karma fortunes by now.joblack ought to be getting tired of karma fortunes by now.joblack ought to be getting tired of karma fortunes by now.
 
Posts: 1,752
Karma: 4382688
Join Date: Jul 2006
Location: Somewhere on earth
Device: Onyx Boox Tab X C
Quote:
Originally Posted by pietvo View Post
# ineptkeymac.py, version 1

# This program runs on Mac OS X, version 10.6.2 and probably several other
# versions. It uses Python 2.6, but it probably also runs on all versions
# 2.x with x >= 5.

# This program extracts the private RSA key for your ADE account in a
# standard binary form (DER format) in a file of your choosing. Its purpose
# is to make a backup of that key so that your legally bought ADE encoded
# ebooks can be salvaged in case they would no longer be supported by ADE
# software. No other usages are intended.

# It has been tested with the key storage structure of ADE 1.7.1 and 1.7.2
# and Sony Reader Library.

f1182324a
Nice, if you add

import pickle

and substitute

with closing(open(keypath, 'wb')) as outf:
outf.write(key)

with

with closing(open(keypath, 'w')) as outf:
keylist = []
keylist.append(key)
pickle.dump(keylist,outf)

and

change

initialfile = 'adeptkey.der',
to
initialfile = 'adeptkey4.der',

it should work with the new scripts ...
joblack is offline   Reply With Quote