Pages:
Author

Topic: pywallet install help (Read 4152 times)

HCP
legendary
Activity: 2086
Merit: 4361
May 27, 2021, 07:11:32 AM
Dogecoin wallet. A huge number of addresses with a number start with the number 1 and have "sec". Client console with importprivkey command gives error. (Code5)
When you initially ran pywallet to get dump the keys out... did you use the otherversion option to specify that the wallet was a DOGEcoin wallet? If not, it will have read the file as a Bitcoin wallet and will have output the private keys in Bitcoin format.

I suspect you have not used otherversion as you're saying the addresses start with a "1"... whereas Dogecoin addresses start with a "D" and the "WIF" format private keys for a dogecoin wallet should start with a "6" (uncompressed) or "Q" (compressed)

I believe that the otherversion value for Dogecoin is 30... so your command should look something like:
Code:
python pywallet.py --dumpwallet --wallet=wallet.dat --datadir=/path/to/folder/with/wallet/dat --otherversion=30 --passphrase=yourpassphrase

When you do that, you should see the addresses output start with a "D"... and the "sec" values should start with a "6" or "Q"... they should then import into Dogecoin wallet.
newbie
Activity: 3
Merit: 0
May 26, 2021, 11:05:29 PM
Dogecoin wallet. A huge number of addresses with a number start with the number 1 and have "sec". Client console with importprivkey command gives error. (Code5)
HCP
legendary
Activity: 2086
Merit: 4361
May 26, 2021, 10:42:43 PM
It contains a huge number of addresses with "sec" keys. Addresses start with numbers. Where are my keys? These do not fit, the wallet does not accept.
The "sec" records should start with a "K", an "L" or a "5"... these are "WIF" formatted private keys... you should be able to import those into a wallet of your choice (that allows importing of private keys).

What wallet are you attempting to import the keys into? Huh
newbie
Activity: 3
Merit: 0
May 26, 2021, 10:38:32 PM
Hello. Please help a newbie. I have restored the wallet file to txt format. It contains a huge number of addresses with "sec" keys. Addresses start with numbers. Where are my keys? These do not fit, the wallet does not accept.
HCP
legendary
Activity: 2086
Merit: 4361
April 20, 2021, 04:44:58 AM
I've seen that error before... it is usually the result of not being able to create the __db.00x files in the "datadir" given... is your F:\ actually writeable? Maybe create a subdirectory on F:\ and put the wallet file in that... and then pass the path to that subdirectory as the --datadir value.


Addtionally, I've created a "dirty" little Python script that will take an unencrypted wallet.dat and does a byte search through the file looking for "0201010420" hex markers. It then grabs the next 32 bytes (which should be a private key), converts them to both uncompressed and compressed WIF format and outputs to STDOUT (along with the generated addresses so you can search for a key by address if required)

Script is here: https://github.com/HardCorePawn/dump_unenc_keys

Note that this only works with Python 3... it is does NOT work on Python 2.
full member
Activity: 217
Merit: 109
April 19, 2021, 04:16:09 PM
Renamed it with no gap and this is the result.
https://imgur.com/a/EY5K0Nl Just realised I missed a backslash out, ignore the first screenshot.

https://imgur.com/a/zj2A9qa
full member
Activity: 217
Merit: 109
April 19, 2021, 03:48:22 PM
The wallet file seems to have a space in the name... Is that correct? Huh If so you'll need to wrap it in " "s otherwise Python thinks you have moved onto the next option...

Code:
C:\Python27\python.exe C:\Users\Catherine\Downloads\pywallet.py --dumpwallet --datadir=F:\ --wallet="F:\wallet 96kb.dat" > C:\Users\Catherine\Downloads\pywallet_output.txt

Yes it has a space, I could rename it with no gap. Thanks.
HCP
legendary
Activity: 2086
Merit: 4361
April 19, 2021, 03:42:05 PM
The wallet file seems to have a space in the name... Is that correct? Huh If so you'll need to wrap it in " "s otherwise Python thinks you have moved onto the next option...

Code:
C:\Python27\python.exe C:\Users\Catherine\Downloads\pywallet.py --dumpwallet --datadir=F:\ --wallet="F:\wallet 96kb.dat" > C:\Users\Catherine\Downloads\pywallet_output.txt
full member
Activity: 217
Merit: 109
April 18, 2021, 09:03:26 AM
Ok... try this:
Code:
C:\Python27\python.exe C:\Users\Catherine\Downloads\pywallet.py --dumpwallet --datadir=C:\Users\Catherine\Downloads\pywallet --wallet=C:\Users\Catherine\Downloads\pywallet\recovered_wallet_1511377727.dat > C:\Users\Catherine\Downloads\pywallet_output.txt

That will dump all the output from the script into a file: C:\Users\Catherine\Downloads\pywallet_output.txt

You'll be able to open that with a text editor. It'll make it easier to view/read and search. At the very top of the file, does it say "The wallet is encrypted but no passphrase is used"? Huh You should also see some records below it that have names like: "addr", "compressed", "encrypted_privkey", "pubkey" etc


Sorry to pester you again but I can't seem to dump an unencrypted wallet file I have placed on a usb stick via pywallet. It isn't one I have recovered via pywallet, it is a wallet.dat I took off the old hard drive. The usb stick is F: and the file is called wallet 96KB.dat. I want to confirm I am typing the correct command, or whether the wallet just won't dump via pywallet. Thanks again. This is a screenshot of the command I used and the error.
https://imgur.com/a/1jm0Ggo
HCP
legendary
Activity: 2086
Merit: 4361
April 09, 2021, 02:26:39 AM
a wallet.dat is a database file... if you interrupt Bitcoin Core in the middle of a write operation, then the file will be damaged.

The database has a set structure... much like how a Bitcoin transaction has a set structure. If you mess up a Bitcoin transaction raw hex... ie. you put things in the wrong place, or you put bad data in, then the transaction parser will output an error when you try to decode that transaction.

Same with the wallet.dat file... it is expecting the data to follow a set layout... if it doesn't, then the app flags it as "bad" and errors out... The app is not able to figure out how the file is damaged, all it can tell you is that it is damaged...

You might get lucky and it might be something unimportant like a label... and all your key data is actually "OK" and you can possible extract it using tools like PyWallet... or you might get unlucky and it might corrupt all your key data.

A corrupt wallet.dat should not be an issue... because, as the Bitcoin Core devs have advocated since the beginning, you have backups of your wallet.dat... right? riiiiiiight??!? Wink Tongue
member
Activity: 406
Merit: 47
April 08, 2021, 11:55:53 PM
this file have problem when copy/rename from bitcoin open and not close (between use)
inside file will have all data still in there  but some locked file when using or head data have problem
I think if bitcoin program error , hang, freeze, not respond, make file have problem to read program not close  normal
Wait... so your copied/renamed the wallet file while Bitcoin Core was running? Huh If so, that is highly likely to result in wallet file corruption... Undecided

As far as I'm aware, there is no "one size fits all" method to be able to fix it... As it depends on what exactly was being written to the wallet file when it was renamed/copied etc.

If it has been corrupted so badly that PyWallet is unable to open it using --dumpwallet, then it could prove quite difficult to recover. You might have to try --recover and see if it is able to extract the keys and rebuild a new copy of the wallet.

Otherwise, you can try the bitcoin-wallet tool and see if the salvage command can fix it...

yes, I just testing to know
Why many people have problem with wallet.dat a lot many thing corrupt?
look like a big problem with wallet.dat corrupt
some lost bitcoin permanence
some very hard to fix it
and other way if happen with me how can I solve this problem may be it possible happen with me and inside still have my real bitcoin

just try to test fix it without open bitcoin program again to fixt it

I do force talk close bitcoin program it is same result can not use that file

I think file not damage at all data still inside but something make it can not read it
I am not programmer try to use only tools

HCP
legendary
Activity: 2086
Merit: 4361
April 08, 2021, 04:20:50 PM
this file have problem when copy/rename from bitcoin open and not close (between use)
inside file will have all data still in there  but some locked file when using or head data have problem
I think if bitcoin program error , hang, freeze, not respond, make file have problem to read program not close  normal
Wait... so your copied/renamed the wallet file while Bitcoin Core was running? Huh If so, that is highly likely to result in wallet file corruption... Undecided

As far as I'm aware, there is no "one size fits all" method to be able to fix it... As it depends on what exactly was being written to the wallet file when it was renamed/copied etc.

If it has been corrupted so badly that PyWallet is unable to open it using --dumpwallet, then it could prove quite difficult to recover. You might have to try --recover and see if it is able to extract the keys and rebuild a new copy of the wallet.

Otherwise, you can try the bitcoin-wallet tool and see if the salvage command can fix it...
member
Activity: 406
Merit: 47
April 08, 2021, 12:59:04 AM
are you using the latest version of PyWallet? (that has been updated recently by jackjack) or are you using the old version? Huh

Also, where is your wallet.dat actually located? The --datadir value you are using is where Python should be installed to... not where your wallet.dat is likely to be located unless you manually copied it there.

I copy wallet.dat to folder for test

Try jackjack pywallet.py got same result


python pywallet.py --dumpwallet --wallet=C:\python\27\008\wallet.dat
(22, 'Invalid argument -- C:\\python\\27\\008\\wallet.dat: unexpected file type or format')
ERROR:root:Couldn't open wallet.dat/main. Try quitting Bitcoin and running this again.


I test change wallet.dat to other one normal (this file success to dumpwallet)
result can dumpwallet success no problem (use same command)

actually file that have problem this one , when I copy back to bitcoin data folder and run bitcoin again and close program correct and try dumpwallet it is work normal

Just want to know how to fix it (not serious )
this file have problem when copy/rename from bitcoin open and not close (between use)
inside file will have all data still in there  but some locked file when using or head data have problem
I think if bitcoin program error , hang, freeze, not respond, make file have problem to read program not close  normal
HCP
legendary
Activity: 2086
Merit: 4361
April 07, 2021, 05:11:20 PM
I'm probably not making myself clear.
No, you're fine... I was talking to fxsniper who posted just above me Wink

full member
Activity: 217
Merit: 109
April 07, 2021, 04:02:18 PM
are you using the latest version of PyWallet? (that has been updated recently by jackjack) or are you using the old version? Huh

Also, where is your wallet.dat actually located? The --datadir value you are using is where Python should be installed to... not where your wallet.dat is likely to be located unless you manually copied it there.
I'm probably not making myself clear. I have scanned the whole Hard drive with pywallet on multiple occasions, when the hard drive has been mounted in a separate enclosure and connected via usb. The scans have been successful in recovering wallets but i find that the results have sometimes been inconsistent. The last time I tried a scan i used every passphrase upper and lowercase, but that didn't yield as many results as an earlier one that included less passphrase variations(i do know the correct passphrases that my brother in law used). I have done quite a few scans this way and have managed to dump the recovered wallets. Some of the wallet.dats i recovered were obtained by using recuva(a file retrieval software). I put those files on to a usb stick and ran those through pywallet with limited success. I think they are corrupted but they are from the correct time(2011-2013). The version of pywallet used is the original one using python 2.7. I don't know if the updated one is any better, but i did see JackJack saying that some things in the original "have always been broken" so maybe i should try it? I just wondered whether the pywallet scan of a hard drive from another laptop is fully accessed by the scan. Thanks for your time.
HCP
legendary
Activity: 2086
Merit: 4361
April 07, 2021, 01:04:13 PM
are you using the latest version of PyWallet? (that has been updated recently by jackjack) or are you using the old version? Huh

Also, where is your wallet.dat actually located? The --datadir value you are using is where Python should be installed to... not where your wallet.dat is likely to be located unless you manually copied it there.
member
Activity: 406
Merit: 47
April 06, 2021, 11:33:45 PM

Code:
python pywallet.py --dumpwallet --datadir=C:\python\27\ >wallet.txt
ERROR:root:Couldn't open wallet.dat/main. Try quitting Bitcoin and running this again.

I test already by run bitcoin program again follow  error message tell to know
it is work fine  wallet.dat can use with pywallet.py dumpwallet success

but if I can not run bitcoin program again to fix it , How can I fix this wallet.dat
if can not open any bitcoin program to fix it or wrong version may be old version it will make wallet.dat error or not
member
Activity: 406
Merit: 47
April 06, 2021, 11:07:11 PM
#99
test use pywallet.py how to fix
this is test , not have any bitcoin

I try test using pywallet.py dumpwallet from wallet.dat

with normal file try create new wallet thousand
python pywallet.py --dumpwallet --datadir=C:\python\27\ >wallet.txt

pywallet.py convert to file success no problem


but I try create wallet new one test and rename wallet.dat file before close
and close bitcoin program, bitcoin program error

then I use wallet.dat that copy before close bitcoin program

python pywallet.py --dumpwallet --datadir=C:\python\27\ >wallet.txt
ERROR:root:Couldn't open wallet.dat/main. Try quitting Bitcoin and running this again.

(using python 2.7)

HCP
legendary
Activity: 2086
Merit: 4361
April 05, 2021, 05:53:03 PM
#98
You should be able to search drives in a USB enclosure... as long as it is visible as a "device" to the operating system, you can specify it using the -recov_device option.
full member
Activity: 217
Merit: 109
April 05, 2021, 03:56:44 PM
#97
Thanks for the reply. It was from a pywallet recovered wallet via some wallet.dat files that I moved to a thumb drive from the hard drive using recovery software. I have got some inconsistent results with pywallet when searching the whole hard drive. In past searches it has found up to 300 keys, but the last couple of attempts using even more passphrases has produced only 103 at the most. Something else i wondered about was the possible unencrypted keys it says it has found. Do you know whether pywallet will search a whole hard drive that you have mounted in an enclosure and connected via usb, including any partitions it has? Thanks again.
Pages:
Jump to: