change port check for domain as well

This commit is contained in:
Daniel Hansson 2020-05-09 21:23:32 +02:00 committed by GitHub
parent 218f5b961e
commit 5087f6d717
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

2
lib.sh
View File

@ -543,7 +543,7 @@ if check_command curl -s -H 'Cache-Control: no-cache' "https://networkappers.com
then
print_text_in_color "$IGreen" "Port ${1} is open on ${WANIP4}!"
# Domain name
elif check_command curl -s -H 'Cache-Control: no-cache' 'https://ports.yougetsignal.com/check-port.php' --data "remoteAddress=${2}&portNumber=${1}" | grep -q "is open on"
elif check_command curl -s -H 'Cache-Control: no-cache' "https://networkappers.com/api/port.php?ip=${2}&port=${1}" | grep -q "open"
then
print_text_in_color "$IGreen" "Port ${1} is open on ${2}!"
else