notes/scripts/dnsl
2022-08-09 21:56:45 -07:00

7 lines
196 B
Bash
Executable file

#!/bin/bash
ipaddress=$(host $1 | awk '{print $4}' | head -n 1)
source /home/brian/.api_key.sh
curl -s -H "Accept: application/json" "http://api.ipapi.com/$ipaddress/?access_key=$api_key" | jq