Dumping private keys from wallet.dat from command line (pywallet.py alternatives)
This is an old question but just to say that the dumpwallet command has been added to bitcoin core. This will give you all the private keys in a text format.