Bitcoin Forum
June 27, 2024, 07:34:16 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Urandom2Wif  (Read 1863 times)
flatfly (OP)
Legendary
*
Offline Offline

Activity: 1078
Merit: 1016

760930


View Profile
November 18, 2013, 08:43:00 PM
Last edit: January 22, 2014, 10:23:24 PM by flatfly
 #1

I'm in a scripting mood... So here's another very small Python script which just converts any 256-bit private key (passed as a Hex string) to the corresponding WIF key and BTC address.   Either pass such a number as an argument to the script (see screenshot) or just run it with no arguments to feed it with 256 crypto-secure bits from /dev/urandom.

The output can be also be used to cross-check results with websites such as bitaddress.org or brainwallet.org.

Confirmed to run fine on Windows (all editions), Mac, Linux, Raspberry Pi, and Android.


Code:
#Urandom2Wif by flatfly - requires ecdsa (sudo pip install ecdsa)

EDIT: see https://bitcointalk.org/index.php?topic=424691.0

More info about the WIF format: https://en.bitcoin.it/wiki/Wallet_import_format
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!