403Webshell
Server IP : 69.72.244.102  /  Your IP : 216.73.216.164
Web Server : LiteSpeed
System : Linux s3434.fra1.stableserver.net 4.18.0-513.24.1.lve.2.el8.x86_64 #1 SMP Fri May 24 12:42:50 UTC 2024 x86_64
User : konzalta ( 1271)
PHP Version : 7.4.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /opt/sp_scripts/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /opt/sp_scripts/aptop.py
#!/usr/bin/env python3
# Fetching Apache workers per domain utilizing curl and mod_status
# Based on lstop.py by Tsvetan Gerov
# aptop.py by Nikolay Ilchev
#
import requests
import re
from collections import defaultdict

def main():
    response = requests.get(
        'http://127.0.0.1/whm-server-status',
        headers={'User-Agent': 'A2 User Agent OPS TEAM/4147 Gecko/20190813'}
    )

    content = response.text

    response.raise_for_status()
    content = response.text

    domain_counts = defaultdict(int)

    for match in re.finditer(r'<td nowrap>([^<:]+)(?::\d+)?</td><td nowrap>', content):
        vhost = match.group(1).strip()
        domain_counts[vhost] += 1

    sorted_domains = sorted(domain_counts.items(), key=lambda x: x[1])

    print("| {:<70s} | {:>8s} |".format("Domain", "Workers"))
    print("|" + "-" * 72 + "|" + "-" * 10 + "|")

    for domain, count in sorted_domains:
        print("| {:<70} | {:8d} |".format(domain, count))

    print("|" + "-" * 72 + "|" + "-" * 10 + "|")
    print("| {:<70s} | {:>8s} |".format("Domain", "Workers"))

if __name__ == '__main__':
    main()

Youez - 2016 - github.com/yon3zu
LinuXploit