7 lines
196 B
Bash
Executable file
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
|