Makestation
강남오피 강남오피 ⦑오피쓰주소.COM⦒ 강남OP 강남스파 강남오피 - Printable Version

+- Makestation (https://makestation.net)
+-- Forum: Creative Arts General Plaza (https://makestation.net/forumdisplay.php?fid=124)
+--- Forum: The Others (https://makestation.net/forumdisplay.php?fid=60)
+--- Thread: 강남오피 강남오피 ⦑오피쓰주소.COM⦒ 강남OP 강남스파 강남오피 (/showthread.php?tid=23270)



강남오피 강남오피 ⦑오피쓰주소.COM⦒ 강남OP 강남스파 강남오피 - s.at.r.eo.p.alsen - February 10th, 2025

강남오피 강남오피 ⦑오피쓰주소.COM⦒ 강남OP 강남스파 강남오피
강남오피 강남오피 ⦑오피쓰주소.COM⦒ 강남OP 강남스파 강남오피
https://xn--220b45ohvf44emodq6drrj.com
https://xn--hz2b29jd6dvtc5g704a0jj.com
https://xn--vk5b29y.club
https://xn--2e0bu9hi7nnoe95du5x.com
https://www.jobscentraltexas.com/profiles/5989560-com-op
https://www.tripadvisor.com/Profile/pohangop
https://www.topchretien.com/membre/club-11
http://4ty.me/675719
[Image: 25.jpg]


RE: 강남오피 강남오피 ⦑오피쓰주소.COM⦒ 강남OP 강남스파 강남오피 - tc4me - February 10th, 2025

IPURL="https://motd.ch/ip.php"

print_usage(){
cat << EOI
Displays IP addresses of the current host used for internet connections.

Usage: myip [options]

Options:

-6 Show only IPv6 addresses (public ip address by default).
-4 Show only IPv4 addresses (public ip address by default).
-h Show usage help.
-l Show local insted of public addresses.
-g Show geolocation (using geoiplookup).

No options produces a more verbose output.
EOI
}

check_dependencies(){
local FAIL=0
for tool in "$@"
do
if ! hash "$tool" &> /dev/null
then
echo "The tool $tool does not exist."
FAIL=1
fi
done
if [[ "$FAIL" == 1 ]]
then
exit 1
fi
}

print_public_ipv4_address(){
echo "$(curl -s -4 -L $IPURL || echo "")"
}

print_public_ipv6_address(){
echo "$(curl -s -6 -L $IPURL || echo "")"
}

print_public_ipv4_geolocation(){
geoiplookup "$PUBLIC_IPV4_ADDRESS" | awk -F": " '{printf($2)}'
}

print_public_ipv6_geolocation(){
geoiplookup6 "$PUBLIC_IPV6_ADDRESS" | awk -F": " '{printf($2)}'
}

print_local_ipv4_address(){
echo "$(curl -s -4 -L --write-out %{local_ip} $IPURL -o /dev/null || echo "")"
}

print_local_ipv6_address(){
echo "$(curl -s -6 -L --write-out %{local_ip} $IPURL -o /dev/null || echo "")"
}

main(){
while getopts 46ghlv name
do
case "$name" in
4)
flag_4=1
;;
6)
flag_6=1
;;
g)
flag_g=1
;;
h)
print_usage
exit
;;
l)
flag_l=1
;;
?)
print_usage >&2
exit 2
;;
esac
done

if [[ -n $flag_l && -n $flag_4 ]]
then
print_local_ipv4_address
fi
if [[ -n $flag_l && -n $flag_6 ]]
then
print_local_ipv6_address
fi

if [[ -z $flag_l && -n $flag_4 ]]
then
print_public_ipv4_address
fi
if [[ -z $flag_l && -n $flag_6 ]]
then
print_public_ipv6_address
fi

if [[ -z $flag_l && -z $flag_4 && -z $flag_6 ]]
then
PUBLIC_IPV4_ADDRESS=$(print_public_ipv4_address)
PUBLIC_IPV6_ADDRESS=$(print_public_ipv6_address)
echo -e "Public IPv4 address: ${PUBLIC_IPV4_ADDRESS:--}"
echo -e "Public IPv6 address: ${PUBLIC_IPV6_ADDRESS:--}"
LOCAL_IPV4_ADDRESS=$(print_local_ipv4_address)
LOCAL_IPV6_ADDRESS=$(print_local_ipv6_address)
echo -e "Local IPv4 address: ${LOCAL_IPV4_ADDRESS:--}"
echo -e "Local IPv6 address: ${LOCAL_IPV6_ADDRESS:--}"

echo ""

if [[ -n "$PUBLIC_IPV4_ADDRESS" && -n "$LOCAL_IPV4_ADDRESS" ]]
then
if [[ "$PUBLIC_IPV4_ADDRESS" != "$LOCAL_IPV4_ADDRESS" ]]
then
echo "IPv4: NAT"
else
echo "IPv4: No NAT"
fi
fi

if [[ -n "$PUBLIC_IPV6_ADDRESS" && -n "$LOCAL_IPV6_ADDRESS" ]]
then
if [[ "$PUBLIC_IPV6_ADDRESS" != "$LOCAL_IPV6_ADDRESS" ]]
then
echo "IPv6: NAT"
else
echo "IPv6: No NAT"
fi
fi

if [[ -n "$flag_g" ]]
then
check_dependencies geoiplookup geoiplookup6
if [[ -n "$PUBLIC_IPV4_ADDRESS" ]]
then
PUBLIC_IPV4_GEOLOCATION="$(print_public_ipv4_geolocation)"
echo "Geolocation IPv4: $PUBLIC_IPV4_GEOLOCATION"
fi

if [[ -n "$PUBLIC_IPV6_ADDRESS" ]]
then
PUBLIC_IPV6_GEOLOCATION="$(print_public_ipv6_geolocation)"
echo "Geolocation IPv6: $PUBLIC_IPV4_GEOLOCATION"
fi
fi

fi
}

main "$@"