403Webshell
Server IP : 66.29.132.122  /  Your IP : 18.224.43.74
Web Server : LiteSpeed
System : Linux business142.web-hosting.com 4.18.0-553.lve.el8.x86_64 #1 SMP Mon May 27 15:27:34 UTC 2024 x86_64
User : admazpex ( 531)
PHP Version : 7.2.34
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /proc/self/root/proc/self/root/proc/thread-self/root/proc/thread-self/root/proc/self/root/proc/thread-self/root/proc/self/root/proc/self/root/proc/self/root/proc/self/root/opt/imunify360/venv/lib64/python3.11/site-packages/defence360agent/application/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /proc/self/root/proc/self/root/proc/thread-self/root/proc/thread-self/root/proc/self/root/proc/thread-self/root/proc/self/root/proc/self/root/proc/self/root/proc/self/root/opt/imunify360/venv/lib64/python3.11/site-packages/defence360agent/application//settings.py
"""Set settings of application object"""
from pathlib import Path

from defence360agent import files
from defence360agent.application import tags
from defence360agent.contracts import eula
from defence360agent.model import simplification
from defence360agent.rpc_tools.validate import (
    SchemaValidator,
    validate_middleware,
)
from defence360agent.simple_rpc.schema import init_validator

from . import app


async def update_eula_data(index, is_updated: bool):
    if is_updated:
        await eula.update()


def configure(
    init_validator=init_validator,
    validator_cls=SchemaValidator,
    validate_middleware_wrap=validate_middleware,
    schema_paths=None,
    models_modules=None,
    set_sentry_tags=tags.fill,
    migration_dirs=None,
    migrations_attached_dbs=None,
    resident=False,
):
    app.SCHEMA_PATHS = schema_paths
    app.VALIDATOR, app.MIDDLEWARE, app.MIDDLEWARE_EXCLUDE = init_validator(
        validator_cls, validate_middleware_wrap, schema_paths
    )
    app.MODULES_WITH_MODELS += [simplification]
    if models_modules:
        app.MODULES_WITH_MODELS += models_modules
    av_path = Path(__file__).resolve().parent.parent
    app.MIGRATIONS_DIRS += [av_path / "migrations"]
    if migration_dirs:
        app.MIGRATIONS_DIRS += migration_dirs
    if migrations_attached_dbs:
        app.MIGRATIONS_ATTACHED_DBS += migrations_attached_dbs

    set_sentry_tags()
    files.configure()
    if not resident:
        files.Index.add_hook(files.EULA, update_eula_data)

Youez - 2016 - github.com/yon3zu
LinuXploit