peers.sh (812B)
- #!/bin/sh
- home_instance="https://queer.hacktivis.me"
- instances_peers=$(curl -sSL "${home_instance}/api/v1/instance/peers" | jq -r .[])
- for instance in $instances_peers
- do
- echo -n "
- ${instance}:"
- host -t A "${instance}" | grep 'has address' >/dev/null 2>&1 && echo -n ' A'
- host -t AAAA "${instance}" | grep 'has IPv6' >/dev/null 2>&1 && echo -n ' AAAA'
- # [ -z "$(dig +short ${instance} A 2>/dev/null)" ] || echo -n ' A'
- # [ -z "$(dig +short ${instance} AAAA 2>/dev/null)" ] || echo -n ' AAAA'
- ping -4 -c 3 "${instance}" >/dev/null 2>&1 && echo -n ' ICMPv4'
- ping -6 -c 3 "${instance}" >/dev/null 2>&1 && echo -n ' ICMPv6'
- curl -4 -sSL "https://${instance}/" >/dev/null 2>&1 && echo -n ' HTTPSv4'
- curl -6 -sSL "https://${instance}/" >/dev/null 2>&1 && echo -n ' HTTPSv6'
- done