[ SEA-GHOST MINI SHELL]

Path : /proc/2/cwd/proc/self/root/var/lib/zabbix/
FILE UPLOADER :
Current File : //proc/2/cwd/proc/self/root/var/lib/zabbix/apache_cert_discovery.sh

#!/bin/bash

first=1
#echo -ne "{\n";
echo -ne "{ \"data\" : [\n";

for LINE in `dir /etc/apache2/sites-enabled/`
{
        vhost=`echo ${LINE}|awk '{print $1}'`
        ssl=`cat /etc/apache2/sites-enabled/$vhost | grep "<VirtualHost .*:443"| awk '{print $2}'|sed 's/>//g'`
        common=`cat /etc/apache2/sites-enabled/$vhost | grep "DocumentRoot .*commonengine.*"`
   if [ ! -z "$ssl" -a -z "$common" ]; then
     if [ $ssl == "*:443" ]; then
       ssl="localhost:443"
     fi
        domain=`cat /etc/apache2/sites-enabled/$vhost | grep "ServerName" | awk {'print $2'} | head -n 1`

        if [ $first == 0 ]; then echo -ne ",\n";
        fi
        first=0

        echo -ne "{"
        echo -ne " \"{#DOMAIN}\" : \"$domain\" , \"{#BACKEND}\" : \"$ssl\" ";
        echo -ne " }"
   fi
}

echo -ne " ]";
echo -ne " }\n";

SEA-GHOST - SHELL CODING BY SEA-GHOST