Are you able to take a screenshot of the command you're entering and the output and then upload it to an image hosting service (like imgur.com or lightshot)?
It was the Bitcointalk forum that inspired us to create Bitcointalksearch.org - Bitcointalk is an excellent site that should be the default page for anybody dealing in cryptocurrency, since it is a virtual gold-mine of data. However, our experience and user feedback led us create our site; Bitcointalk's search is slow, and difficult to get the results you need, because you need to log in first to find anything useful - furthermore, there are rate limiters for their search functionality.
The aim of our project is to create a faster website that yields more results and faster without having to create an account and eliminate the need to log in - your personal data, therefore, will never be in jeopardy since we are not asking for any of your data and you don't need to provide them to use our site with all of its capabilities.
We created this website with the sole purpose of users being able to search quickly and efficiently in the field of cryptocurrency so they will have access to the latest and most accurate information and thereby assisting the crypto-community at large.
pip install bitcoinlib
python corrupt_wif.py
pip install bitcoinlib
python corrupt_wif.py
pip install bitcoinlib
python corrupt_wif.py
import bitcoin.base58
from bitcoin.core import b2x, x
from bitcoin.wallet import CBitcoinSecret, P2PKHBitcoinAddress
from bitcoin.core import Hash
def insert_char(string, char, i):
return string[:i+1]+char+string[i+1:]
def verify_wif_checksum(wif):
byte_string = b2x(bitcoin.base58.decode(wif))
private = byte_string[:-8]
checksum = byte_string[-8:]
return checksum == b2x(Hash(x(private)))[:8]
def candidate_wifs(corrupted_wif):
candidates = []
for i in range(len(corrupted_wif)):
for char in bitcoin.base58.B58_DIGITS:
candidate_wif = insert_char(corrupted_wif, char, i)
if verify_wif_checksum(candidate_wif):
candidates.append(candidate_wif)
return candidates
# Provide a WIF private key with a single missing character.
corrupted_wif = '5HueCGU8rMjxEXxiPuD5BDku4kFqeZyd4dZ1jvhTVqvbTLvyTJ'
# Should be: '5HueCGU8rMjxEXxiPuD5BDku4MkFqeZyd4dZ1jvhTVqvbTLvyTJ'
for candidate_wif in candidate_wifs(corrupted_wif):
print(candidate_wif)
import bitcoin.base58
from bitcoin.core import b2x, x
from bitcoin.core import Hash
import sys
def replace_char(string, char, i):
return string[:i]+char+string[i+1:]
def insert_char(string, char, i):
return string[:i+1]+char+string[i+1:]
def verify_wif_checksum(wif):
byte_string = b2x(bitcoin.base58.decode(wif))
private = byte_string[:-8]
checksum = byte_string[-8:]
return checksum == b2x(Hash(x(private)))[:8]
def candidate_wifs(corrupted_wif):
candidates = set()
for i in range(len(corrupted_wif)):
#print("%i of %i" % (i, len(corrupted_wif)),)
sys.stdout.write("%3i of %3i : " % (i, len(corrupted_wif)))
for char in bitcoin.base58.B58_DIGITS:
sys.stdout.write(char)
candidate_wif = replace_char(corrupted_wif, char, i)
for c in insertion_candidates(candidate_wif):
candidates.add(c)
print()
return candidates
def insertion_candidates(corrupted_wif):
candidates = []
for i in range(len(corrupted_wif)):
for char in bitcoin.base58.B58_DIGITS:
candidate_wif = insert_char(corrupted_wif, char, i)
if verify_wif_checksum(candidate_wif):
print("\nFound: %s" % candidate_wif)
candidates.append(candidate_wif)
return candidates
# Provide a WIF private key with a single missing character.
# Wrong Char v
corrupted_wif = '5HueCGU8rkjxEXxiPuD5BDku4kFqeZyd4dZ1jvhTVqvbTLvyTJ'
# Should be: '5HueCGU8rMjxEXxiPuD5BDku4MkFqeZyd4dZ1jvhTVqvbTLvyTJ'
# Missing Char ^
for candidate_wif in candidate_wifs(corrupted_wif):
print(candidate_wif)