[
MAINHACK
]
Mail Test
BC
Config Scan
HOME
Create...
New File
New Folder
Viewing / Editing File: panel.py
File is not writable. Editing disabled.
import os from pathlib import Path from typing import Optional, Set, Dict, Sequence from defence360agent.subsys.panels.base import PanelException from defence360agent.subsys.panels.no_cp import NoCP from im360.subsys.panels.base import ( ModSecurityInterface, PanelInterface, RemoteIPInterface ) class NoCPPanelInterface(PanelInterface): async def _get_all_admin_emails(self): return [] def basedirs(self) -> Set[str]: return set() def http_ports(self) -> Set[int]: return set() def https_ports(self) -> Set[int]: return set() def remoteip_supported(self) -> bool: return True async def list_docroots(self) -> Sequence[str]: return [] class NoCPModSecurityInterface(ModSecurityInterface): REBUILD_HTTPDCONF_CMD = None @classmethod async def installed_modsec(cls): return False async def _install_settings(self): pass async def modsec_get_directive(self, directive_name, default=None): raise NotImplementedError async def reset_modsec_directives(self): pass async def reset_modsec_rulesets(self): pass async def revert_settings(self): pass @classmethod def _get_conf_dir(cls): pass @classmethod def get_app_specific_waf_config(cls): raise NotImplementedError @classmethod def detect_cwaf(cls): return False @classmethod async def modsec_vendor_list(cls) -> list: """Return a list of installed ModSecurity vendors.""" return [] @classmethod async def enabled_modsec_vendor_list(cls) -> list: """Return a list of enabled ModSecurity vendors.""" return [] @classmethod async def build_vendor_file_path(cls, vendor: str, filename: str) -> Path: raise PanelException('not implemented') @classmethod async def get_i360_vendor_name(cls) -> str: raise PanelException('not implemented') @classmethod async def get_i360_vendor_version(cls) -> str: raise PanelException('not implemented') @classmethod async def invalidate_installed_vendors_cache(cls): pass @classmethod async def _apply_modsec_files_update(cls): pass @classmethod def get_audit_log_path(cls): # IMUNIFY360_NOCP_MODSEC_AUDIT_LOG should not be set generally, # used for tests only return os.environ.get('IMUNIFY360_NOCP_MODSEC_AUDIT_LOG', None) @classmethod def get_audit_logdir_path(cls): pass @classmethod def write_global_disabled_rules(cls, rule_list): pass @classmethod async def sync_global_disabled_rules(cls, rule_list): pass @classmethod async def sync_disabled_rules_for_domains( cls, domain_rules_map: Dict[str, list] ): pass class NoCPRemoteIPInterface(RemoteIPInterface): async def remoteip_activated(self) -> bool: return True async def remoteip_install(self) -> Optional[str]: raise PanelException('not supported') class NoControlPanel( NoCPModSecurityInterface, NoCPPanelInterface, NoCPRemoteIPInterface, NoCP, ): pure_ftp_conf_cls = None
Save Changes
Cancel / Back
Close ×
Server Info
Hostname: server05.hostinghome.co.in
Server IP: 192.168.74.40
PHP Version: 7.4.33
Server Software: Apache
System: Linux server05.hostinghome.co.in 3.10.0-962.3.2.lve1.5.81.el7.x86_64 #1 SMP Wed May 31 10:36:47 UTC 2023 x86_64
HDD Total: 1.95 TB
HDD Free: 690.19 GB
Domains on IP: N/A (Requires external lookup)
System Features
Safe Mode:
Off
disable_functions:
None
allow_url_fopen:
On
allow_url_include:
Off
magic_quotes_gpc:
Off
register_globals:
Off
open_basedir:
None
cURL:
Enabled
ZipArchive:
Disabled
MySQLi:
Enabled
PDO:
Enabled
wget:
Yes
curl (cmd):
Yes
perl:
Yes
python:
Yes
gcc:
Yes
pkexec:
No
git:
Yes
User Info
Username: itsweb
User ID (UID): 1619
Group ID (GID): 1621
Script Owner UID: 1619
Current Dir Owner: N/A