diff options
| author | Nsable-sh <nsable-sh@noreply.git.bitflash.network> | 2026-08-11 14:47:35 -0300 |
|---|---|---|
| committer | Nsable-sh <nsable-sh@noreply.git.bitflash.network> | 2026-08-11 14:47:35 -0300 |
| commit | caa6a9668fc2b2ed1192f7ebdc0b78621f45898d (patch) | |
| tree | ce72921d72611dab1aafb78521b68da0fd11383d /scripts/build-explorer.py | |
| parent | 1839347459759fb3b23cc747ec4368b724fee008 (diff) | |
tools: address audit follow-ups
Diffstat (limited to 'scripts/build-explorer.py')
| -rwxr-xr-x | scripts/build-explorer.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/scripts/build-explorer.py b/scripts/build-explorer.py index 0d86b3c..97a7f4e 100755 --- a/scripts/build-explorer.py +++ b/scripts/build-explorer.py | |||
| @@ -35,7 +35,10 @@ def hash160(b): | |||
| 35 | 35 | ||
| 36 | 36 | ||
| 37 | def spk_info(script_hex): | 37 | def spk_info(script_hex): |
| 38 | spk = bytes.fromhex(script_hex) | 38 | try: |
| 39 | spk = bytes.fromhex(script_hex) | ||
| 40 | except ValueError: | ||
| 41 | return {"type": "malformed", "hex": script_hex[:80]} | ||
| 39 | if ( | 42 | if ( |
| 40 | len(spk) == 25 and spk[0] == 0x76 and spk[1] == 0xA9 | 43 | len(spk) == 25 and spk[0] == 0x76 and spk[1] == 0xA9 |
| 41 | and spk[2] == 0x14 and spk[23] == 0x88 and spk[24] == 0xAC | 44 | and spk[2] == 0x14 and spk[23] == 0x88 and spk[24] == 0xAC |