hardCIDR is a Linux Bash script, but also functions under macOS. Your mileage may vary on other distros. The script with no specified options will query ARIN and a pool of BGP route servers. The route server is selected at random at runtime.
hardCIDR is written by Jason Ashton, Senior Security Consultant at TrustedSec Twitter: @ninewires Website: https://www.trustedsec.com