Bitcoin Forum
June 20, 2024, 06:37:40 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: pywallet recovery help  (Read 195 times)
kdn (OP)
Newbie
*
Offline Offline

Activity: 57
Merit: 0


View Profile
April 03, 2019, 10:08:54 PM
 #1

Hi all,

I have an encrypted wallet.dat that is 3 years old. I have tried the easy methods (opening Core, replacing the wallet.dat, importing into electrum etc) but everything comes back as saying my wallet is corrupted.

As a last resort I am trying to run pywallet recovery on a usb stick with my dat file. I am getting a strange error though:


root@linux-box:~/Desktop/btc# ls -l /mnt/usb
-rw-r--r-- 1 root root 31667 Mar 31 16:09 wallet.dat


python pywallet.py --recover --recov_size=256Mo --recov_device=/mnt/usb/ --recov_outputdir=./
Enter the passphrase for the wallet that will contain all the recovered keys: ****

Starting recovery.
Traceback (most recent call last):
  File "pywallet.py", line 4870, in <module>
    recoveredKeys=recov(device, passes, size, 10240, options.recov_outputdir)
  File "pywallet.py", line 1467, in recov
    r=search_patterns_on_disk(device, size, inc, map(lambda x:nameToDBName
  • , ['mkey', 'ckey', 'key']))
  File "pywallet.py", line 1350, in search_patterns_on_disk
    if lendataloaded%512>0:
TypeError: unsupported operand type(s) for %: 'NoneType' and 'int'


Could this just be an OS issue? I'm running Debian. Python version is 2.7

thanks!
HCP
Legendary
*
Offline Offline

Activity: 2086
Merit: 4316

<insert witty quote here>


View Profile
April 03, 2019, 10:56:58 PM
 #2

Could this just be an OS issue? I'm running Debian. Python version is 2.7
No... I'd say that it is most likely because you have an "upgraded" wallet.dat file that has new data fields in it. Pywallet hasn't been updated in a long time... and it doesn't play nicely with the newer wallet.dat format.

I posted a quick "workaround/hack" for it here: https://bitcointalk.org/index.php?topic=34028.msg30435668#msg30435668

Basically, it just ignores the new (irrelevant) data fields and should continue on it's merry way and dump the file contents.


█████████████████████████
████▐██▄█████████████████
████▐██████▄▄▄███████████
████▐████▄█████▄▄████████
████▐█████▀▀▀▀▀███▄██████
████▐███▀████████████████
████▐█████████▄█████▌████
████▐██▌█████▀██████▌████
████▐██████████▀████▌████
█████▀███▄█████▄███▀█████
███████▀█████████▀███████
██████████▀███▀██████████
█████████████████████████
.
BC.GAME
▄▄░░░▄▀▀▄████████
▄▄▄
██████████████
█████░░▄▄▄▄████████
▄▄▄▄▄▄▄▄▄██▄██████▄▄▄▄████
▄███▄█▄▄██████████▄████▄████
███████████████████████████▀███
▀████▄██▄██▄░░░░▄████████████
▀▀▀█████▄▄▄███████████▀██
███████████████████▀██
███████████████████▄██
▄███████████████████▄██
█████████████████████▀██
██████████████████████▄
.
..CASINO....SPORTS....RACING..
█░░░░░░█░░░░░░█
▀███▀░░▀███▀░░▀███▀
▀░▀░░░░▀░▀░░░░▀░▀
░░░░░░░░░░░░
▀██████████
░░░░░███░░░░
░░█░░░███▄█░░░
░░██▌░░███░▀░░██▌
░█░██░░███░░░█░██
░█▀▀▀█▌░███░░█▀▀▀█▌
▄█▄░░░██▄███▄█▄░░▄██▄
▄███▄
░░░░▀██▄▀


▄▄████▄▄
▄███▀▀███▄
██████████
▀███▄░▄██▀
▄▄████▄▄░▀█▀▄██▀▄▄████▄▄
▄███▀▀▀████▄▄██▀▄███▀▀███▄
███████▄▄▀▀████▄▄▀▀███████
▀███▄▄███▀░░░▀▀████▄▄▄███▀
▀▀████▀▀████████▀▀████▀▀
Pages: [1]
  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!