Bitcoin Forum
December 11, 2024, 12:35:13 PM *
News: Latest Bitcoin Core release: 28.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: « 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 [22] 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 »
  Print  
Author Topic: Pywallet 2.2: manage your wallet [Update required]  (Read 208267 times)
riclas
Full Member
***
Offline Offline

Activity: 208
Merit: 106


View Profile
August 28, 2014, 05:12:32 PM
 #421

so i went to learn some python basics, and i think i fixed the script. http://pastebin.com/H07bPtGw

is the format really supposed to be "1privkey;label"? if so, i still need to concatenate the 1. otherwise that should do the trick, I would just like some confirmation

portuguese p2p trader. telegram @riclas
jackjack (OP)
Legendary
*
Offline Offline

Activity: 1176
Merit: 1280


May Bitcoin be touched by his Noodly Appendage


View Profile
August 28, 2014, 05:13:30 PM
 #422

Sorry for the bugs

Change
1)
 "if (sys.argv)!=2:" to "if len(sys.argv)!=2:"
2)
"r+=addr+';'+label+'\n'" to "r+=k['sec']+';'+label+'\n'"



Edit: I didn't see your post. And I can't open pastebin on my phone (crazy...).
The file only needs private keys, that's why there's no 1privkey. They start with K, L or 5.

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.
riclas
Full Member
***
Offline Offline

Activity: 208
Merit: 106


View Profile
August 28, 2014, 05:24:56 PM
 #423

yeah that is basically what i changed, but i thought "private" was the key, not "sec".
thank you!

portuguese p2p trader. telegram @riclas
jackjack (OP)
Legendary
*
Offline Offline

Activity: 1176
Merit: 1280


May Bitcoin be touched by his Noodly Appendage


View Profile
August 28, 2014, 08:45:55 PM
 #424

yeah that is basically what i changed, but i thought "private" was the key, not "sec".
thank you!
So it works, right?

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.
riclas
Full Member
***
Offline Offline

Activity: 208
Merit: 106


View Profile
August 29, 2014, 02:46:37 AM
 #425

yes it worked perfectly. thank you

portuguese p2p trader. telegram @riclas
jackjack (OP)
Legendary
*
Offline Offline

Activity: 1176
Merit: 1280


May Bitcoin be touched by his Noodly Appendage


View Profile
August 29, 2014, 08:55:16 AM
 #426

For future reference the final version is this:
Code:
#!/usr/bin/env python

import json,sys

if len(sys.argv)!=2:
print 'usage: '+sys.argv[0]+' wallet_dump.json'
exit()

f=open(sys.argv[1],'r')
c=f.read()
f.close()

d=json.loads(c)
print d
r=''
for k in d['keys']:
label=''
addr=k['addr']
if addr in d['names'].keys():
label=d['names'][addr]
r+=k['sec']+';'+label+'\n'

f=open(sys.argv[1]+'.pywalletexport','w')
f.write(r)
f.close()

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.
digitizing
Member
**
Offline Offline

Activity: 108
Merit: 10


View Profile
August 29, 2014, 04:14:43 PM
 #427

How to import private key from file with cli ? not web interface I mean.
madmartyk
Legendary
*
Offline Offline

Activity: 2702
Merit: 1030


Yes I am a pirate, 300 years too late!


View Profile
August 29, 2014, 04:24:30 PM
 #428

pywallet.py --datadir c:\users\username\appdata\roaming\coin name --namecoin --importprivkey Key string

digitizing
Member
**
Offline Offline

Activity: 108
Merit: 10


View Profile
August 31, 2014, 11:02:20 AM
 #429

pywallet.py --datadir c:\users\username\appdata\roaming\coin name --namecoin --importprivkey Key string
I mean importing from file. I have file that contain thousand private key in base58 format.
Can I import them using pywallet cli ?
madmartyk
Legendary
*
Offline Offline

Activity: 2702
Merit: 1030


Yes I am a pirate, 300 years too late!


View Profile
August 31, 2014, 11:42:46 AM
 #430

pywallet.py --datadir c:\users\username\appdata\roaming\coin name --namecoin --importprivkey Key string
I mean importing from file. I have file that contain thousand private key in base58 format.
Can I import them using pywallet cli ?

Yes, but it will take a while.  I had a wallet with 13,000 keys and it ran for 3 days.

jackjack (OP)
Legendary
*
Offline Offline

Activity: 1176
Merit: 1280


May Bitcoin be touched by his Noodly Appendage


View Profile
August 31, 2014, 12:48:11 PM
 #431

With the web interface you can import them all at once
If you really can't use the WUI then wait a few hours until I release a new version of the new pywallet (I'll post here when it's done)

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.
madmartyk
Legendary
*
Offline Offline

Activity: 2702
Merit: 1030


Yes I am a pirate, 300 years too late!


View Profile
August 31, 2014, 12:53:19 PM
 #432

With the web interface you can import them all at once
If you really can't use the WUI then wait a few hours until I release a new version of the new pywallet (I'll post here when it's done)

The web interface never worked for me, the command line has been a pain in the ass, but it works great!  Great utility jackjack!!

digitizing
Member
**
Offline Offline

Activity: 108
Merit: 10


View Profile
August 31, 2014, 02:28:27 PM
 #433

Yes, but it will take a while.  I had a wallet with 13,000 keys and it ran for 3 days.
wow, are you sure it take 3 days to import 13,000 keys ?
so i think it's faster using this command
Code:
cat privkeyfile | while read privkey; do ./bitcoind importprivkey $privkey mylabel false ; done
it was only take about 4 hours to import 20,000 keys.
madmartyk
Legendary
*
Offline Offline

Activity: 2702
Merit: 1030


Yes I am a pirate, 300 years too late!


View Profile
August 31, 2014, 02:33:11 PM
 #434

Yes, but it will take a while.  I had a wallet with 13,000 keys and it ran for 3 days.
wow, are you sure it take 3 days to import 13,000 keys ?
so i think it's faster using this command
Code:
cat privkeyfile | while read privkey; do ./bitcoind importprivkey $privkey mylabel false ; done
it was only take about 4 hours to import 20,000 keys.

Remember I'm using sucky Windows!!!

jackjack (OP)
Legendary
*
Offline Offline

Activity: 1176
Merit: 1280


May Bitcoin be touched by his Noodly Appendage


View Profile
August 31, 2014, 04:21:16 PM
Last edit: August 31, 2014, 07:23:47 PM by jackjack
 #435

I just implemented the multi-import into the new pywallet
I'll post here when it's released

I just tried to import 1000 keys, it took 140 seconds
That would make 45 minutes for 20k keys

Edit: Released here
https://bitcointalk.org/index.php?topic=294439.msg8614086#msg8614086

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 Offline

Activity: 1176
Merit: 1280


May Bitcoin be touched by his Noodly Appendage


View Profile
September 03, 2014, 06:56:07 AM
Last edit: September 03, 2014, 09:20:05 AM by jackjack
 #436

question about "hexsec" and "secret"

consider this dump of an unencrypted wallet: (don't worry, I won't store bitcoins at these keys, I'm just experimenting)

Code:
    {
        "addr": "1EJP1Q1JEQdWtR5PEopCRZdE1F8dgk9Wwp",
        "compressed": false,
        "hexsec": "c703063648fd19d64de086064692dd17",
        "private": "308201130201010420c703063648fd19d64de086064692dd17bd31ef4ebc8b8caa043d1fc7347d6a23a081a53081a2020101302c06072a8648ce3d0101022100fffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f300604010004010704410479be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8022100fffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141020101a1440342000400481a16f118b4efe54b4783f857a9d45c8b5aec6cf03f7bc177ecc1d2faea443d4e94475ac9312cdfde1a30b4e953356c7e93312eabd92ddb070cdcfb981ee5",
        "pubkey": "0400481a16f118b4efe54b4783f857a9d45c8b5aec6cf03f7bc177ecc1d2faea443d4e94475ac9312cdfde1a30b4e953356c7e93312eabd92ddb070cdcfb981ee5",
        "reserve": 1,
        "sec": "5KKw55iWFRmy614626Fo6ckzS7vxNcfhZJHvvo84W3cAzwfRjVo",
        "secret": "c703063648fd19d64de086064692dd17"
    }

Why are "secret" and "hexsec" only 16 bytes?


This is the same key after loading the wallet with bitcoin 0.9 and encrypting it (and decrypting again with pywallet)

Code:
    {
        "addr": "1EJP1Q1JEQdWtR5PEopCRZdE1F8dgk9Wwp",
        "compressed": false,
        "encrypted_privkey": "cb9f081748ed5d42d010b10baa84748535e5588908e6cc70a28c44c550277ecdcaaf0d5e36cc9f919a0cf3471d2832d8",
        "hexsec": "c703063648fd19d64de086064692dd17bd31ef4ebc8b8caa043d1fc7347d6a23",
        "pubkey": "0400481a16f118b4efe54b4783f857a9d45c8b5aec6cf03f7bc177ecc1d2faea443d4e94475ac9312cdfde1a30b4e953356c7e93312eabd92ddb070cdcfb981ee5",
        "reserve": 1,
        "sec": "5KKw55iWFRmy614626Fo6ckzS7vxNcfhZJHvvo84W3cAzwfRjVo",
        "secret": "c703063648fd19d64de086064692dd17bd31ef4ebc8b8caa043d1fc7347d6a23"
    }

It almost looks like the first version was just cut off in the middle.

Another question: Is there any documentation about the various elements of the json that is produced with pywallet?

* For example what is the meaning of the "pool" array, its repeating all the addresses but without their keys but seems to contain additional info, what is the rationale behind structuring it that way and not just put all info about a key into one object?
* what is the empty ckey array at the beginning of the dump?


It indeed cut the private key in the middle because of a stupid error. Thank you so much for finding that. It's now fixed.

Json keys doc:
Quote
defaultkey: Default address of your wallet
keys: Info about the private keys in the wallet
pool: Addresses inside the pool (bitcoin doc for more info)
tx: Transactions saved inside your wallet
names: Labels of addresses
mkey: Info about the master key when the wallet is encrypted
ckey: Not used

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.
Jackson_cali
Member
**
Offline Offline

Activity: 83
Merit: 10


View Profile
September 03, 2014, 09:58:57 PM
 #437

hi can you help ?
How to import private key from file ?
tevayo
Hero Member
*****
Offline Offline

Activity: 620
Merit: 500



View Profile
September 06, 2014, 05:29:32 PM
 #438

hello, I have a problem with a wallet deleted by mistake.
I recovered with recuva but after copying it to a flash drive formatted and after applying the pywallet says " 0 wallets recovered , 0 recovered private keys" so I assume that this wallet is totally corrupt.
Now I installed windows7 on a new hard disk (installed python27, pywallet, setuptools 4.1b1, bsbbd 3-6.0.1, pycrypto2.6, Twisted 14.0.0, python ecdsa) and the old record is not system disk. Now I'm trying this:

https://bitcointalk.org/index.php?topic=34028.msg2794856#msg2794856

to try to recover private keys and wallets pywallet running from the new C: using this syntax:

pywallet \ pywallet.py --recover --recov_device f: --recov_size 180Gio --otherversion=73 --recov_outputdir c: \ recover

f: is the drive letter of the old drive

but it gives me the following error:
error: <13, "permission denied"

Help would be greatly appreciated
jackjack (OP)
Legendary
*
Offline Offline

Activity: 1176
Merit: 1280


May Bitcoin be touched by his Noodly Appendage


View Profile
September 06, 2014, 05:44:45 PM
 #439

hello, I have a problem with a wallet deleted by mistake.
I recovered with recuva but after copying it to a flash drive formatted and after applying the pywallet says " 0 wallets recovered , 0 recovered private keys" so I assume that this wallet is totally corrupt.
Now I installed windows7 on a new hard disk (installed python27, pywallet, setuptools 4.1b1, bsbbd 3-6.0.1, pycrypto2.6, Twisted 14.0.0, python ecdsa) and the old record is not system disk. Now I'm trying this:

https://bitcointalk.org/index.php?topic=34028.msg2794856#msg2794856

to try to recover private keys and wallets pywallet running from the new C: using this syntax:

pywallet \ pywallet.py --recover --recov_device f: --recov_size 180Gio --otherversion=73 --recov_outputdir c: \ recover

f: is the drive letter of the old drive

but it gives me the following error:
error: <13, "permission denied"

Help would be greatly appreciated
Before anything else: run cmd with admin, not with a regular user
Windows menu -> search "cmd" -> right-click on cmd -> run as admin. Then enter the command.
The prompt will be "C:\Windows\system32" instead of "C:\Users\xxx"

I'm not sure this is the problem but it is necessary anyway

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.
tevayo
Hero Member
*****
Offline Offline

Activity: 620
Merit: 500



View Profile
September 06, 2014, 05:50:15 PM
 #440

hello, I have a problem with a wallet deleted by mistake.
I recovered with recuva but after copying it to a flash drive formatted and after applying the pywallet says " 0 wallets recovered , 0 recovered private keys" so I assume that this wallet is totally corrupt.
Now I installed windows7 on a new hard disk (installed python27, pywallet, setuptools 4.1b1, bsbbd 3-6.0.1, pycrypto2.6, Twisted 14.0.0, python ecdsa) and the old record is not system disk. Now I'm trying this:

https://bitcointalk.org/index.php?topic=34028.msg2794856#msg2794856

to try to recover private keys and wallets pywallet running from the new C: using this syntax:

pywallet \ pywallet.py --recover --recov_device f: --recov_size 180Gio --otherversion=73 --recov_outputdir c: \ recover

f: is the drive letter of the old drive

but it gives me the following error:
error: <13, "permission denied"

Help would be greatly appreciated
Before anything else: run cmd with admin, not with a regular user
Windows menu -> search "cmd" -> right-click on cmd -> run as admin. Then enter the command.
The prompt will be "C:\Windows\system32" instead of "C:\Users\xxx"

I'm not sure this is the problem but it is necessary anyway



Thank you!
I've been stupid! is now working
If I have success I'll send some your directions BTC forum I have been a big help
Pages: « 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 [22] 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 »
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!