KEY_FILE="${XDG_CONFIG_HOME:-${HOME}/.config}/moo"
#check to see if the key loads properly and api was placed in the right spot
if [ -f "$KEY_FILE" ]; then
echo "No key file :(" && exit 1
# jq to parse JSON files | tr -d to cut 'char' | sed to remove extra stuff | fold to wrap text
curl -s "https://api.shodan.io/shodan/host/$ip_addr?key=$SHODAN_API_KEY&query=all" | jq '.' | tr -d '"' | tr -d '_' | tr -d '{}' | tr -d ',' | sed 's/[][]//g'
curl -s "https://api.shodan.io/shodan/host/search?key=$SHODAN_API_KEY&query=all:$ip_addr" | jq '.' | tr -d '"' | tr -d '_' | tr -d '_' | tr -d '{}' | tr -d ','
curl -s "https://api.shodan.io/shodan/host/search?key=$SHODAN_API_KEY&query=all:$ip_addr"