Skip to content

Instantly share code, notes, and snippets.

@joaociocca
Created January 4, 2022 12:45
Show Gist options
  • Save joaociocca/7818ca38dc58b52e3573506e3f9305c3 to your computer and use it in GitHub Desktop.
Save joaociocca/7818ca38dc58b52e3573506e3f9305c3 to your computer and use it in GitHub Desktop.
whodis for getting less info on whois, whodisc for comparing two IP ownership
#!/bin/bash
whois_fields='inetnum|netrange|netname|mnt-by|nic-hdl|CIDR|orgname|orgid|role'
whodis() { whois $1 | grep -Ei $whois_fields; }
whodisc() {
whois $1 | grep -E $whois_fields
echo "======================"
whois $2 | grep -E $whois_fields
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment