BTW I've tried using the datadir command but pywallet says it's been removed:
REMOVED OPTION: put full path in the --wallet option
-w WALLETFILE, --wallet=WALLETFILE
wallet filename (defaults to wallet.dat)
Oh ok... you're using the "new" version of Pywallet... I have a feeling that the latest version might actually require Python 3 and not Python 2.
In any case... try:
python pywallet.py --dumpwallet --wallet=./wallet.dat --passphrase=YOUR_WALLET_PASSPHRASE_GOES_HERE > wallet.text
And also I dont know the passphrase to the wallet. It's 6 years old or so. It appears to be encrypted basing off all the characters and symbols when I open it in notepad.
Opening in notepad is guaranteed to show all sorts of weird characters and symbols, because notepad is for text based files... and a wallet.dat is a binary database file. So, it isn't necessarily encrypted... but chances are pretty good that it is.
However, if the file is indeed encrypted and you don't have the passphrase, you're not going to be able to recover the private keys. It's as simple as that. You can try running without the
--passphrase option and see if you get the "Sec" fields that show the private keys...
python pywallet.py --dumpwallet --wallet=./wallet.dat > wallet.text
If you only get addresses/public keys... and you don't see any "sec" fields with WIF private keys and hex private keys, then the file is encrypted.
![Undecided](https://bitcointalk.org/Smileys/default/undecided.gif)
I ran the second command (without the passphrase line, due to not knowing what the password is.) In the command window it outputted an "error: unpack_from requires a buffer of at least 4 bytes", and above that it outputted four lines all starting with "File "pywallet.py, line xxxx," the x's being numbers. Looks normal I imagine but just throwing it in here anyway (because I have no idea
![Cheesy](https://bitcointalk.org/Smileys/default/cheesy.gif)
)
When I open the wallet.text file it reads:
"ERROR parsing wallet.dat, type tx"
"Key data: *random characters*"
"Key data in hex:"
*a bunch of numbers and letters*
"value data in hex:"
*a ton more numbers and letters*