Bitcoin Forum
October 16, 2018, 09:19:40 AM *
News: Make sure you are not using versions of Bitcoin Core other than 0.17.0 [Torrent], 0.16.3, 0.15.2, or 0.14.3. More info.
 
   Home   Help Search Donate Login Register  
Pages: [1]
  Print  
Author Topic: ....................  (Read 61 times)
s.o.
Newbie
*
Offline Offline

Activity: 6
Merit: 0


View Profile
April 22, 2018, 09:03:59 PM
 #1

.........................................
1539681580
Hero Member
*
Offline Offline

Posts: 1539681580

View Profile Personal Message (Offline)

Ignore
1539681580
Reply with quote  #2

1539681580
Report to moderator
1539681580
Hero Member
*
Offline Offline

Posts: 1539681580

View Profile Personal Message (Offline)

Ignore
1539681580
Reply with quote  #2

1539681580
Report to moderator
1539681580
Hero Member
*
Offline Offline

Posts: 1539681580

View Profile Personal Message (Offline)

Ignore
1539681580
Reply with quote  #2

1539681580
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1539681580
Hero Member
*
Offline Offline

Posts: 1539681580

View Profile Personal Message (Offline)

Ignore
1539681580
Reply with quote  #2

1539681580
Report to moderator
1539681580
Hero Member
*
Offline Offline

Posts: 1539681580

View Profile Personal Message (Offline)

Ignore
1539681580
Reply with quote  #2

1539681580
Report to moderator
jackg
Copper Member
Legendary
*
Offline Offline

Activity: 1162
Merit: 1111


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: 1162
Merit: 1111


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: 1554
Merit: 1700


3F1Y9yquzvY6RWvKbw2n2zeo9V5mvBhADU


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: 280
Merit: 280

39twH4PSYgDSzU7sLnRoDfthR6gWYrrPoD


View Profile
April 23, 2018, 12:05:44 AM
 #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
Member
**
Offline Offline

Activity: 193
Merit: 85

Software engineer


View Profile WWW
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.".....

Software engineer.
Tip me if you find my help useful: 3QBRMM2CLUTd7hqL4T9Ja2wy6B1VkbXyZ3
Pages: [1]
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!