PATH:
opt
/
imunify360
/
venv
/
share
/
imunify360
/
scripts
#!/opt/imunify360/venv/bin/python import asyncio from defence360agent.contracts.config import Model from defence360agent.internals import logger from defence360agent.model import instance, tls_check from im360.contracts.config import IPSET_LISTS_PATH from im360.files import WHITELISTS, Index from im360.model.cache_sources import ( CountryIPListCacheSource, GlobalwhitelistCacheSource, WhitelistCacheSourceFromCSF, WhitelistCacheSourceFromSystemSettings, ) from im360.model.firewall import IPList from im360.subsys import csf async def print_whitelist_cache_sources(): csf_files = csf.CSF_IMUNIFY_IPLISTS_MAPPING["WHITE"] for source in [ CountryIPListCacheSource(IPList.WHITE), GlobalwhitelistCacheSource(), WhitelistCacheSourceFromSystemSettings(), ] + ( [WhitelistCacheSourceFromCSF(*csf_files)] if await csf.is_running() else [] ): for ip, _ in await source.fetch_all(): print(ip) def setup_environment(): logger.reconfigure() instance.db.init(Model.PATH) instance.db.execute_sql("ATTACH ? AS resident", (Model.RESIDENT_PATH,)) instance.db.execute_sql("ATTACH ? AS ipsetlists", (IPSET_LISTS_PATH,)) Index.add_type(WHITELISTS, "whitelist/v2", 0o770, 0o660, all_zip=True) def main(): tls_check.reset() setup_environment() loop = asyncio.get_event_loop() loop.run_until_complete(print_whitelist_cache_sources()) if __name__ == "__main__": main()
[-] imunify-doctor.sh
[edit]
[-] delay_on_cron_call.py
[edit]
[-] create_default_config
[edit]
[-] imunify-disable-cpu-accounting.sh
[edit]
[-] csf_tool
[edit]
[-] ipset_sync.py
[edit]
[-] purge-clamav
[edit]
[-] check-detached.py
[edit]
[-] mk_apache_conf_digest.pl
[edit]
[-] imunify-check-pkg-integrity
[edit]
[-] rules_checker.py
[edit]
[-] check_recurrent.py
[edit]
[+]
migrate_csf
[-] lfd_block.py
[edit]
[-] setup_cagefs.py
[edit]
[-] whitelist_cache.py
[edit]
[-] update_components_versions.py
[edit]
[-] imunify-force-update.sh
[edit]
[-] track-fpfn-submissions.sh
[edit]
[+]
..
[-] disable_3rd_party_ids
[edit]
[-] remove_hardened_php.py
[edit]
[-] send-notifications
[edit]