well thanks, now it can dump the wallet without problem with SecretToASecret and reverse modified, but still can't process privkeys, insists saying "Bad private key".
IDK why but I tried to import public key first and it said "bad private key" too. Re-check what are you trying to import and try
this with addrtype = 138 (line 23). It worked for me. Unfortunately it's not possible to autodetect (wallet doesn't contain addresses, only public keys).
pywallet.py --importprivkey=MXTf98yWq9KEovooAGDSjEWkVbYF5eiFZWKvWL6VX6vhpLZj7m
Address: xt5y9PhK1wnTT4fnf4SLVDaTCyMgAuNPXR
Privkey: MXTf98yWq9KEovooAGDSjEWkVbYF5eiFZWKvWL6VX6vhpLZj7m
Imported successfully