Skip to content

Instantly share code, notes, and snippets.

@mocacinno
mocacinno / bitwalletrecover.py
Created October 17, 2017 11:52 — forked from msm595/bitwalletrecover.py
bitwalletrecover.py - recover compressed private keys from your bitcoin wallet. Requires python3, pycoin (https://pypi.python.org/pypi/pycoin), and base58 (https://pypi.python.org/pypi/base58).
import re
import hashlib
import base58
from pycoin.ecdsa import generator_secp256k1, public_pair_for_secret_exponent
def bytetohex(byteStr):
return ''.join( [ "%02X" % x for x in byteStr ] ).strip()
litecoin = [b"\x30", b"\xb0"]
bitcoin = [b"\x00", b"\x80"]

Keybase proof

I hereby claim:

  • I am mocacinno on github.
  • I am mocacinno (https://keybase.io/mocacinno) on keybase.
  • I have a public key whose fingerprint is E633 2440 C530 8609 9B38 5055 5ABD 41A2 5588 B3CD

To claim this, I am signing this object: