403Webshell
Server IP : 62.60.133.156  /  Your IP : 216.73.217.51
Web Server : LiteSpeed
System : Linux linux24.centraldnserver.com 4.18.0-553.141.2.lve.el8.x86_64 #1 SMP Wed Jul 8 16:10:02 UTC 2026 x86_64
User : mimradmin ( 1166)
PHP Version : 7.4.33
Disable Function : show_source, system, shell_exec, passthru, exec, popen, proc_open
MySQL : OFF |  cURL : ON |  WGET : ON |  Perl : ON |  Python : ON |  Sudo : OFF |  Pkexec : OFF
Directory :  /opt/imunify360/venv/lib64/python3.11/site-packages/im360/model/

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

Current File : /opt/imunify360/venv/lib64/python3.11/site-packages/im360/model/custom_lists.py
import glob
import logging
from typing import List

from im360.model.global_whitelist import GlobalWhitelist

CUSTOM_WHITELIST_MASK = "/etc/imunify360/whitelist/*.txt"
CUSTOM_BLACKLIST_MASK = "/etc/imunify360/blacklist/*.txt"

logger = logging.getLogger(__name__)


class CustomWhitelist(GlobalWhitelist):
    _LIST_PATH = CUSTOM_WHITELIST_MASK

    @classmethod
    async def load(cls, group=None) -> List[str]:
        result = []  # type: List[str]

        for f in glob.glob(cls._LIST_PATH):
            logger.info("Loading %s to %s", f, cls.__name__)
            result.extend(cls._load_file(f, log_error=logger.warning))

        return result


class CustomBlacklist(CustomWhitelist):
    _LIST_PATH = CUSTOM_BLACKLIST_MASK

Youez - 2016 - github.com/yon3zu