[ SEA-GHOST MINI SHELL]

Path : /proc/3/cwd/var/lib/zabbix/
FILE UPLOADER :
Current File : //proc/3/cwd/var/lib/zabbix/auto_ssl.py

#! /usr/bin/env python2.7
# -*- coding: utf-8 -*-

import json, subprocess, os
DEVNULL = open(os.devnull, 'w')

p = subprocess.Popen(['/usr/local/cpanel/bin/whmapi1', 'fetch_ssl_vhosts', '--output=json'], stdout=subprocess.PIPE, stderr=DEVNULL)
out, err = p.communicate()
out_json = json.loads(out)
data_all = out_json.get('data')
vhosts = data_all.get('vhosts')

for vhost in vhosts:
  if vhost['crt']:
    if (vhost['crt']['is_self_signed'] == 1) and (vhost['iptype'] == 'shared'):
      print "%s: %s" % (vhost['user'], vhost['servername'])

SEA-GHOST - SHELL CODING BY SEA-GHOST