gdZddlmZddlZddlmZmZddlmZddl m Z m Z ddlm Z m Z ddlmZmZeeZGd d eZdS) 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 ) getLoggerN) MessageSinkScope) LicenseCLN) hosting_panelcpanel)CLNCLNError)RecurringCheckStoprecurring_checkcTeZdZdZejZdZdZe ddZ dS)Imunify360RegisterziThis plugin is used to register the server by IP and should work only for cPanel and ImunifyAV cases.cK||_tjjtjjkr3|j||_dSd|_dSN) _loopr HostingPanelNAMErcPanel create_task _register_task)selfloops P/opt/imunify360/venv/lib/python3.11/site-packages/imav/plugins/im360_register.py create_sinkzImunify360Register.create_sink(sY  % ' ' , 0B B B//0@0@AADJJJDJJJchK|jr(|j|jd{VdSdSr)rcancel)rs rshutdownzImunify360Register.shutdown/sN :  J     *           riQcKtjddkrt t jdd{VdS#t j$rt$rB}dt|j vr!t d|Yd}~dSYd}~dSd}~wt$r&}t d|Yd}~dSd}~wwxYw)N license_type imunify360IPLzIP license not foundz+CLN errror on attempt to register by ip: %sz&Error on attempt to register by ip: %r)r license_infogetr r registerasyncioCancelledErrorr strmessageloggererror Exception)res rrzImunify360Register._register4s+  " $ $ ( ( 8 8L H H$&& & F,u%% % % % % % % % % %%     O O O*c!)nn<< JANNNNNNNNN=<<<<< F F F LLA1 E E E E E E E E E Fs#AC!11B.. C!;CC!N) __name__ __module__ __qualname____doc__rAVSCOPErrr rrrrr"sp## HE _\"" F F#" F F Frr)r2loggingrr'!defence360agent.contracts.pluginsrrdefence360agent.internals.clnrdefence360agent.subsys.panelsrrr r defence360agent.utilsr r r/r+rr5rrr;s*@@@@@@@@444444????????77777777EEEEEEEE 8  FFFFFFFFFFr