Update scripts
This commit is contained in:
parent
7f1d3dae92
commit
b7b48ddfe1
4
scripts/netcheck.sh
Normal file → Executable file
4
scripts/netcheck.sh
Normal file → Executable file
|
@ -15,7 +15,7 @@ fullpingtest(){
|
|||
if [[ $? -eq 0 ]]; then
|
||||
echo -e "[${GREEN}PASS${NC}]${GREY} Host ${NC}$1$host${GREY} is ${GREEN}up${NC}"
|
||||
else
|
||||
echo -e "[${RED}FAIL${NC}]${GREY} Host ${NC}$1$host)${GREY} is ${RED}down${NC}"
|
||||
echo -e "[${RED}FAIL${NC}]${GREY} Host ${NC}$1$host${GREY} is ${RED}down${NC}"
|
||||
fi
|
||||
|
||||
host=" ($(dig +short -x $2 | ggrep -Po '.*(?=\.)'))"
|
||||
|
@ -61,7 +61,7 @@ pingtest(){
|
|||
if [[ $? -eq 0 ]]; then
|
||||
echo -e "[${GREEN}PASS${NC}]${GREY} Host ${NC}$1$host${GREY} is ${GREEN}up${NC}"
|
||||
else
|
||||
echo -e "[${RED}FAIL${NC}]${GREY} Host ${NC}$1$host)${GREY} is ${RED}down${NC}"
|
||||
echo -e "[${RED}FAIL${NC}]${GREY} Host ${NC}$1$host${GREY} is ${RED}down${NC}"
|
||||
fi
|
||||
|
||||
host=" ($(dig +short -x $2 | ggrep -Po '.*(?=\.)'))"
|
||||
|
|
68
scripts/netcheck_dn42.sh
Normal file → Executable file
68
scripts/netcheck_dn42.sh
Normal file → Executable file
|
@ -5,7 +5,7 @@ export GREY='\033[0;37m'
|
|||
export NC='\033[0m' # No Color
|
||||
|
||||
fullpingtest(){
|
||||
host=" ($(dig +short -x $1 | grep -Po '.*(?=\.)'))"
|
||||
host=" ($(dig +short -x $1 | tail -n 1 | grep -Po '.*(?=\.)'))"
|
||||
if [[ $? -ne 0 ]]; then
|
||||
host=""
|
||||
fi
|
||||
|
@ -15,10 +15,10 @@ fullpingtest(){
|
|||
if [[ $? -eq 0 ]]; then
|
||||
echo -e "[${GREEN}PASS${NC}]${GREY} Host ${NC}$1$host${GREY} is ${GREEN}up${NC}"
|
||||
else
|
||||
echo -e "[${RED}FAIL${NC}]${GREY} Host ${NC}$1$host)${GREY} is ${RED}down${NC}"
|
||||
echo -e "[${RED}FAIL${NC}]${GREY} Host ${NC}$1$host${GREY} is ${RED}down${NC}"
|
||||
fi
|
||||
|
||||
host=" ($(dig +short -x $2 | grep -Po '.*(?=\.)'))"
|
||||
host=" ($(dig +short -x $2 | tail -n 1 | grep -Po '.*(?=\.)'))"
|
||||
if [[ $? -ne 0 ]]; then
|
||||
host=""
|
||||
fi
|
||||
|
@ -51,7 +51,7 @@ fullpingtest(){
|
|||
}
|
||||
|
||||
pingtest(){
|
||||
host=" ($(dig +short -x $1 | grep -Po '.*(?=\.)'))"
|
||||
host=" ($(dig +short -x $1 | tail -n 1 | grep -Po '.*(?=\.)'))"
|
||||
if [[ $? -ne 0 ]]; then
|
||||
host=""
|
||||
fi
|
||||
|
@ -61,10 +61,10 @@ pingtest(){
|
|||
if [[ $? -eq 0 ]]; then
|
||||
echo -e "[${GREEN}PASS${NC}]${GREY} Host ${NC}$1$host${GREY} is ${GREEN}up${NC}"
|
||||
else
|
||||
echo -e "[${RED}FAIL${NC}]${GREY} Host ${NC}$1$host)${GREY} is ${RED}down${NC}"
|
||||
echo -e "[${RED}FAIL${NC}]${GREY} Host ${NC}$1$host${GREY} is ${RED}down${NC}"
|
||||
fi
|
||||
|
||||
host=" ($(dig +short -x $2 | grep -Po '.*(?=\.)'))"
|
||||
host=" ($(dig +short -x $2 | tail -n 1 | grep -Po '.*(?=\.)'))"
|
||||
if [[ $? -ne 0 ]]; then
|
||||
host=""
|
||||
fi
|
||||
|
@ -78,6 +78,21 @@ pingtest(){
|
|||
fi
|
||||
}
|
||||
|
||||
pingtest6(){
|
||||
host=" ($(dig +short -x $1 | tail -n 1 | grep -Po '.*(?=\.)')"
|
||||
if [[ $? -ne 0 ]]; then
|
||||
host=""
|
||||
fi
|
||||
|
||||
timeout 1 ping -6 -c 1 $1 &>/dev/null
|
||||
|
||||
if [[ $? -eq 0 ]]; then
|
||||
echo -e "[${GREEN}PASS${NC}]${GREY} Host ${NC}$1$host${GREY} is ${GREEN}up${NC}"
|
||||
else
|
||||
echo -e "[${RED}FAIL${NC}]${GREY} Host ${NC}$1$host${GREY} is ${RED}down${NC}"
|
||||
fi
|
||||
}
|
||||
|
||||
dnspingtest(){
|
||||
host=" (v4)"
|
||||
timeout 1 ping -c 1 $1 &>/dev/null
|
||||
|
@ -98,16 +113,16 @@ dnspingtest(){
|
|||
fi
|
||||
}
|
||||
|
||||
webtest(){
|
||||
dnspingtest $1
|
||||
|
||||
webtest4(){
|
||||
ip4=$(curl -s -4 --connect-timeout 1 $1)
|
||||
if [[ $? -eq 0 ]]; then
|
||||
echo -e "[${GREEN}INFO${NC}]${GREY} Your Source IPv4 to ${NC}$1${GREY} is ${GREEN}$ip4${NC}"
|
||||
else
|
||||
echo -e "[${GREEN}INFO${NC}]${GREY} Your Source IPv4 to ${NC}$1${GREY} is ${RED}unknown${NC}"
|
||||
fi
|
||||
|
||||
}
|
||||
|
||||
webtest6(){
|
||||
ip6=$(curl -s -6 --connect-timeout 1 $1)
|
||||
if [[ $? -eq 0 ]]; then
|
||||
echo -e "[${GREEN}INFO${NC}]${GREY} Your Source IPv6 to ${NC}$1${GREY} is ${GREEN}$ip6${NC}"
|
||||
|
@ -116,24 +131,23 @@ webtest(){
|
|||
fi
|
||||
}
|
||||
|
||||
webtest(){
|
||||
webtest4 $1
|
||||
webtest6 $1
|
||||
}
|
||||
|
||||
echo -e "[${GREEN}INFO${NC}]${GREY} Scan started on $(date "+%Y-%m-%d %H:%M:%S")${NC}"
|
||||
|
||||
pingtest "172.20.170.192" "fe80::42:1000%dn42p1"
|
||||
pingtest "172.23.235.1" "fe80::1299:e%dn42p2"
|
||||
pingtest "172.20.177.34" "fe80::3%dn42i1"
|
||||
pingtest "172.20.177.35" "fe80::4%dn42i2"
|
||||
pingtest "172.20.170.192" "fe80::42:1000%dn42p1"
|
||||
pingtest "172.23.235.1" "fe80::1299:e%dn42p2"
|
||||
pingtest6 "fe80::42:2341:1%dn42p3"
|
||||
pingtest "172.20.129.169" "fe80::42:2601:31:1%dn42p4"
|
||||
pingtest "172.20.175.195" "fe80::42%dn42p5"
|
||||
pingtest "172.20.177.34" "fdff:b02d:2ef7::3"
|
||||
pingtest "172.20.177.35" "fdff:b02d:2ef7::4"
|
||||
pingtest "172.20.177.36" "fdff:b02d:2ef7::5"
|
||||
|
||||
echo
|
||||
webtest fsn1.dn42.zotan.network
|
||||
|
||||
fullpingtest "78.46.129.93" "2a01:4f8:c0c:51e::1" "mail.zotan.network"
|
||||
fullpingtest "172.20.129.5" "fd42:4242:2601:ac05::1" "pingable.burble.dn42"
|
||||
|
||||
echo
|
||||
|
||||
webtest nbg1.dn42.zotan.network
|
||||
webtest hel1.dn42.zotan.network
|
||||
|
||||
echo
|
||||
|
||||
webtest nbg1.zotan.dn42
|
||||
webtest hel1.zotan.dn42
|
||||
webtest4 ip4.dn42
|
||||
webtest6 ip6.dn42
|
||||
|
|
Loading…
Reference in a new issue