Bitcoin Forum
May 08, 2024, 11:05:10 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: ....................  (Read 165 times)
s.o. (OP)
Newbie
*
Offline Offline

Activity: 6
Merit: 0


View Profile
April 22, 2018, 09:03:59 PM
Last edit: May 10, 2018, 11:11:13 PM by s.o.
 #1

.........................................
1715209510
Hero Member
*
Offline Offline

Posts: 1715209510

View Profile Personal Message (Offline)

Ignore
1715209510
Reply with quote  #2

1715209510
Report to moderator
The block chain is the main innovation of Bitcoin. It is the first distributed timestamping system.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1715209510
Hero Member
*
Offline Offline

Posts: 1715209510

View Profile Personal Message (Offline)

Ignore
1715209510
Reply with quote  #2

1715209510
Report to moderator
1715209510
Hero Member
*
Offline Offline

Posts: 1715209510

View Profile Personal Message (Offline)

Ignore
1715209510
Reply with quote  #2

1715209510
Report to moderator
jackg
Copper Member
Legendary
*
Offline Offline

Activity: 2856
Merit: 3071


https://bit.ly/387FXHi lightning theory


View Profile
April 22, 2018, 09:18:57 PM
 #2

The script?

It's the binary of the script as far as I can gather (the script is the field above).
jackg
Copper Member
Legendary
*
Offline Offline

Activity: 2856
Merit: 3071


https://bit.ly/387FXHi lightning theory


View Profile
April 22, 2018, 10:08:02 PM
 #3

The script?

It's the binary of the script as far as I can gather (the script is the field above).


i mean this

v� H�' !�E l;O�q "��


well.. i have something like this and i want to convert it to base64..

how can i do it ?

You can't I don't think. As far as I know "�" is a wildcard that is used when a program can't understand stuff so that might make it impossible to convert it.

Where is your string stored that you want to convert, what is it? Can you send it me.

I can write a quick program to convert something like that if you're interested. You just need to convert every character to string and understand that every character takes up 128 bits and make a string from there.

For example, a simple string like ABC.
Would make A=65, B=66, C=67.
This could then be converted to a long string of:
01000001    01000010    01000011

This would apparently give a decimal value of: 4276803 ("apparently" - because I used an online converter instead).
achow101
Moderator
Legendary
*
Offline Offline

Activity: 3388
Merit: 6631


Just writing some code


View Profile WWW
April 22, 2018, 10:13:25 PM
 #4

A script is a sequence of bytes that gives instructions to the script interpreter. It is not human readable data and attempting to interpret the raw bytes as text as you have done will result in garbage (which is what you are seeing). Typically people examine scripts encoded in hexadecimal or they decode the script into text that represent the opcodes and data provided in the script. The data is usually in hex.

What are you trying to do with the script?

Xynerise
Sr. Member
****
Offline Offline

Activity: 322
Merit: 363

39twH4PSYgDSzU7sLnRoDfthR6gWYrrPoD


View Profile
April 23, 2018, 12:05:44 AM
Last edit: April 23, 2018, 12:23:27 AM by Xynerise
 #5

.

What are you trying to do with the script?
The blockchair.com explorer does that by default.

@OP:
It tries to convert hash160 of bitcoin addresses to ASCII string for cases where people encode data in the blockchain by using "fake" bitcoin addresses.
For example if you view this 'fake' address 17xws5ASGc1dpKYB6jBRnRJGEKEQ4Xq7fy on Blockchair block explorer it will automatically convert the hash160 of the address 4c656e20776173206f757220667269656e642e20 to
Quote
Len was our friend

If it tries to decode that of a "real" bitcoin address then it will rightly output gibberish, as you can see in your address.
starmyc
Full Member
***
Offline Offline

Activity: 198
Merit: 130

Some random software engineer


View Profile
April 23, 2018, 05:02:30 AM
 #6

i mean this

v� H�' !�E l;O�q "��

well.. i have something like this and i want to convert it to base64..
how can i do it ?


This is the transaction output script, which is given in its humanly readable format as well on the same page:

Quote
OP_DUP OP_HASH160 489ac8dd2713218545056c3b4fb0710522aeee0d OP_EQUALVERIFY OP_CHECKSIG

In its hex form:

Quote
76 a9 489ac8dd2713218545056c3b4fb0710522aeee0d 88 ac
(Values taken from https://en.bitcoin.it/wiki/Script

Why would you want to convert it in base64 ?

By the way:

Code:
$ echo -n "76a9489ac8dd2713218545056c3b4fb0710522aeee0d88ac" | xxd -r -p | base64
dqlImsjdJxMhhUUFbDtPsHEFIq7uDYis

$ echo -n dqlImsjdJxMhhUUFbDtPsHEFIq7uDYis | base64 -d | xxd
00000000: 76a9 489a c8dd 2713 2185 4505 6c3b 4fb0  v.H...'.!.E.l;O.
00000010: 7105 22ae ee0d 88ac                      q.".....

Hi, I'm just some random software engineer.
You can check my projects: Bitcoin & altcoin balances/addresses listing dumps: https://balances.crypto-nerdz.org/
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!