Software: Apache. PHP/8.3.27 uname -a: Linux pdx1-shared-a4-04 6.6.104-grsec-jammy+ #3 SMP Tue Sep 16 00:28:11 UTC 2025 x86_64 uid=6659440(dh_z2jmpm) gid=2086089(pg10499364) groups=2086089(pg10499364) Safe-mode: OFF (not secure) /usr/local/bin/zabbix/ drwxr-xr-x | |
| Viewing file: Select action/file-type: #! /bin/bash
SERVER=$1
TIMEOUT=25
RETVAL=0
#TIMESTAMP=`echo | date`
if [ -z "$2" ]; then
PORT=443;
else
PORT=$2;
fi
if [ -z "$3" ]; then
SNI=$1
else
SNI=$3
fi
EXPIRE_DATE=`echo "" | openssl s_client -connect ${SERVER}:${PORT} -servername ${SNI} 2>/dev/null | openssl x509 -noout -dates 2>/dev/null | grep notAfter | cut -d'=' -f2`
EXPIRE_SECS=`date -d "${EXPIRE_DATE}" +%s`
EXPIRE_TIME=$(( ${EXPIRE_SECS} - `date +%s` ))
if [ ${EXPIRE_TIME} -lt 0 ]; then
RETVAL=0
else
RETVAL=$(( ${EXPIRE_TIME} / 24 / 3600 ))
fi
echo ${RETVAL}
|
:: Command execute :: | |
--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0525 ]-- |