aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuca Deri <deri@ntop.org>2020-01-08 22:14:34 +0100
committerLuca Deri <deri@ntop.org>2020-01-08 22:14:34 +0100
commit3e66bbc5bc0b46fcd456f9f0b75d66a2615fea98 (patch)
tree7a3d18a53ea1a3a057c4ebd54a359241973c5957
parent3ba7667887f2b9fb3754e15b9fb8fc25d6568475 (diff)
Tool for listing the current bitcoin IPv4 nodes
-rwxr-xr-xutils/bitcoinnodes.sh8
1 files changed, 8 insertions, 0 deletions
diff --git a/utils/bitcoinnodes.sh b/utils/bitcoinnodes.sh
new file mode 100755
index 000000000..033a76713
--- /dev/null
+++ b/utils/bitcoinnodes.sh
@@ -0,0 +1,8 @@
+#!/bin/sh
+#
+# List all the current bittorrent nodes
+#
+
+# NOTE: JQ can be found at https://stedolan.github.io/jq/
+
+curl -s -H "Accept: application/json; indent=4" https://bitnodes.earn.com/api/v1/snapshots/latest/ | jq -r '.nodes|keys[] as $k | "\($k)"' | grep -v onion | grep -v ']' | cut -d ':' -f 1