Pages:
Author

Topic: Pywallet 2.2: manage your wallet [Update required] - page 40. (Read 208227 times)

full member
Activity: 238
Merit: 100
Doesn't work in the slightest.

Code:
localhost:bin $ python3.2 ./pywallet.py
  File "pywallet.py", line 54
    _p = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFC2FL
                                                                           ^
SyntaxError: invalid syntax

hmmm....
hero member
Activity: 530
Merit: 500
Doesn't work, I'm getting this

Code:
Traceback (most recent call last):
  File "pywallet.py", line 7, in
    from bsddb.db import *
  File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/bsddb/__init__.py", line 64, in
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.

legendary
Activity: 1176
Merit: 1280
May Bitcoin be touched by his Noodly Appendage
It seems you don't have the bsddb python package
full member
Activity: 238
Merit: 100
Doesn't work, I'm getting this

Code:
Traceback (most recent call last):
  File "pywallet.py", line 7, in
    from bsddb.db import *
  File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/bsddb/__init__.py", line 64, in
ImportError: No module named _bsddb

Do I need a new version of python? And if so, where do I get it??
legendary
Activity: 1176
Merit: 1280
May Bitcoin be touched by his Noodly Appendage
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
full member
Activity: 140
Merit: 430
Firstbits: 1samr7
+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:

Code:
************************
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?
legendary
Activity: 1176
Merit: 1280
May Bitcoin be touched by his Noodly Appendage
News: August 2014
My 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 2013
I'm rebuilding pywallet from scratch:


This thread
First 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 2013
Pywallet 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:

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
Pages:
Jump to: