riclas
|
|
August 28, 2014, 05:12:32 PM |
|
so i went to learn some python basics, and i think i fixed the script. http://pastebin.com/H07bPtGwis 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
Activity: 1176
Merit: 1280
May Bitcoin be touched by his Noodly Appendage
|
|
August 28, 2014, 05:13:30 PM |
|
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
|
|
August 28, 2014, 05:24:56 PM |
|
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
Activity: 1176
Merit: 1280
May Bitcoin be touched by his Noodly Appendage
|
|
August 28, 2014, 08:45:55 PM |
|
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
|
|
August 29, 2014, 02:46:37 AM |
|
yes it worked perfectly. thank you
|
portuguese p2p trader. telegram @riclas
|
|
|
jackjack (OP)
Legendary
Offline
Activity: 1176
Merit: 1280
May Bitcoin be touched by his Noodly Appendage
|
|
August 29, 2014, 08:55:16 AM |
|
For future reference the final version is this: #!/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
Activity: 108
Merit: 10
|
|
August 29, 2014, 04:14:43 PM |
|
How to import private key from file with cli ? not web interface I mean.
|
|
|
|
madmartyk
Legendary
Offline
Activity: 2702
Merit: 1030
Yes I am a pirate, 300 years too late!
|
|
August 29, 2014, 04:24:30 PM |
|
pywallet.py --datadir c:\users\username\appdata\roaming\coin name --namecoin --importprivkey Key string
|
|
|
|
digitizing
Member
Offline
Activity: 108
Merit: 10
|
|
August 31, 2014, 11:02:20 AM |
|
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
Activity: 2702
Merit: 1030
Yes I am a pirate, 300 years too late!
|
|
August 31, 2014, 11:42:46 AM |
|
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
Activity: 1176
Merit: 1280
May Bitcoin be touched by his Noodly Appendage
|
|
August 31, 2014, 12:48:11 PM |
|
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
Activity: 2702
Merit: 1030
Yes I am a pirate, 300 years too late!
|
|
August 31, 2014, 12:53:19 PM |
|
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
Activity: 108
Merit: 10
|
|
August 31, 2014, 02:28:27 PM |
|
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 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
Activity: 2702
Merit: 1030
Yes I am a pirate, 300 years too late!
|
|
August 31, 2014, 02:33:11 PM |
|
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 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
Activity: 1176
Merit: 1280
May Bitcoin be touched by his Noodly Appendage
|
|
August 31, 2014, 04:21:16 PM Last edit: August 31, 2014, 07:23:47 PM by jackjack |
|
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
Activity: 1176
Merit: 1280
May Bitcoin be touched by his Noodly Appendage
|
|
September 03, 2014, 06:56:07 AM Last edit: September 03, 2014, 09:20:05 AM by jackjack |
|
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) { "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) { "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: 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
Activity: 83
Merit: 10
|
|
September 03, 2014, 09:58:57 PM |
|
hi can you help ? How to import private key from file ?
|
|
|
|
tevayo
|
|
September 06, 2014, 05:29:32 PM |
|
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
Activity: 1176
Merit: 1280
May Bitcoin be touched by his Noodly Appendage
|
|
September 06, 2014, 05:44:45 PM |
|
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
|
|
September 06, 2014, 05:50:15 PM |
|
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
|
|
|
|
|