Bitcoin Forum
October 16, 2019, 08:37:28 PM *
News: Latest Bitcoin Core release: 0.18.1 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1] 2 »  All
  Print  
Author Topic: [Userscript] print balance of address - v0.4  (Read 418 times)
babo
Legendary
*
Offline Offline

Activity: 1932
Merit: 1231


View Profile WWW
June 25, 2019, 01:00:12 PM
Last edit: July 01, 2019, 08:02:38 AM by babo
Merited by redsn0w (5), hugeblack (2), Halab (2), Cyrus (1), Quickseller (1), LoyceV (1), iasenko (1), sncc (1), giammangiato (1)
 #1

hello there

https://github.com/blackout314/greasemoney-btctalk_btcbalance/tree/master

automatic push a image of balance of address

i used this service http://btc-priceimg.herokuapp.com/

for print image Smiley

i hope is usefull for community




CHANGELOG
v0.4 - https://github.com/blackout314/greasemoney-btctalk_btcbalance/releases/tag/0.4
- support bcxxxx addresses (change img delivery service)

v0.3 - https://github.com/blackout314/greasemoney-btctalk_btcbalance/releases/tag/0.3
- improved regex

v0.2 - https://github.com/blackout314/greasemoney-btctalk_btcbalance/releases/tag/0.2
- fix bug in post new reply page

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

Posts: 1571258248

View Profile Personal Message (Offline)

Ignore
1571258248
Reply with quote  #2

1571258248
Report to moderator
hd49728
Sr. Member
****
Offline Offline

Activity: 420
Merit: 366


Match365> be a part of 150BTC inviting bonus


View Profile
June 25, 2019, 01:44:14 PM
 #2

Thank you, and welcome to my list.
Added newest userscript.
TopicDatewritten bySectionMerit
_________________________________________________________________________________________________________________________
print balance of address - v0.125/6/2019babocheck address balance0+

▄▄██████████████████▄▄
▄████████████████████████▄
▄██████████████████████████▄
████████████████████████████
████████████████████████████
████████████████████████████
████████████████████████████
███████████████████████████
████████████████████████████
████████████████████████████
████████████████████████████
▀██████████████████████████▀
▀████████████████████████▀
▀▀██████████████████▀▀
.Match365            ▄▄█▀▀▀▀▀█▄▄
         ▄█▀ ██▀█▄█▀ ██▀█▄
        ██    ████    █████▄
      ▄█  █     ▄█▄     █  █▄
      █ ▄█▀▀▀▄▄▀ ██▀▄▄▀▀▀█▄ █
      ██▀   ██▀▄  ▄▀   ██▀██
      ▄█     ██▄█▀▀█▄    ██▐█
    ▄█▀▀█▄▄▄▄ █▀  ██▀█ ▄▄▄▄█
  ▄█▀   ▀█▄  ▀█    ███▀ ▄█▀
▄█▀   ▄▄   ▀█▄▄█    █▄▄▀▀
    ▄█▀      ▄█▀▀▀▀▀▀
  ▄█▀      ▄█▀
▄█▀       ▀▀
.Earn $1,500,000 Inviting Bonus.
.Easy Bitcoin Soccer Prediction......

██████
███▀▀▀
███
███
███
███
███
███
███
███
███
███▄▄▄
██████
DOWNLOAD
█ ████  ON
            ▄▄██
           ████▀
          ███▀
  ▄▄████▄▄  ▄▄█████▄
 ██████████████████▀
██████████████████
█████████████████▌
█████████████████▌
▀█████████████████▄
 ███████████████████
  ██████████████████
   ▀██████▀▀██████▀
      ▀▀▀    ▀▀▀
▄ ▀█▄▄
██▄ ▀███▄
████▄ ▀████▄▄
██████▄ ▀██████▄
████████▄ ▀███▀ ▄█▄▄
██████████▄ ▀ ▄███████▄
██████████▀ ▄ ▀███████▀
████████▀ ▄███▄ ▀██▀
██████▀ ▄███████
████▀ ▄██████▀▀
██▀ ▄████▀▀
▀ ▄██▀▀
 ▀▀

██████
▀▀▀███
   ███
   ███
   ███
   ███
   ███
   ███
   ███
   ███
   ███
▄▄▄███
██████
babo
Legendary
*
Offline Offline

Activity: 1932
Merit: 1231


View Profile WWW
June 26, 2019, 08:01:44 AM
 #3

i found little bug when you send reply
i fix asap with a little trick, i place 'post reply' in blacklist of script (script not work)

let me work on it

babo
Legendary
*
Offline Offline

Activity: 1932
Merit: 1231


View Profile WWW
June 27, 2019, 12:30:02 PM
 #4

released with bugfix

https://github.com/blackout314/greasemoney-btctalk_btcbalance/releases/tag/0.2

now new post link is escluded

Xal0lex
Staff
Hero Member
*****
Offline Offline

Activity: 784
Merit: 975


https://blockchain.com.do


View Profile
June 27, 2019, 03:04:38 PM
 #5

SegWit addresses don't work  Sad



██   ██   ██████████

  ██   █████████████

   ██   ████████████

 ██   ██   █████████

   ██   ████████████

      ██   █████████
██████  ██
██
██
██
██
██
██
██
██
██
██
██
██████  ██
.Blockchain.com.do.██  ██████
        ██
        ██
        ██
        ██
        ██
        ██
        ██
        ██
        ██
        ██
        ██
██  ██████
      ▄▄▄▄▄▄▄▄▄▄▄▄▄
▀ ▀ ▀▀█   █       █▄
 ▀ ▀▀▀█▄▄▀      ▄█ ▄▀█▄
   ▀ ▀█▄▄       ██ ▄▀██▀▄
  ▀ ▀▀█  ▀▄      ▀▄▄█▀   ▀▄
 ▀▀ ▀ █▄▄▄█▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄█▄
 ▄▄▄▄▄▄▄▄▄▄▄      █▄▄▄▄▄▄▄▄▄█
 █▄▄▄▄▄▄▄▄▄█▄▄▄▄▄▄▄▄▄▄▄▄
  ▀▄     ▄▄▄       █   █▀▀ ▀ ▀
    ▀▄ ▄█ ▄▄█▄      ▀▄▄█▀▀▀ ▀
      ▀██▄▄ ██       ▄▄█▀ ▀
        ▀▄▄▄▀      ▄▀  █▀▀ ▀
          ▀▄▄▄▄▄▄▄▄█▄▄▄█ ▀ ▀▀
██████  ██
██
██
██
██
██
██
██
██
██
██
██
██████  ██
.Exchange Bitcoin Quickly.██  ██████
        ██
        ██
        ██
        ██
        ██
        ██
        ██
        ██
        ██
        ██
        ██
██  ██████




██████████   ██   ██

█████████████   ██

████████████   ██

█████████   ██   ██

████████████   ██

█████████   ██
khaled0111
Hero Member
*****
Offline Offline

Activity: 854
Merit: 574


WOLF.BET - Provably Fair Dice Game


View Profile
June 27, 2019, 03:28:28 PM
 #6

SegWit addresses don't work  Sad
Because the script uses blockchain.info's API which does not support segwit.

.WOLF.BET.
▀  ▀▀▀▀▀▀
  ▀ ▀▀▀
 ▄ ▄▄▄   
  ▄ ▄▄▄
▄  ▄▄▄▄▄▄
        ▄▄▄▀▀▀▀▄▄▄
    ▄███▌        ▀▀▄
  ▄▀   ▐█████████▄  ▀▄
 ▄▀  ▄█████████████▄  █
 ▌  █████████████████  █
▐  ████████████████ ▄█
█  █████████████████████▌
▐  ██████████████████ ▀█▌
 ▌ ▐█████████████████▌ ▐▀
 █  ██████████████▀ ▄▀
  █   ███████████▀  ▄▀
   ▀▄▄██ ▀▀▀▀▀▀▀  ▄▄▀
     ▀██▄▄▄▄▄▄▄▄▀▀▀
▄███████████▄
███████    ████████████▄
███████    ███████   ▀██
██████████████████    ██
██    ██████████████████
██    ███████    ███████
█████████████    ███████
███████    █████████████
███████    ███████    ██
██████████████████   ▄██
██        ▀███████████▀
██
██
      ▄█▄         ▄█▄
 ▄██ ███ ███████ ███ ██▄
▐███▄ ▀ ▄███████▄ ▀ ▄███▌
▐█▌▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▐█▌
▐█▌   ▄▄▄▄▄▄▄▄        ▐█▌
▐█▌   ████████        ▐█▌
▐█▌       ███     ▄▄▀▀▀██▄
▐█▌      ███    ██▀      ▀█
▐█▌     ███    ███         █
▐█▌    ███     ███          █
 ██▄           ███▄         █
  ▀█████████████████▄     ▄█
                  ▀▀█████▀▀

████
██
██
██
██
██
██
██
██
██
██
████


.AFFILIATE PROGRAM.
   ...FREE FAUCET........
..CHAT RAIN.............
babo
Legendary
*
Offline Offline

Activity: 1932
Merit: 1231


View Profile WWW
June 27, 2019, 03:55:18 PM
 #7

SegWit addresses don't work  Sad




ok thank you for your issue
tomorrow i will fix it and release 0.3

thank you

Jet Cash
Legendary
*
Offline Offline

Activity: 1400
Merit: 1769


Trying to preserve our heritage.


View Profile WWW
June 27, 2019, 03:59:10 PM
 #8

Thank goodness I use multiple addresses and wallets.

What is this old tool?  -  Click here to visit Fit to Talk

I've added some more Bitcoin music to Bitcoin Tunes
pooya87
Legendary
*
Offline Offline

Activity: 1792
Merit: 1968


Remember tonight for it's the beginning of forever


View Profile
June 28, 2019, 04:16:20 AM
 #9

you might want to add some more encoding checks (base58 and bech32 if you could add it) to the values you capture as "addresses" instead of a simple regex check for characters. right now it seems like it is possible to catch something like a transaction ID that starts with 1 or 3 (32 byte and having 0-9 and a-f) as an address.

babo
Legendary
*
Offline Offline

Activity: 1932
Merit: 1231


View Profile WWW
June 28, 2019, 06:05:37 AM
 #10

you might want to add some more encoding checks (base58 and bech32 if you could add it) to the values you capture as "addresses" instead of a simple regex check for characters. right now it seems like it is possible to catch something like a transaction ID that starts with 1 or 3 (32 byte and having 0-9 and a-f) as an address.

We can
Transactions? Do you have a regex ready?
Today i'll fix and ehance it

khaled0111
Hero Member
*****
Offline Offline

Activity: 854
Merit: 574


WOLF.BET - Provably Fair Dice Game


View Profile
June 28, 2019, 05:51:25 PM
 #11

Transactions? Do you have a regex ready?
try this one:
Code:
^([13][a-km-zA-HJ-NP-Z1-9]{25,34}|bc1[ac-hj-np-zAC-HJ-NP-Z02-9]{11,71})$
I found it here:
http://mokagio.github.io/tech-journal/2014/11/21/regex-bitcoin.html

You can also verify whether the address is valid or not by checking its checksum.

.WOLF.BET.
▀  ▀▀▀▀▀▀
  ▀ ▀▀▀
 ▄ ▄▄▄   
  ▄ ▄▄▄
▄  ▄▄▄▄▄▄
        ▄▄▄▀▀▀▀▄▄▄
    ▄███▌        ▀▀▄
  ▄▀   ▐█████████▄  ▀▄
 ▄▀  ▄█████████████▄  █
 ▌  █████████████████  █
▐  ████████████████ ▄█
█  █████████████████████▌
▐  ██████████████████ ▀█▌
 ▌ ▐█████████████████▌ ▐▀
 █  ██████████████▀ ▄▀
  █   ███████████▀  ▄▀
   ▀▄▄██ ▀▀▀▀▀▀▀  ▄▄▀
     ▀██▄▄▄▄▄▄▄▄▀▀▀
▄███████████▄
███████    ████████████▄
███████    ███████   ▀██
██████████████████    ██
██    ██████████████████
██    ███████    ███████
█████████████    ███████
███████    █████████████
███████    ███████    ██
██████████████████   ▄██
██        ▀███████████▀
██
██
      ▄█▄         ▄█▄
 ▄██ ███ ███████ ███ ██▄
▐███▄ ▀ ▄███████▄ ▀ ▄███▌
▐█▌▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▐█▌
▐█▌   ▄▄▄▄▄▄▄▄        ▐█▌
▐█▌   ████████        ▐█▌
▐█▌       ███     ▄▄▀▀▀██▄
▐█▌      ███    ██▀      ▀█
▐█▌     ███    ███         █
▐█▌    ███     ███          █
 ██▄           ███▄         █
  ▀█████████████████▄     ▄█
                  ▀▀█████▀▀

████
██
██
██
██
██
██
██
██
██
██
████


.AFFILIATE PROGRAM.
   ...FREE FAUCET........
..CHAT RAIN.............
babo
Legendary
*
Offline Offline

Activity: 1932
Merit: 1231


View Profile WWW
June 28, 2019, 06:07:07 PM
 #12

try this one:
Code:
^([13][a-km-zA-HJ-NP-Z1-9]{25,34}|bc1[ac-hj-np-zAC-HJ-NP-Z02-9]{11,71})$
I found it here:
http://mokagio.github.io/tech-journal/2014/11/21/regex-bitcoin.html

You can also verify whether the address is valid or not by checking its checksum.


thank you so much, today i dont have spare time for update it, i'll try tomorrow
is a simple regex sobstitution for catch bc1xxxx address

and after i'll study a method for TX

pooya87
Legendary
*
Offline Offline

Activity: 1792
Merit: 1968


Remember tonight for it's the beginning of forever


View Profile
June 29, 2019, 03:40:34 AM
 #13

regex is not enough since it can only check validity of characters. i don't know how JavaScript works but basically you need to add a function instead of that one liner to decode the strings using Base58 encode/decode technique which would mean converting it to its numerical value then hashing the byte array using SHA256 twice and taking 4 bytes of it as checksum then see if it is correct. then pass it to get the balance. more info: https://en.bitcoin.it/wiki/Base58Check_encoding

i didn't mention Bech32 since the btc-priceimg and the blockchain.info API it uses don't support them but here is the link to its documentation: https://github.com/bitcoin/bips/blob/master/bip-0173.mediawiki

babo
Legendary
*
Offline Offline

Activity: 1932
Merit: 1231


View Profile WWW
June 29, 2019, 01:54:34 PM
 #14

release 0.3 version

https://github.com/blackout314/greasemoney-btctalk_btcbalance/releases/tag/0.3

with improved regex

Smiley

--- update ---
http://btc-priceimg.herokuapp.com/balance/bc1qh4vcjnq5n26p9rny0mr9nlvcea0d4ksx53g8q0/ff0000

image not work, because btc-priceimg not work

TryNinja
Legendary
*
Offline Offline

Activity: 1162
Merit: 1559



View Profile
June 29, 2019, 10:45:55 PM
Last edit: June 30, 2019, 11:03:49 AM by TryNinja
 #15

I've made my own "bitcoin balance image" server that also supports Segwit addresses (bech32 included). In case you want to use in your script.

Code:
https://btc.ninjastic.space/balance/ADDRESS/COLOR
(color is optional)

Quote

With color:

Quote

RapTarX
Full Member
***
Offline Offline

Activity: 266
Merit: 155


Match365> be a part of 150BTC inviting bonus


View Profile WWW
June 30, 2019, 04:19:50 AM
 #16

I've made my own "bitcoin balance image" server that also supports Segwit addresses (bech32 included). In case you want to use in your script.

Images aren't displayed.

TryNinja
Legendary
*
Offline Offline

Activity: 1162
Merit: 1559



View Profile
June 30, 2019, 11:03:09 AM
 #17

I've made my own "bitcoin balance image" server that also supports Segwit addresses (bech32 included). In case you want to use in your script.

Images aren't displayed.
Hmm... it’s working here. Can you try opening it directly?

babo
Legendary
*
Offline Offline

Activity: 1932
Merit: 1231


View Profile WWW
June 30, 2019, 01:28:50 PM
 #18

I've made my own "bitcoin balance image" server that also supports Segwit addresses (bech32 included). In case you want to use in your script.

Code:
https://btc.ninjastic.space/balance/ADDRESS/COLOR
(color is optional)

Quote

With color:

Quote

Perfect
I will use your service instead heroku app

Let me code the diff, and release v0.4
Thank you

babo
Legendary
*
Offline Offline

Activity: 1932
Merit: 1231


View Profile WWW
July 01, 2019, 08:02:08 AM
 #19

v 0.4 released

https://github.com/blackout314/greasemoney-btctalk_btcbalance/releases/tag/0.4

now bcxxxx addresses are supported

HCP
Legendary
*
Offline Offline

Activity: 1120
Merit: 1838

<insert witty quote here>


View Profile
July 01, 2019, 11:34:33 AM
Last edit: July 01, 2019, 11:50:12 AM by HCP
Merited by hugeblack (1)
 #20

Script doesn't seem to be working 100%

Check this thread: https://bitcointalk.org/index.php?topic=5159518.0

For some reason it is detecting the beginning of the transactionID: e7a3e5b1a2f7c2aa5fa9ebf1cc31c123a83367502c7648dfb6c1baa0ff3e8436 as a bitcoin address and attempting to generate the balance image for it??!?

This is what I see:



Also, from looking at the "Stake Your Address" thread, it is breaking URLs with addresses in them, for instance Block Explorer links:
So, this URL:

is actually encoded as:
https://www.blockchain.com/btc/address/384pXJVj7H49Sp9p9v5RnkbozM3ioVcgnL%20%3Cimg%20src='https://btc.ninjastic.space/balance/384pXJVj7H49Sp9p9v5RnkbozM3ioVcgnL/ff0000'/%3E


and it is also struggling with large blocks of "hex"... like GPG keys etc:


and Signed Messages:



Not sure if this is a Chrome/Tampermonkey specific issue.

Pages: [1] 2 »  All
  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!