shell bypass 403

GrazzMean-Shell Shell

: /lib64/nagios/plugins/nccustom/ [ drwxr-xr-x ]
Uname: Linux server105.web-hosting.com 4.18.0-513.18.1.lve.el8.x86_64 #1 SMP Thu Feb 22 12:55:50 UTC 2024 x86_64
Software: LiteSpeed
PHP version: 7.4.33 [ PHP INFO ] PHP os: Linux
Server Ip: 68.65.120.251
Your Ip: 3.138.170.222
User: travtpib (6521) | Group: travtpib (6478)
Safe Mode: OFF
Disable Function:
NONE

name : check_safe_logger.sh
#!/bin/bash

log_host="127.0.0.1"
log_port="514"
log_path=$(systemctl cat hc-safe-logger|grep -i "LOG_DIRECTORY"|awk -F'=' '{gsub(/"/,"",$3); print $3}')
[[ -z "${log_path}" ]] && log_path="/var/log/nc_audit/hc-safe-logger"

# check process
if ! (pidof hc-safe-logger > /dev/null 2>&1); then
  echo "CRITICAL! hc-safe-logger: Process doesn't exist."
  exit 2
fi

# check connection
if ! (nc -zu "${log_host}" "${log_port}"); then
  echo "CRITICAL! hc-safe-logger: Connection refused."
  exit 2
fi

# check new records
logger --server "${log_host}" --port "${log_port}" -p local0.info "check hc-safe-logger" -t "HEALTH_CHECK" && sleep 3
files=$(find "${log_path}" -mmin -59 -type f)
if [[ -z "${files}" ]]; then
  echo "CRITICAL! hc-safe-logger: No records in log from last hour."
  exit 2
fi

# all check passed
echo "OK. hc-safe-logger: Healthy."
exit 0
© 2025 GrazzMean-Shell