jackjack (OP)
Legendary
Offline
Activity: 1176
Merit: 1280
May Bitcoin be touched by his Noodly Appendage
|
|
August 03, 2011, 04:41:56 PM Last edit: September 09, 2014, 03:59:12 PM by jackjack |
|
News: August 2014My boring professional life made me stay away from bitcoin for far too long but I'm now back in business Pywallet won't be fixed anymore except for critical bugs Instead I'll finish its successor (that still has no name) News: September 2013I'm rebuilding pywallet from scratch: This threadFirst of all, I'd like to thank Joric for the first version of pywallet he made, this thread is about my fork. Pywallet is a python script that deals with wallet.dat. It allows you to do plenty of things inside it. You can post here whatever you want about pywallet: critics, asking for improvements/changes, telling me it helped you, pointing out errors/bugs, etc. Pywallet 2: 22nd March 2013Pywallet has been discontinued for around a year but is now actively developed again. Look at the end of the 7th page for updates: encrypted wallet support, exporting/importing to/from files, merging wallets, etc. Instructions (see also here) Currently you can: - Dump your wallet, see your pubkeys, privkeys, their labels, etc
- Under "Dump your wallet:"
- Fill version with 0 for bitcoin, 52 for namecoin, 111 for testnets
- Dump your transactions to a json file
- Under "Dump your transactions to a file:"
- Fill Output file with the full path to the file where you want the transactions to be written, this file must not exist
- Import a key/address into your wallet, with a label, or as a reserve key
- Under "Import a key into your wallet:"
- Key is the private key to import, in base58 or in hexadecimal chars
- Label is the name you want to see in the Address Book of the client
- Check Reserve if you want your address NOT to show in the Address Book
- Version = 0 for bitcoin, 52 for namecoin, 111 for testnets
- Format of the private key: Hexadecimal if you see only digits, a, b, c, d, e and f, otherwise chose Regular
- Import a transaction into your wallet
- Under "Import a transaction into your wallet:"
- Txk is the tx_k value you see in the wallet dump
- Txv is the tx_v value you see in the wallet dump
- Import transactions from a json file
- Under "Import a transaction into your wallet:"
- Txk = "file" (without quotes)
- Txv = full path to the transactions dump file
- Delete addresses from your wallet
- Under "Delete a key from your wallet:"
- Key is a Bitcoin address, not a priv key
- Type: Bitcoin Address
- Delete transactions from your wallet
- Under "Delete a key from your wallet:"
- Key is the hash of the transaction you want to delete (type "all" to delete them all)
- Type: Transaction
- Get info about a privkey, i.e. see address, base58 privkey, hexprivkey, pubkey and hash160, using the network you want
- Under "Get some info about one key[and sign/verify messages]:"
- Key is a private key
- Leave Msg, Sig and Pubkey empty
- Version = 0 for bitcoin, 52 for namecoin, 111 for testnets
- Format of the private key: Hexadecimal if you see only digits, a, b, c, d, e and f, otherwise chose Regular
- Sign and verify string, files, and binary string
- Under "Get some info about one key and sign/verify messages:"
- Key is the private key you want to sign the message/file with (only for signing)
- Message is the message you want to sign/verify
- If it is a string, just type it
- If it is a binary string, type "Hex:" just before its hexadecimal representation
- If it is a file, type "File:" just before its full path
- Signature is the signature of your message (only for verifying)
- Pubkey is the pubkey used to sign the message (only for verifying)
- Read a device to find deleted keys (CLI only)
- Assuming that:
- The device you want to read is /dev/sda3
- The size of /dev/sda3 is 30.1Gio
- You want pywallet to write the new wallet containing the found keys in /home/jackjack/recovered_wallets
- Run "sudo ./pywallet.py --recover --recov_device /dev/sda3 --recov_size 30.1Gio --recov_outputdir /home/jackjack/recovered_wallets"
- Then replace your wallet (back it up before) with the recovered wallet and run "bitcoin -rescan"
- Print the balance of a bitcoin address, read from blockexplorer
Installation:
- Linux/OSX: See README file
- Windows:
How to run it: Download it there: https://github.com/jackjack-jj/pywallet Run './pywallet.py --web' then open ' http://localhost:8989' in your brower Requirements: Python 2.5-2.7, with bsddb package  twisted package is necessary if you want to use the web interface  ecdsa package is necessary if you want to sign and verify messages Confirmed to work on: Ubuntu 32bit(me) Windows 32bit(me), 64bit(ctoon6) OSX(defxor) Pywallet can be used to: Import Vanitygen keys Delete 0/unconfirmed transactions Recover Namecoins (and testnetcoins) sent to Bitcoin addresses Create a deterministic wallet (using a passphrase) Create a deterministic wallet (using a file) Broadcast offline transactions Create a Bitcoin/*coin address from scratch Recover a wallet/deleted keys
|
Own address: 19QkqAza7BHFTuoz9N8UQkryP4E9jHo4N3 - Pywallet support: 1AQDfx22pKGgXnUZFL1e4UKos3QqvRzNh5 - Bitcointalk++ script support: 1Pxeccscj1ygseTdSV1qUqQCanp2B2NMM2 Pywallet: instructions. Encrypted wallet support, export/import keys/addresses, backup wallets, export/import CSV data from/into wallet, merge wallets, delete/import addresses and transactions, recover altcoins sent to bitcoin addresses, sign/verify messages and files with Bitcoin addresses, recover deleted wallets, etc.
|
|
|
samr7
Full Member
Offline
Activity: 140
Merit: 430
Firstbits: 1samr7
|
|
August 03, 2011, 05:15:30 PM |
|
+1 That's awesome jackjack! The web interface is a really cool feature, pushing in the direction of a lightweight bitcoin client. It might be nice if it auto-filled the default wallet location. Also, when I use it to access a bitcoin wallet, and bitcoin is running, bitcoin crashes with a database exception: ************************ EXCEPTION: 22DbRunRecoveryException DbEnv::txn_checkpoint: DB_RUNRECOVERY: Fatal error, run database recovery bitcoin in ThreadMessageHandler()
Do you have some trick to avoid this, or at least warn about it?
|
|
|
|
jackjack (OP)
Legendary
Offline
Activity: 1176
Merit: 1280
May Bitcoin be touched by his Noodly Appendage
|
|
August 03, 2011, 05:25:07 PM Last edit: August 03, 2011, 05:47:30 PM by jackjack |
|
I just added the warning, thanks for pointing that out I'll search if I can see when bitcoin is running
Auto-filling with default wallet location ok
|
Own address: 19QkqAza7BHFTuoz9N8UQkryP4E9jHo4N3 - Pywallet support: 1AQDfx22pKGgXnUZFL1e4UKos3QqvRzNh5 - Bitcointalk++ script support: 1Pxeccscj1ygseTdSV1qUqQCanp2B2NMM2 Pywallet: instructions. Encrypted wallet support, export/import keys/addresses, backup wallets, export/import CSV data from/into wallet, merge wallets, delete/import addresses and transactions, recover altcoins sent to bitcoin addresses, sign/verify messages and files with Bitcoin addresses, recover deleted wallets, etc.
|
|
|
oOoOo
|
|
August 05, 2011, 12:27:52 AM |
|
Doesn't work, I'm getting this Traceback (most recent call last): File "pywallet.py", line 7, in <module> from bsddb.db import * File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/bsddb/__init__.py", line 64, in <module> ImportError: No module named _bsddb
Do I need a new version of python? And if so, where do I get it??
|
|
|
|
jackjack (OP)
Legendary
Offline
Activity: 1176
Merit: 1280
May Bitcoin be touched by his Noodly Appendage
|
|
August 05, 2011, 12:34:19 AM |
|
It seems you don't have the bsddb python package
|
Own address: 19QkqAza7BHFTuoz9N8UQkryP4E9jHo4N3 - Pywallet support: 1AQDfx22pKGgXnUZFL1e4UKos3QqvRzNh5 - Bitcointalk++ script support: 1Pxeccscj1ygseTdSV1qUqQCanp2B2NMM2 Pywallet: instructions. Encrypted wallet support, export/import keys/addresses, backup wallets, export/import CSV data from/into wallet, merge wallets, delete/import addresses and transactions, recover altcoins sent to bitcoin addresses, sign/verify messages and files with Bitcoin addresses, recover deleted wallets, etc.
|
|
|
defxor
|
|
August 05, 2011, 07:11:16 AM |
|
Doesn't work, I'm getting this Traceback (most recent call last): File "pywallet.py", line 7, in <module> from bsddb.db import * File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/bsddb/__init__.py", line 64, in <module> ImportError: No module named _bsddb
Do I need a new version of python? And if so, where do I get it?? Looks like you're on a Mac. bsddb is broken in Apple's default installation, the solution is to install another Python version via Macports.
|
|
|
|
oOoOo
|
|
August 05, 2011, 08:42:13 PM |
|
Doesn't work in the slightest. localhost:bin $ python3.2 ./pywallet.py File "pywallet.py", line 54 _p = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFC2FL ^ SyntaxError: invalid syntax
hmmm....
|
|
|
|
coblee
Donator
Legendary
Offline
Activity: 1654
Merit: 1351
Creator of Litecoin. Cryptocurrency enthusiast.
|
|
August 05, 2011, 08:43:38 PM |
|
Doesn't work in the slightest. localhost:bin $ python3.2 ./pywallet.py File "pywallet.py", line 54 _p = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFC2FL ^ SyntaxError: invalid syntax
hmmm.... I think this only works with python 2.
|
|
|
|
whirlpool
Member
Offline
Activity: 106
Merit: 10
|
|
August 05, 2011, 08:45:14 PM |
|
This works great! I can finally import private keys in Windows
|
|
|
|
jackjack (OP)
Legendary
Offline
Activity: 1176
Merit: 1280
May Bitcoin be touched by his Noodly Appendage
|
|
August 05, 2011, 11:11:44 PM |
|
This works great! I can finally import private keys in Windows Thanks for confirming it works in Windows! Doesn't work in the slightest. localhost:bin $ python3.2 ./pywallet.py File "pywallet.py", line 54 _p = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFC2FL ^ SyntaxError: invalid syntax
hmmm.... I think this only works with python 2. Yes, it works in Python 2.x. Python 3 was untested, until now, thanks for the feedback
|
Own address: 19QkqAza7BHFTuoz9N8UQkryP4E9jHo4N3 - Pywallet support: 1AQDfx22pKGgXnUZFL1e4UKos3QqvRzNh5 - Bitcointalk++ script support: 1Pxeccscj1ygseTdSV1qUqQCanp2B2NMM2 Pywallet: instructions. Encrypted wallet support, export/import keys/addresses, backup wallets, export/import CSV data from/into wallet, merge wallets, delete/import addresses and transactions, recover altcoins sent to bitcoin addresses, sign/verify messages and files with Bitcoin addresses, recover deleted wallets, etc.
|
|
|
jackjack (OP)
Legendary
Offline
Activity: 1176
Merit: 1280
May Bitcoin be touched by his Noodly Appendage
|
|
August 07, 2011, 05:07:31 PM |
|
New awesome feature: you can now delete addresses and tx's from your wallet!
So: no more headaches because of 0/unconfirmed transactions: find it, delete it easier wallet management: YOU chose exactly which addresses you want in which wallet
|
Own address: 19QkqAza7BHFTuoz9N8UQkryP4E9jHo4N3 - Pywallet support: 1AQDfx22pKGgXnUZFL1e4UKos3QqvRzNh5 - Bitcointalk++ script support: 1Pxeccscj1ygseTdSV1qUqQCanp2B2NMM2 Pywallet: instructions. Encrypted wallet support, export/import keys/addresses, backup wallets, export/import CSV data from/into wallet, merge wallets, delete/import addresses and transactions, recover altcoins sent to bitcoin addresses, sign/verify messages and files with Bitcoin addresses, recover deleted wallets, etc.
|
|
|
defxor
|
|
August 07, 2011, 06:25:39 PM |
|
If you want to reach not-too-savvy people I think a guide needs to be written how to get it up and running on Mac since bsddb is broken in (at least) Snow Leopard (I believe Leopard as well, haven't tried Lion). Dumping related commands from my bash history, but I had Macports installed since before. The following should be tested by someone who hasn't installed Macports or pywallet, on a clean install. It's just from memory/history. Mac pywallet installation guide: sudo port install python27 python_select sudo python_select python27 sudo port select --set python python27 sudo port install py-bsddb sudo port install py27-twisted
./pywallet.py (yeah python_select might be overkill if the user is never going to install other python versions)
|
|
|
|
jackjack (OP)
Legendary
Offline
Activity: 1176
Merit: 1280
May Bitcoin be touched by his Noodly Appendage
|
|
August 07, 2011, 07:10:08 PM |
|
If you want to reach not-too-savvy people I think a guide needs to be written how to get it up and running on Mac since bsddb is broken in (at least) Snow Leopard (I believe Leopard as well, haven't tried Lion). Dumping related commands from my bash history, but I had Macports installed since before. The following should be tested by someone who hasn't installed Macports or pywallet, on a clean install. It's just from memory/history. Mac pywallet installation guide: sudo port install python27 python_select sudo python_select python27 sudo port select --set python python27 sudo port install py-bsddb sudo port install py27-twisted
./pywallet.py (yeah python_select might be overkill if the user is never going to install other python versions) Thanks! I forgot I have a Snow Leopard VM...... I'll test that there
|
Own address: 19QkqAza7BHFTuoz9N8UQkryP4E9jHo4N3 - Pywallet support: 1AQDfx22pKGgXnUZFL1e4UKos3QqvRzNh5 - Bitcointalk++ script support: 1Pxeccscj1ygseTdSV1qUqQCanp2B2NMM2 Pywallet: instructions. Encrypted wallet support, export/import keys/addresses, backup wallets, export/import CSV data from/into wallet, merge wallets, delete/import addresses and transactions, recover altcoins sent to bitcoin addresses, sign/verify messages and files with Bitcoin addresses, recover deleted wallets, etc.
|
|
|
jackjack (OP)
Legendary
Offline
Activity: 1176
Merit: 1280
May Bitcoin be touched by his Noodly Appendage
|
|
August 08, 2011, 02:59:12 AM |
|
Another new feature: importing transactions Now, offline transactions are far more simple than before (no more command lines or unofficial client)
|
Own address: 19QkqAza7BHFTuoz9N8UQkryP4E9jHo4N3 - Pywallet support: 1AQDfx22pKGgXnUZFL1e4UKos3QqvRzNh5 - Bitcointalk++ script support: 1Pxeccscj1ygseTdSV1qUqQCanp2B2NMM2 Pywallet: instructions. Encrypted wallet support, export/import keys/addresses, backup wallets, export/import CSV data from/into wallet, merge wallets, delete/import addresses and transactions, recover altcoins sent to bitcoin addresses, sign/verify messages and files with Bitcoin addresses, recover deleted wallets, etc.
|
|
|
RaTTuS
|
|
August 09, 2011, 08:04:27 AM |
|
jackjack, what happens if I import a key into the address book of 2 clients ? [not that I want to - I just want to know what would happen]
|
In the Beginning there was CPU , then GPU , then FPGA then ASIC, what next I hear to ask ....
1RaTTuSEN7jJUDiW1EGogHwtek7g9BiEn
|
|
|
ffuentes
Member
Offline
Activity: 70
Merit: 10
Only a curious passer-by / FirstBits: 13zsc1
|
|
August 09, 2011, 08:10:09 AM |
|
Can I generate some private key (not only import it but the opposite) ?
A sort of bitcoins offline.
|
|
|
|
RaTTuS
|
|
August 09, 2011, 09:23:53 AM |
|
Can I generate some private key (not only import it but the opposite) ?
A sort of bitcoins offline.
see https://bitcointalk.org/index.php?topic=25804.0
|
In the Beginning there was CPU , then GPU , then FPGA then ASIC, what next I hear to ask ....
1RaTTuSEN7jJUDiW1EGogHwtek7g9BiEn
|
|
|
jackjack (OP)
Legendary
Offline
Activity: 1176
Merit: 1280
May Bitcoin be touched by his Noodly Appendage
|
|
August 09, 2011, 11:27:51 AM Last edit: August 10, 2011, 03:24:01 AM by jackjack |
|
jackjack, what happens if I import a key into the address book of 2 clients ? [not that I want to - I just want to know what would happen]
You will see its balance/tx's in these wallets just like you expect it Only the first wallet to use the coins can spend them, obviously
|
Own address: 19QkqAza7BHFTuoz9N8UQkryP4E9jHo4N3 - Pywallet support: 1AQDfx22pKGgXnUZFL1e4UKos3QqvRzNh5 - Bitcointalk++ script support: 1Pxeccscj1ygseTdSV1qUqQCanp2B2NMM2 Pywallet: instructions. Encrypted wallet support, export/import keys/addresses, backup wallets, export/import CSV data from/into wallet, merge wallets, delete/import addresses and transactions, recover altcoins sent to bitcoin addresses, sign/verify messages and files with Bitcoin addresses, recover deleted wallets, etc.
|
|
|
jackjack (OP)
Legendary
Offline
Activity: 1176
Merit: 1280
May Bitcoin be touched by his Noodly Appendage
|
|
August 10, 2011, 03:29:19 AM |
|
I would need a few testers to test new features, anybody?
|
Own address: 19QkqAza7BHFTuoz9N8UQkryP4E9jHo4N3 - Pywallet support: 1AQDfx22pKGgXnUZFL1e4UKos3QqvRzNh5 - Bitcointalk++ script support: 1Pxeccscj1ygseTdSV1qUqQCanp2B2NMM2 Pywallet: instructions. Encrypted wallet support, export/import keys/addresses, backup wallets, export/import CSV data from/into wallet, merge wallets, delete/import addresses and transactions, recover altcoins sent to bitcoin addresses, sign/verify messages and files with Bitcoin addresses, recover deleted wallets, etc.
|
|
|
ffuentes
Member
Offline
Activity: 70
Merit: 10
Only a curious passer-by / FirstBits: 13zsc1
|
|
August 10, 2011, 04:30:59 AM Last edit: August 10, 2011, 05:56:36 AM by ffuentes |
|
I would need a few testers to test new features, anybody? For a donation I would do it.
|
|
|
|
|