}{}ydZddlZddlZddlmZddlmZddlmZddl m Z ddl m Z ddl mZmZdd lmZdd lmZdd lmZdd lmZdd lmZdZejeZGdde 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)Path)Core) LicenseCLN) MessageSource)TheSink)recurring_checksafe_cancel_task)CleanupRevertAPI) restore_hits)CleanupRevertInitiator)MalwareHitStatus) MalwareHiti0*cXeZdZUejZdZedzed<dZ dZ deddfdZ dZ dZ dS) CleanupRevertPluginN_sinkcHttjdz |_dS)Ncleanup_revert)rrTMPDIR_cleanup_revert_flagselfs [/opt/imunify360/venv/lib/python3.11/site-packages/imav/malwarelib/plugins/cleanup_revert.py__init__zCleanupRevertPlugin.__init__/s $($5$58H$H!!!sinkreturncK||_|tt|j|_dSN)r create_taskrPERIODprocess_cleanup_revert_task)rlooprs r create_sourcez!CleanupRevertPlugin.create_source2sI %% @ #OF # #D$? @ @ B B   rcPK|jrt|jd{VdSdSr)r"r rs rshutdownzCleanupRevertPlugin.shutdown8sB : /"4:.. . . . . . . . . . / /rcTK|jrW|jjtzt jkrt ddStj rt ddStj d{V\}}t d|t d||rPttj|tjx}r!t#||j|jd{V|rDttj|x}r!t#||j|jd{V|jdddS) NzRCleanupRevertPlugin process_cleanup_revert skipped due _cleanup_revert_flag existszFCleanupRevertPlugin process_cleanup_revert skipped due to free licensez3CleanupRevertPlugin process_cleanup_revert files %sz1CleanupRevertPlugin process_cleanup_revert dbs %s)statusesiT)modeexist_ok)rexistsstatst_mtimer timeloggerinforis_freer pathslistrget_hitsr RESTORABLEr r initiatorget_db_hits_for_remote_reverttouch)rfilesdbshitss rr!z*CleanupRevertPlugin.process_cleanup_revert<s  % , , . . *//11:VCikk KK/    F      KK     F+133333333 s A5     GMMM  E#$4$?t E #4T^DDDDDDDDD  EJDSIIJJJt E"4T^DDDDDDDDD !''UT'BBBBBr)__name__ __module__ __qualname__r IMUNIFYr6rr__annotations__r"rr$r&r!rrrr*s&.I E7T>   EIII g $    ///%C%C%C%C%Crr)__doc__loggingr.pathlibr defence360agent.contracts.configr!defence360agent.contracts.licenser!defence360agent.contracts.pluginsr"defence360agent.internals.the_sinkrdefence360agent.utilsrr imav.api.cleanup_revertr imav.malwarelib.cleanup.storager imav.malwarelib.cleanup.typesr imav.malwarelib.configr imav.malwarelib.modelrr getLoggerr<r/rrArrrPsD* 111111888888;;;;;;666666CCCCCCCC444444888888@@@@@@333333,,,,,,   8 $ $7C7C7C7C7C-7C7C7C7C7Cr