Jjj D d Z ddlZddlZddlZddlZddlmZ ddlmZ ddl m
Z
ddlmZm
Z
ddlmZ ddlmZ ej d Z ej d
Z ej e ZdZdZd
ZdZdZdZdZ G d de Z G d de Z! G d d Z"dS )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)suppress)IntEnum)Path)ListOptional)importer)PatchmanConfigzcryptography.x509zpyasn1.codec.der.decoderzlicensing.patchman.coi z/etc/patchman/ca.crtz"/etc/patchman/license/patchman.crtz"/etc/patchman/license/patchman.keyz*https://{address}:{port}/v2/imunifyav_key/z1.3.6.1.4.1.44098.2.1.3c F e Zd ZdZdZdZdZdZdZdZ dZ
d Zd
ZdZ
dZd
ZdZdS )Featurezr
Patchman functionality depending on the license.
See patchman agent implementation for more details.
r
N)__name__
__module____qualname____doc__CoreCoreMalwareQuarantineCoreVulnerabilitiesPatchRulesMalwareScanRulesMalwareCleanEcommerceVulnerabilitiesScanEcommerceVulnerabilitiesPatchPluginVulnerabilitiesScanPluginVulnerabilitiesPatchScanningMultithreadedScanningRealtimePatchDependenciesWaf J/opt/imunify360/venv/lib/python3.11/site-packages/imav/patchman/license.pyr r 1 sf
D #$ $%! !!"
CCCr* r c e Zd ZdS )PatchmanLicenseErrorN)r r r r) r* r+ r- r- F s Dr* r- c e Zd Zed Zedee fd Zedefd Z ed Z
edee fd Z
edee fd ZdS ) Licensec N t t S N)r LICENSE_CERT_FILEexistsclss r+ is_activezLicense.is_activeK s %&&--///r* returnc g }| r?t t d 5 }t | }ddd n# 1 swxY w Y t
d |j D d x}rt |j
j
\ }}| }| t j t |d D ]Y\ }} | dk rNt! t" 5 | t | ddd n# 1 swxY w Y Zt$ d| |S )zX
Return the list of features available for the current patchman license
rbNc 3 D K | ]}|j j t k |V d S r1 )oid
dotted_stringFEATURES_EXTENSION_OID).0exts r+ z'License.get_features..Y s? w,0FFF FFFF r* r )start1zPatchman license features: %s)r6 openr2 x509load_pem_x509_certificatereadnext
extensionsasn1_decoderdecodevalueasBinaryappendr r enumerater
ValueErrorloggerinfo)
r5 featuresfcertr? asn1_data_ bitstringposrK s
r+ get_featureszLicense.get_featuresO s
==?? :'..
@!55affhh??
@
@
@
@
@
@
@
@
@
@
@
@
@
@
@ #
s
: ,2239?CC 1%..00 ---"+IQ"?"?"? : :JC||%j11 : :$OOGCLL999: : : : : : : : : : : : : : :3X>>>s# -A&&A*-A*#EE E c B t j | v S r1 )r r rY r4 s r+ has_clean_modezLicense.has_clean_modem s (C,<,<,>,>>>r* c B t j | v S r1 )r r&