PATH:
opt
/
imunify360
/
venv
/
lib
/
python3.11
/
site-packages
/
im360
/
subsys
from enum import StrEnum, unique from pathlib import Path from im360.utils import is_apache2nginx_enabled _CONF_PATH = Path("/usr/share/imunify360-webshield/modularity_mode") @unique class Mode(StrEnum): STANDALONE = "standalone" APACHE = "apache" NGINX = "nginx" @classmethod def get(cls): try: mode = _CONF_PATH.read_text().strip() if mode == "apache": return cls.APACHE if mode == "nginx": return cls.NGINX if mode == "standalone": return cls.STANDALONE raise TypeError(f"Unknown mode: {mode}") except FileNotFoundError: return cls.STANDALONE @classmethod def wants_redirect(cls, mode) -> bool: return ( mode in (cls.STANDALONE, cls.APACHE) or is_apache2nginx_enabled() ) def get_module_based_ports() -> set[int]: # For now - hardcoded values. In the future maybe remake to a config file. return {80, 443}
[-] smtp_blocking.py
[edit]
[-] fail2ban.py
[edit]
[-] modsec_audit_log.py
[edit]
[-] proactive.py
[edit]
[-] whitelist_rbl.py
[edit]
[-] running_ids.py
[edit]
[-] ossec.py
[edit]
[+]
__pycache__
[-] pam.py
[edit]
[+]
features
[+]
panels
[-] webshield.py
[edit]
[-] shared_disabled_rules.py
[edit]
[-] int_config.py
[edit]
[-] modsec_app_version_detector.py
[edit]
[-] modsec_cache_dir.py
[edit]
[-] __init__.py
[edit]
[-] waf_rules_configurator.py
[edit]
[-] webshield_mode.py
[edit]
[+]
..
[-] csf.py
[edit]
[-] remoteip.py
[edit]