HmdZddlZddlmZddlmZddlmZddlm Z ddl m Z m Z ddl mZdd lmZdd lmZdd lmZd ZGd de 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)%ms_imunify_patch_eligible_to_purchase) MessageSource)recurring_checksafe_cancel_task)CleanupRevertAPI)VulnerabilityHitStatus)VulnerabilityHit) restore_hitsi0*c&eZdZdZdZdZdZdS)PatchRevertPlugincdttjdz |_d|_d|_dS)N patch_revertimunify)rrTMPDIR_patch_revert_flag initiator_taskselfs `/opt/imunify360/venv/lib/python3.11/site-packages/imav/malwarelib/plugins/remote_patch_revert.py__init__zPatchRevertPlugin.__init__*s+"&t{"3"3n"D" cK||_|tt|j|_dSN)_sink create_taskrPERIODprocess_patch_revertr)rloopsinks r create_sourcezPatchRevertPlugin.create_source/sI %% > #OF # #D$= > > @ @   rcPK|jrt|jd{VdSdSr)rrrs rshutdownzPatchRevertPlugin.shutdown5sB : /"4:.. . . . . . . . . . / /rcKtd{VsdS|jr=|jjt zt jkrdStjd{V\}}|rKttj |tj gx}rt||jd{V|jdddS)N)statusesiT)modeexist_ok)rrexistsstatst_mtimertimePatchRevertAPIpathslistr get_hitsr PATCHEDr rtouch)rfiles_hitss rr z&PatchRevertPlugin.process_patch_revert9s&:<<<<<<<<  F  # * * , , (--//86Aikk F'-////////q  9 )%;%C$Dt 9 #4888888888 %%54%@@@@@rN)__name__ __module__ __qualname__rr#r%r rrrr)sU    ///AAAAArr)__doc__r-pathlibr defence360agent.contracts.configr%defence360agent.contracts.permissionsr!defence360agent.contracts.pluginsrdefence360agent.utilsrrimav.api.cleanup_revertr r.imav.malwarelib.configr imav.malwarelib.modelr 'imav.malwarelib.vulnerabilities.storager rrr:rrrEs!* 111111<;;;;;CCCCCCCC:99999222222@@@@@@ $A$A$A$A$A $A$A$A$A$Ar