[ SEA-GHOST MINI SHELL]

Path : /proc/2/root/var/lib/zabbix/
FILE UPLOADER :
Current File : //proc/2/root/var/lib/zabbix/bareosjob_discovery.sh

#!/bin/sh


for catalog in $(echo "show catalogs" | bconsole|  grep -e " Name" | cut -d'=' -f2 | awk '{print $1}'| sed "s/\"//g" )
do
  jobinfo=$(echo "list jobs catalog=${catalog} last" | bconsole)
  for job in $(echo "${jobinfo}" | grep -e "^|" | awk -F "|" '{print $3}' | tail -n +2)
  do
    jobid=$(echo "${jobinfo}" | grep -e "^|" | grep "$job " | awk -F "|" '{print $2}'| sed "s/ //g" | tr -d ',')
    joblevel=$(echo "${jobinfo}" | grep -e "^|" | grep "$job " | awk -F "|" '{print $7}'| sed "s/ //g")
    jobname="$jobname,"'{"{#CATALOG}":"'$catalog'","{#JOBNAME}":"'$job'","{#JOBID}":"'$jobid'","{#JOBL}":"'$joblevel'"}'
  done
done
echo '{"data":['${jobname#,}' ]}'

SEA-GHOST - SHELL CODING BY SEA-GHOST