Post
Topic
Board Development & Technical Discussion
Re: How to get Public Key from Wallet Address
by
gsciservices
on 15/04/2021, 20:03:59 UTC
You can only find it if someone has used it on the blockchain, and spent those satoshis. Or you generate it completely randomly yourself(good luck)

#python 2
import time
import requests

addresses = open('addr.txt', 'r').read().split('\n')

for address in addresses:
    if address == '':
        continue

    response = requests.get('https://blockchain.info/q/pubkeyaddr/' + address)
    if response.status_code == 200:
        if response.text != '':
            open('pubkeys.txt', 'a').write(address + ' : ' + response.text+"\n")