Brute force a wallet.dat file I have a wallet.dat file which is encrypted and I can remember that I have put only numbers as password(4 or 5 digits, not more, not less). 
My friend suggested to do brute force on it using python. 
I tried googling and unfortunately(poor programming) didn't got any python script.
Can anyone help me please ?
I would approach this using JSON-RPC with the programming language of your choice and the walletpassphrase command.
walletpassphrase &quot;12345&quot; 60
The 60 at the end is number of seconds before the passphrase times out and needs to be entered again. Now all you need to do is create a loop that iterates through all number combinations.
If the guess is wrong the bitcoin client will return
Error: The wallet passphrase entered was incorrect. (code -14)
If the guess is correct the bitcoin client will return
null
So all you would need to do is check for the response and if null then the guess is correct and you can stop your loop.