ipv6.he.net Daily Tests script

Certification in ipv6.he.net there are daily tests that give 1 the extra point after passed the basic tests. You should do 100 such tests for maximum results 😐 . The tests themselves were completely trivial

  • Traceroute
  • YOU AAAA
  • DIG PTR
  • Ping
  • Whois

The most unpleasant that the tests themselves must be unique, so cannot use a single domain dayti 🙂 among other things, and a bit annoying 🙄 – any call, just pluses 5 command in the cli is and copy/paste in their web site.

As a lazy admin who likes to make life easier madrasah quickly a mess to beat that, to do the dirty work instead of me

#!/bin/bash

hr() {
  local start=$'\e(0' end=$'\e(B' line='qqqqqqqqqqqqqqqq'
  local cols=${COLUMNS:-$(tput cols)}
  while ((${#line} < cols)); do line+="$line"; done
  printf '%s%s%s\n' "$start" "${line:0:cols}" "$end"
}

if [ -z $1 ]
then
  echo "Append domain afert the script name!!!"
  exit
fi

IP=$(dig $1 AAAA +short)

if [ -z ${IP} ]
then
  echo "$1 dont have valid IPv6 record"
else
  reset
  traceroute6 $1
  hr
  dig $1 AAAA
  hr
  dig -x ${IP}
  hr
  ping6 -c3 ${IP}
  hr 
  whois ${IP}
fi

As you can see, the script is insanely elementary. Poduval domain name, what is it to check if there are IPv6 records and if so, to conduct daily tests for him. Top chic part – function hr which prints a line across the width of the screen, taken from bash-hackers.

leave a reply

Your email address will not be published. Required fields are marked *

anti SPAM *