Thanks for your script; it is working for uncrypted wallet.dat file. Could you please advice how to recover encrypted wallet.dat file.
I don't know how many times or ways to try and explain to you... you
CAN NOT recover data from an
encrypted wallet.dat file
unless you have the password.
The data is, after all,
encrypted... so you need to recover the password first. Your options are:
btcrecover:
https://github.com/gurnec/btcrecoverhashcat:
https://hashcat.net/hashcat/or
a (trusted) wallet password recovery service like:
https://www.walletrecoveryservices.com/NONE of the private key extraction scripts on this forum will be of use to you,
unless you have the password