Skip to content

Instantly share code, notes, and snippets.

Avatar

Christopher Gurnee gurnec

  • United States
View GitHub Profile
@gurnec
gurnec / extract-p2pkh.py
Created Dec 13, 2017
extracts unique P2PKH addresses from block files
View extract-p2pkh.py
#!/usr/bin/env python
from __future__ import print_function
import argparse, sys, atexit, hashlib, base64, itertools, struct
from os import path
from btcrecover.addressset import AddressSet, varint
def add(self, address):
pos = self._find(address)
View btcr2john.py
#!/usr/bin/env python
from base64 import *
import sys, struct, zlib
print >> sys.stderr, 'btcrecover extract> ',
key_crc_data = b64decode(raw_input())
key_data = key_crc_data[:-4]
assert key_data[:3] == 'bc:'
@gurnec
gurnec / electrum28-test.py
Last active Aug 15, 2017
Electrum 2.8 password checking with a partial wallet file
View electrum28-test.py
#!/usr/bin/env python
from Crypto.Cipher.AES import new as new_aes, MODE_CBC
import zlib, re, hashlib, base64, random
# The decypted and decompressed wallet should start with one of these two:
EXPECTED_BYTES_1 = b'{\n "'
EXPECTED_BYTES_2 = b'{\r\n "'
EXPECTED_BYTES_LEN = max(len(EXPECTED_BYTES_1), len(EXPECTED_BYTES_2))
You can’t perform that action at this time.