[ SEA-GHOST MINI SHELL]
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
import re
import subprocess
import sys
if __name__ == "__main__":
try:
ps = subprocess.Popen(('echo', 'show job'), stdout=subprocess.PIPE)
output = subprocess.check_output(('bconsole'), stdin=ps.stdout)
ps.wait()
except subprocess.CalledProcessError:
print "This command requires root privelges and must be run as with sudo"
sys.exit(1)
jobs = re.findall(r'Name = "(.+?)"', output)
data = [{"{#JOBNAME}": job} for job in jobs]
print(json.dumps({"data": data}, indent=4))
SEA-GHOST - SHELL CODING BY SEA-GHOST