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: //usr/lib64/nagios/plugins/check_a2_imunify_service
#!/bin/bash
# A2hosting Inc.

MWP=$(echo "$HOSTNAME" | grep -E 'mw[0-9]')

if [[ -n "$MWP" ]]; then
  echo "check_imunify360 - Managed Wordpress servers do not use Imunify360."
  exit 0
fi

imunify360_webshield_active=$(service imunify360-webshield status 2>/dev/null| awk '/Active: active \(running\)/ {print $2,$3}')
imunify360_active=$(service imunify360 status 2>/dev/null| awk '/Active: active \(running\)/ {print $2,$3}')
imunify360_licensed=$(imunify360-agent rstatus 2>/dev/null)

if [[ "$imunify360_licensed" == "OK" ]] && [[ "$imunify360_active" == "active (running)" ]] && [[ "$imunify360_webshield_active" == "active (running)" ]]; then
  echo "check_imunify360 - Imunify360 and Imunify360-webshield are running and the license is valid."
  exit 0
else
  echo "check_imunify360 - Imunify360 or Imunify360-webshield are either not running, or Imunify360 is not licensed on this server."
  exit 2
fi