Created
February 23, 2024 21:27
-
-
Save st3b1t/21ac27f1332a4eeaf2d97d06f87ac8a1 to your computer and use it in GitHub Desktop.
testing rpc methods of your rpc Bitcoin full node
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# | |
# included in: https://github.com/st3b1t/SatoshiLog | |
# | |
# usage: echo server.banner | satlog-rpc 127.0.0.1 50001 | |
# | |
read METHOD | |
HOST=$1 | |
PORT=$2 | |
URL="http://${HOST}:${PORT}/" | |
JSON="{\"jsonrpc\":\"2.0\",\"id\":0,\"method\":\"${METHOD}\",\"params\":[\"satlog-rpc-method\",\"1.4\"]}" | |
DATA=`echo -e "${JSON}\n"` | |
echo $DATA | netcat $HOST $PORT |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment