Embedded in this transaction, there is a blockchain file upload tool written in Python.
I'm trying to convert the hex of the output scripts to ASCII, so I can assemble it all into an actual runnable Python script. However doing a direct hex to ASCII conversion generates some unexpected characters.
For example, the third output script has the following hex:
51412c756e6865786c6966790a66726f6d20646563696d616c20696d706f727420446563696d616c0a0a6966206c656e287379732e6172677629203c20353a0a20202041207072696e74285c0a2222225c0a55736167653a202573203c66696c653e203c6465737420616464723e203c6465737420616d6f756e743e207b3c6665652d706541722d6b623e7d0a0a5365742042544352504355524c3d687474703a2f2f757365723a70617373406c6f63616c686f73743a706f72746e756d22222220252073797353ae
Using a hex to ASCII converter, it becomes this Python code:
QA,unhexlify
from decimal import Decimal
if len(sys.argv) < 5:
A print(\
"""\
Usage: %s <file> <dest addr> <dest amount> {<fee-peAr-kb>}
Set BTCRPCURL=http://user:pass@localhost:portnum""" % sysS.
Why is the character A
preceding print
for no reason? As well as QA
and S
at the beginning and ends, respectively?
From what I've seen referenced on the Web, the third output script is meant to look like this:
,unhexlify
from decimal import Decimal
if len(sys.argv) < 5:
print(\
"""\
Usage: %s <file> <dest addr> <dest amount> {<fee-per-kb>}
Set BTCRPCURL=http://user:pass@localhost:portnum""" % sys.
What am I missing here? I'm completely new to Bitcoin, so I'm guessing it's something obvious.