free web page hit counter
A script to download the Bitcoin whitepaper from the Bitcoin blockchain

A script to download the Bitcoin whitepaper from the Bitcoin blockchain

Bitcoin Reddit

More / Bitcoin Reddit 105 Views

Use this Python script to extract the Bitcoin whitepaper from the Bitcoin blockchain. It requires bitcoin-cli, which you should have if you are running a full node.

import subprocess wptrans = subprocess.check_output(["bitcoin-cli", "getrawtransaction", "54e48e5f5c656b26c3bca14a8c95aa583d07ebe84dde3b7dd4a78f4e4186e713"]) outputs = wptrans.split("0100000000000000") wppdf = "" for output in outputs[1:-2]: cur = 6 wppdf += output[cur:cur+130].decode('hex') cur += 132 wppdf += output[cur:cur+130].decode('hex') cur += 132 wppdf += output[cur:cur+130].decode('hex') wppdf += outputs[-2][6:-4].decode("hex") f = open("bitcoin.pdf", "wb") f.write(wppdf[8:]) f.close() 
submitted by /u/Raystonn
[link] [comments]

Comments