<p>I'm using this python script <a href="https://github.com/sebicas/bitcoin-sniffer" rel="nofollow noreferrer">https://github.com/sebicas/bitcoin-sniffer</a></p>

<p>When I see a utx I look at each output and find the <code>scriptPubKey</code></p>

<p>I expected to see something like</p>

<pre><code>"scriptPubKey": {
   "asm": "OP_DUP OP_HASH160 2544bedede7298fe7cedb3fcd0eb5fa73729eb64 OP_EQUALVERIFY OP_CHECKSIG",
   "hex": "76a9142544bedede7298fe7cedb3fcd0eb5fa73729eb6488ac",
   "reqSigs": 1,
   "type": "pubkeyhash",
   "addresses": [
                    "14Q4MdFGqFbP9WPzz3AXjsdxZC68rCQjj1"
                    ]
                }
</code></pre>

<p>but instead I see </p>

<pre><code>"scriptPubKey":v��_/{�/k&gt;//��7`HH��
</code></pre>

<p>Is it binary or encoded or encrypted??</p>

<p>How do I get the information I need from the utx?</p>

<p><strong>I am looking to get asm and hex</strong></p>

CC BY-SA 3.0
2017-02-09T13:22:36.757Z
I don't know much about python, but I've had similar issues with other libs and the solution was to declare it a string.
m1xolyd1an
CC BY-SA 3.0
2017-02-09T13:47:15.023Z
I tried `str(scriptPubKey)` and `v��_/{�/k>//��7`HH��` is exactly what it looks like
Ben Muircroft
<script><utxo>
get utx scriptPubKey to become an object
Ben Muircroft
# get utx scriptPubKey to become an object

(Asked by: username_0 on 2017-02-08)

I'm using this python script <https://github.com/sebicas/bitcoin-sniffer>

When I see a utx I look at each output and find the `scriptPubKey`

I expected to see something like

```
"scriptPubKey": {
   "asm": "OP_DUP OP_HASH160 2544bedede7298fe7cedb3fcd0eb5fa73729eb64 OP_EQUALVERIFY OP_CHECKSIG",
   "hex": "76a9142544bedede7298fe7cedb3fcd0eb5fa73729eb6488ac",
   "reqSigs": 1,
   "type": "pubkeyhash",
   "addresses": [
                    "14Q4MdFGqFbP9WPzz3AXjsdxZC68rCQjj1"
                    ]
                }

```

but instead I see

```
"scriptPubKey":v��_/{�/k>//��7`HH��

```

Is it binary or encoded or encrypted??

How do I get the information I need from the utx?

**I am looking to get asm and hex**

**Tags:** script, utxo

> **Comments:**
> **username_1**: I don't know much about python, but I've had similar issues with other libs and the solution was to declare it a string.  
> **username_0**: I tried `str(scriptPubKey)` and `v��_/{�/k>//��7`HH��` is exactly what it looks like  

---

## 0 answers

