[GH-ISSUE #1595] bitcoin2john.py #1045

Closed
opened 2026-10-14 03:33:03 +07:00 by bsakaguchi · 6 comments
Owner

Originally created by @whitj00 on GitHub (Jul 31, 2015).
Original GitHub issue: https://github.com/openwall/john/issues/1595

Every single time I'm just getting this..

" ERROR:root:Couldn't open wallet.dat/main. Try quitting Bitcoin and running this again."

I have tried it on windows and linux VM..

I have completely stopped bitcoin core, copied the wallet.dat to a new location.. tried everything possible with the same result.. I change some of the code to show this error

r = db.open(walletfile, "main", DB_BTREE, flags)

bsddb.db.DBInvalidArgError: (22, 'Invalid argument -- C:\Users\x3\AppData\Roaming\Bitcoin\new\bitcoin2john.py: unexpected file type or format')

Command I'm using

C:\Users\x3\AppData\Roaming\Bitcoin\new>bitcoin2john.py wallet.dat

wallet.dat is in the new folder..

I am using python 2.7

Originally created by @whitj00 on GitHub (Jul 31, 2015). Original GitHub issue: https://github.com/openwall/john/issues/1595 Every single time I'm just getting this.. " ERROR:root:Couldn't open wallet.dat/main. Try quitting Bitcoin and running this again." I have tried it on windows and linux VM.. I have completely stopped bitcoin core, copied the wallet.dat to a new location.. tried everything possible with the same result.. I change some of the code to show this error ``` r = db.open(walletfile, "main", DB_BTREE, flags) ``` bsddb.db.DBInvalidArgError: (22, 'Invalid argument -- C:\Users\x3\AppData\Roaming\Bitcoin\new\bitcoin2john.py: unexpected file type or format') Command I'm using C:\Users\x3\AppData\Roaming\Bitcoin\new>bitcoin2john.py wallet.dat wallet.dat is in the new folder.. I am using python 2.7
Author
Owner

@magnumripper commented on GitHub (Aug 3, 2015):

@kholia?

<!-- gh-comment-id:127091794 --> @magnumripper commented on GitHub (Aug 3, 2015): @kholia?
Author
Owner

@kholia commented on GitHub (Aug 3, 2015):

@whitj00 do you have a sample "wallet.dat" file which clearly exhibits this problem?

If not, I won't be able to debug this for a long long while.

<!-- gh-comment-id:127359328 --> @kholia commented on GitHub (Aug 3, 2015): @whitj00 do you have a sample "wallet.dat" file which clearly exhibits this problem? If not, I won't be able to debug this for a long long while.
Author
Owner

@whitj00 commented on GitHub (Aug 6, 2015):

Every wallet.dat... I have asked friends to try and every one of them has the same problem.

<!-- gh-comment-id:128462383 --> @whitj00 commented on GitHub (Aug 6, 2015): Every wallet.dat... I have asked friends to try and every one of them has the same problem.
Author
Owner

@kholia commented on GitHub (Aug 7, 2015):

@whitj00 this should be fixed now, thanks for reporting! 👍

<!-- gh-comment-id:128746329 --> @kholia commented on GitHub (Aug 7, 2015): @whitj00 this should be fixed now, thanks for reporting! :+1:
Author
Owner

@magnumripper commented on GitHub (Aug 7, 2015):

Wow that was easy. Thanks @kholia!

<!-- gh-comment-id:128773180 --> @magnumripper commented on GitHub (Aug 7, 2015): Wow that was easy. Thanks @kholia!
Author
Owner

@jerry4free commented on GitHub (Jan 1, 2018):

I also encounter this problem on macOS today, every wallet.dat. I was using pywallet. How was it fixed?@ @kholia

<!-- gh-comment-id:354639450 --> @jerry4free commented on GitHub (Jan 1, 2018): I also encounter this problem on macOS today, every wallet.dat. I was using pywallet. How was it fixed?@ @kholia
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
openwall/john#1045
No description provided.