Skip to content

Instantly share code, notes, and snippets.

@therocco
Last active January 14, 2018 23:52
Show Gist options
  • Save therocco/3353ac056688ab3e0e7e94f7d7f6dc34 to your computer and use it in GitHub Desktop.
Save therocco/3353ac056688ab3e0e7e94f7d7f6dc34 to your computer and use it in GitHub Desktop.
Ufocoin invalid WIF to valid WIF
# In the summer of 2017 the Ufocoin paper wallet
# generator located at www.ufocoin.it was generating
# invalid WIF (wallet import format) keys. The following
# scripts converts those invalid keys to valid keys.
#
# Install pybitcoin as follows:
# pip2 install pybitcoin
class UfocoinPrivateKey(BitcoinPrivateKey):
_pubkeyhash_version_byte = 27
private_key_WIF = input("WIF: ")
private_key_ufo = UfocoinPrivateKey(private_key_WIF)
print(private_key_ufo.to_hex())
print(private_key_ufo.to_wif())
print(private_key_ufo.public_key().address())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment