[GH-ISSUE #339] run/bitcoin2john.py uses bsddb which has been deprecated from python for a while. #81

Closed
opened 2026-10-14 02:51:42 +07:00 by bsakaguchi · 12 comments
Owner

Originally created by @MarcT on GitHub (Jun 27, 2013).
Original GitHub issue: https://github.com/openwall/john/issues/339

run/bitcoin2john.py uses bsddb which has been deprecated from python for a while.
bsddb was replaced by bsddb3, but making this change does not resolve the issues. After changing to the correct bsddb, you the the following error when trying to open the wallet.dat

{'type': 'orderposnext', 'value': '\x03\x00\x00\x00\x00\x00\x00\x00', 'key': '\x0corderposnext'}
Segmentation fault

Originally created by @MarcT on GitHub (Jun 27, 2013). Original GitHub issue: https://github.com/openwall/john/issues/339 run/bitcoin2john.py uses bsddb which has been deprecated from python for a while. bsddb was replaced by bsddb3, but making this change does not resolve the issues. After changing to the correct bsddb, you the the following error when trying to open the wallet.dat {'**type**': 'orderposnext', '**value**': '\x03\x00\x00\x00\x00\x00\x00\x00', '**key**': '\x0corderposnext'} Segmentation fault
Author
Owner

@kholia commented on GitHub (Jun 27, 2013):

@MarcT What OS are you running? Do you have a share-able sample wallet.dat file which causes this crash?

<!-- gh-comment-id:20102922 --> @kholia commented on GitHub (Jun 27, 2013): @MarcT What OS are you running? Do you have a share-able sample wallet.dat file which causes this crash?
Author
Owner

@MarcT commented on GitHub (Jun 27, 2013):

Linux, Gentoo/Funtoo to be specific.
I have 2 that segfault, but only one provides that error. The one that has the error is the one I'm trying to recover.
If you want, I can send them both to you off github.

<!-- gh-comment-id:20116693 --> @MarcT commented on GitHub (Jun 27, 2013): Linux, Gentoo/Funtoo to be specific. I have 2 that segfault, but only one provides that error. The one that has the error is the one I'm trying to recover. If you want, I can send them both to you off github.
Author
Owner

@kholia commented on GitHub (Jun 27, 2013):

@MarcT yes, please mail the files to "dhiru [at] openwalll [dot] com".

<!-- gh-comment-id:20120897 --> @kholia commented on GitHub (Jun 27, 2013): @MarcT yes, please mail the files to "dhiru [at] openwalll [dot] com".
Author
Owner

@kholia commented on GitHub (Jun 28, 2013):

This turned out to be some system specific (or Gentoo / Funtoo) problem. bitcoin2john.py runs fine on "sane" systems.

<!-- gh-comment-id:20191609 --> @kholia commented on GitHub (Jun 28, 2013): This turned out to be some system specific (or Gentoo / Funtoo) problem. bitcoin2john.py runs fine on "sane" systems.
Author
Owner

@MarcT commented on GitHub (Jun 28, 2013):

Not system specific.
Just installed Fedora 19 like you got the same failure.

[root@localhost run]# ./bitcoin2john.py ~/BTC\ Wallet\ -\ Forgot\ Passphrase.dat
{'type': 'orderposnext', 'value': '\x03\x00\x00\x00\x00\x00\x00\x00', 'key': '\x0corderposnext'}
Segmentation fault (core dumped)
[root@localhost run]# python --version
Python 2.7.4
[root@localhost run]# uname -a
Linux localhost.localdomain 3.9.2-301.fc19.x86_64 #1 SMP Mon May 13 12:36:24 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux

This is a base Fedora 19 install with only git installed.

python[2218]: segfault at 40bfd92c ip 00007fb94092725a sp 00007fffe7510820 error 4 in libcrypto.so.1.0.1e[7fb940857000+19b000]

Updated to python 2.7.5, same failure.

Incidentally, this is the error in the log on my Funtoo box:

bitcoin2john.py[21525]: segfault at 4e3d8788 ip 00007fce4e10792a sp 00007fff3aae2540 error 4 in libcrypto.so.1.0.0[7fce4e00e000+1bf000]

<!-- gh-comment-id:20195139 --> @MarcT commented on GitHub (Jun 28, 2013): Not system specific. Just installed Fedora 19 like you got the same failure. [root@localhost run]# ./bitcoin2john.py ~/BTC\ Wallet\ -\ Forgot\ Passphrase.dat {'**type**': 'orderposnext', '**value**': '\x03\x00\x00\x00\x00\x00\x00\x00', '**key**': '\x0corderposnext'} Segmentation fault (core dumped) [root@localhost run]# python --version Python 2.7.4 [root@localhost run]# uname -a Linux localhost.localdomain 3.9.2-301.fc19.x86_64 #1 SMP Mon May 13 12:36:24 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux This is a base Fedora 19 install with only git installed. python[2218]: segfault at 40bfd92c ip 00007fb94092725a sp 00007fffe7510820 error 4 in libcrypto.so.1.0.1e[7fb940857000+19b000] Updated to python 2.7.5, same failure. Incidentally, this is the error in the log on my Funtoo box: bitcoin2john.py[21525]: segfault at 4e3d8788 ip 00007fce4e10792a sp 00007fff3aae2540 error 4 in libcrypto.so.1.0.0[7fce4e00e000+1bf000]
Author
Owner

@kholia commented on GitHub (Jun 28, 2013):

Do a "git pull" and make sure that you are using bleeding-jumbo branch.

Do commits fbc05eac53 and 56317168e4 fix your problems?

I have removed the "passphrase" option. You are supposed to use JtR for the actual cracking.

<!-- gh-comment-id:20198008 --> @kholia commented on GitHub (Jun 28, 2013): Do a "git pull" and make sure that you are using bleeding-jumbo branch. Do commits fbc05eac5379f7ab8f145b7d1fee4d85c1fce6cc and 56317168e4fb1540e0b9149d34626c95954caa10 fix your problems? I have removed the "passphrase" option. You are supposed to use JtR for the actual cracking.
Author
Owner

@MarcT commented on GitHub (Jun 28, 2013):

That works

<!-- gh-comment-id:20198547 --> @MarcT commented on GitHub (Jun 28, 2013): That works
Author
Owner

@kholia commented on GitHub (Jun 28, 2013):

@MarcT great! were you able to recover your password?

If not, you might also want to take a look at https://bitbucket.org/dhiru/rexgen-fixed for generating passwords since this format is extremely slow.

<!-- gh-comment-id:20198716 --> @kholia commented on GitHub (Jun 28, 2013): @MarcT great! were you able to recover your password? If not, you might also want to take a look at https://bitbucket.org/dhiru/rexgen-fixed for generating passwords since this format is extremely slow.
Author
Owner

@MarcT commented on GitHub (Jun 28, 2013):

Not yet. Still learning how to run john, but now that the bitcoin wallet is able to be read, it should be able to get going.

<!-- gh-comment-id:20199598 --> @MarcT commented on GitHub (Jun 28, 2013): Not yet. Still learning how to run john, but now that the bitcoin wallet is able to be read, it should be able to get going.
Author
Owner

@MarcT commented on GitHub (Jun 30, 2013):

Seems to be working, chugging away trying to crack my pass phrase. Since I have no idea what it might have been, it might take a while. Any chance we can get cuda working with bitcoin?

<!-- gh-comment-id:20241885 --> @MarcT commented on GitHub (Jun 30, 2013): Seems to be working, chugging away trying to crack my pass phrase. Since I have no idea what it might have been, it might take a while. Any chance we can get cuda working with bitcoin?
Author
Owner

@kholia commented on GitHub (Jun 30, 2013):

@ukasz any comments on the CUDA / OpenCL request?

<!-- gh-comment-id:20241919 --> @kholia commented on GitHub (Jun 30, 2013): @ukasz any comments on the CUDA / OpenCL request?
Author
Owner

@magnumripper commented on GitHub (Jan 27, 2014):

That would be a separate issue

<!-- gh-comment-id:33430728 --> @magnumripper commented on GitHub (Jan 27, 2014): That would be a separate issue
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#81
No description provided.