ROOTPLOIT
Server: Apache
System: Linux node6122.myfcloud.com 6.14.3-x86_64-linode168 #1 SMP PREEMPT_DYNAMIC Mon Apr 21 19:47:55 EDT 2025 x86_64
User: bashacomputer (1004)
PHP: 7.4.33
Disabled: exec,passthru,shell_exec,system
Upload Files
File: //lib64/nagios/plugins/check_a2_whmcs_nginx_connections.sh
#!/bin/bash 
# Ref - SYSENG-27485 - send nginx connection status to mother!
# by - sbhat
#

n_data=$(curl -s --connect-timeout 5 https://my.a2hosting.com/nginx_status)
active_conn=$(echo -e ${n_data} | grep "Active connections:" | awk '{print $3}')
reading_conn=$(echo -e ${n_data} | grep "Reading:" | awk '{print $12}')
writing_conn=$(echo -e ${n_data} | grep "Writing:" | awk '{print $14}')
waiting_conn=$(echo -e ${n_data} | grep "Waiting:" | awk '{print $NF}')

# Determine status for active connections
if [ "$active_conn" -gt 200 ]; then
  echo "check_a2_whmcs_nginx_connections - nginx has more than 200 active connections"
  exit 2
else
  echo "check_a2_whmcs_nginx_connections - nginx has less than 200 active connections"
  exit 0
fi