Random bitcoin private key generation in python
#1
The following code will generate random private keys and derive the BTC address for it.

Code:
#!/usr/bin/python
from bitcoin import *

def keying():
priv = random_key()
pub = privtopub(priv)
addr = pubtoaddr(pub)
wifkey = encode_privkey(priv, 'wif')
print wifkey + "," + addr

while True:
   keying()
Reply
#2
(07-16-2018, 01:59 PM)illmanors Wrote: The following code will generate random private keys and derive the BTC address for it.

Code:
#!/usr/bin/python
from bitcoin import *

def keying():
priv = random_key()
pub = privtopub(priv)
addr = pubtoaddr(pub)
wifkey = encode_privkey(priv, 'wif')
print wifkey + "," + addr

while True:
   keying()


did you code it yourself ?
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  [Python] Can't Post To Pastebin? DeepLogic 1 1,826 05-03-2020, 01:01 AM
Last Post: dropzone
  Python check individual characters? Anthrax 4 5,210 10-31-2016, 09:19 PM
Last Post: Anthrax