h dZddlZddlZddlmZmZddlmZddlmZddl m Z ddl m Z ddl mZdd lmZeeZGd d e ZdS) u  This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program.  If not, see . Copyright © 2019 Cloud Linux Software Inc. This software is also available under ImunifyAV commercial license, see N)datetime timedelta) getLogger)AiBolitDetachedDir)Scope) BaseCleaner)register_lock_file)antivirus_modeceZdZedZedZedej Z e j re gZnddlmZmZmZe eeegZedZdS) MalwareDetachedDirCleaner)dayszmalware-detached-dir-cleanerr)MDSDetachedCleanupDirMDSDetachedRestoreDirMDSDetachedScanDircKtj}||jz }|jD]}|j}t j|rt j |5}|D]l}| rV| j |kr9tj|jtd|jm dddn #1swxYwYdS)Nz!Cleaned %s outdated operation dir)rnowCLEANUP_LIMIT_DELTA timestamp_DETACHED_DIRS DETACHED_DIRospathexistsscandiris_dirstatst_mtimeshutilrmtreeloggerinfoname)clsr time_limitdir_clsdetached_directoryitentrys _/opt/imunify360/venv/lib/python3.11/site-packages/imav/malwarelib/scan/cleaners/detached_dir.pycleanupz!MalwareDetachedDirCleaner.cleanup?s5lnnC33>>@@ )  G!(!5 w~~011 Z 233 r!#  !LLNN % 5 B B"M%*555"KK C %                    s5A0C22C6 9C6 N)__name__ __module__ __qualname__r total_secondsPERIODrr rAV_IM360 LOCK_FILEr enabledrr!imav.malwarelib.scan.mds.detachedrrr classmethodr,r+r r &s YA    , , . .F#),,,""&I              ! !   [r8r )__doc__rr rrloggingr&imav.malwarelib.scan.ai_bolit.detachedr!defence360agent.contracts.pluginsrdefence360agent.mr_properr'defence360agent.subsys.persistent_stater defence360agent.utilsr r-r"r r7r8r+r@s* ((((((((433333111111FFFFFF000000 8  +++++ +++++r8