404

[ Avaa Bypassed ]




Upload:

Command:

elspacio@3.144.250.42: ~ $
3

e�$g2�@sFdZddlZddlZddlZddlZddlmZmZddlm	Z	m
Z
yddlmZm
Z
Wn$ek
r|ddlmZm
Z
YnXddlZejddd�Zeed	�s�eje_ejZd:d;d<d=d>d?d@dAdBdCdDdEdFdddd d!gfd"�Zd#dd$gZGd%d&�d&�ZGd'd(�d(�Zd)d*�Zd+d,�Zd-d.�Zd/d0�Zd1d2�Zd3d4�Zd5d6�Z dGd8d9�Z!dS)Hzj
This module includes the Config and Up2date Config classes use by the
up2date agent to hold config info.
�N)�idn_ascii_to_puny�idn_puny_to_unicode)�ustr�sstr)�urlsplit�
urlunsplitzrhn-client-toolsT)Zfallback�ugettext�Use a HTTP Proxy�Remote server URL�)https://xmlrpc.cln.cloudlinux.com/XMLRPC/�Mirror list URL�>https://repo.cloudlinux.com/cloudlinux/mirrorlists/cln-mirrors�#Whether or not debugging is enabled�Location of system id�/etc/sysconfig/rhn/systemid�4Override the automatically determined system version��;HTTP proxy in host:port format, e.g. squid.example.com:3128�'The username for an authenticated proxy�.The password to use for an authenticated proxy�$To use an authenticated proxy or not�BNumber of attempts to make at network connections before giving up��)The CA cert used to verify the ssl server�'/usr/share/rhn/CLN-ORG-TRUSTED-SSL-CERT�Disable the reboot actionzDConfig options that can not be overwritten by a config update action�	sslCACert�	serverURL�disallowConfChanges�noReboot)ZenableProxyr�	mirrorURL�debug�systemIdPathZversionOverride�	httpProxy�	proxyUser�
proxyPasswordZenableProxyAuthZnetworkRetriesrrrr"ZtmpDirc@sleZdZdZddd�Zddd�Zdd�Zd	d
�Zdd�Zd
d�Z	dd�Z
dd�Zdd�Zdd�Z
dd�ZdS)�
ConfigFilez;class for handling persistent config options for the clientNcCsi|_||_|jr|j�dS)N)�dict�fileName�load)�self�filename�r,�/usr/lib/python3.6/config.py�__init__JszConfigFile.__init__cCs�|r
||_|jdkrdStj|jtj�s,dSt|jd�}d}�x�|j�D�]�}|jd�dkr^qH||j�}|spqH|ddkr�|dd�j�}qHnd}|jdd�}t	|�dkr�qH|dj�}t
|dj��}d}|jd	�}	|	dkr�|d|	�}|}d}|�rx|jd
�}
|dk�r"t|jt
j���}nVt	|
�dk�rVyt|�}Wntk
�rRYnXn"|
ddk�rjg}nd
d�|
D�}||f}||jk�r�|j|}|dk	�r�||df}|dk	�r�|d|f}||j|<qHW|j�dS)N�rr�#rr�\�=�z	[comment]�;r$r%cSsg|]}|j�r|j��qSr,)�strip)�.0�valr,r,r-�
<listcomp>�sz#ConfigFile.load.<locals>.<listcomp>���r9r9)r$r%)r(�os�access�R_OK�open�	readlines�findr5�split�lenrr�encode�locale�getpreferredencoding�int�
ValueErrorr'�close)r*r+�fZ	multiline�liner@�key�value�comment�pos�valuesZnewvalr,r,r-r)Psd






zConfigFile.loadc	CsJ|jdkrdStj|jtj�sTtjtjj|j�tj�sTttdtjj|j���dSt|jdd�}tj	|jdt
dd��|jd�|jd�|jd�x�|jj
�D]�}|j|\}}|jtd	||f��t|�tg�kr�|g}|tkr�ttjj|�}|jtd
|djtt|��f��|jd�q�W|j�tj|jd|j�dS)
Nz%s was not foundz.new�wZ0644�zI# Automatically generated Red Hat Update Agent config file, do not edit.
z# Format: 1.0
rz%s[comment]=%s
z%s=%s
r4�
)r(r:r;r<�path�dirname�print�_r=�chmodrE�writer'�keysr�type�FileOptions�map�abspath�join�strrG�rename)r*rHrJrLrKr,r,r-�save�s,
	


"zConfigFile.savecCs
||jkS)N)r')r*�namer,r,r-�__contains__�szConfigFile.__contains__cCs||kS)Nr,)r*rar,r,r-�has_key�szConfigFile.has_keycCs
|jj�S)N)r'rX)r*r,r,r-rX�szConfigFile.keyscCsdd�|jj�D�S)NcSsg|]}|d�qS)rr,)r6�ar,r,r-r8�sz%ConfigFile.values.<locals>.<listcomp>)r'rN)r*r,r,r-rN�szConfigFile.valuescCs|jj|�dS)N)r'�update)r*r'r,r,r-re�szConfigFile.updatecCs||jkr|j|dSdS)Nr)r')r*rar,r,r-�__getitem__�s
zConfigFile.__getitem__cCs0||jkr|j|}nd}|d|f|j|<dS)Nr)NN)r')r*rarKr7r,r,r-�__setitem__�s
zConfigFile.__setitem__cCs||jkr|j|dSdS)Nrr)r')r*rar,r,r-�info�s
zConfigFile.info)N)N)�__name__�
__module__�__qualname__�__doc__r.r)r`rbrcrXrNrerfrgrhr,r,r,r-r&Hs

H$r&c@sveZdZddd�Zdd�Zdd�Zdd	�Zd
d�Zdd
�Zdd�Z	dd�Z
dd�Zdd�Zdd�Z
dd�Zdd�ZdS)�ConfigNcCs.t�|_|jjt�|r$|jj|�i|_dS)N)r&�storedre�Defaultsr)�runtime)r*r+r,r,r-r.�s
zConfig.__init__cCs ||jkrdS||jkrdSdS)NTF)rprn)r*rar,r,r-rb�s


zConfig.__contains__cCs||kS)Nr,)r*rar,r,r-rc�szConfig.has_keycCs8t|jj��}x$|jj�D]}||kr|j|�qW|S)N)�listrprXrn�append)r*�ret�kr,r,r-rX�s
zConfig.keyscCs*g}x |j�D]}|j|j|��qW|S)N)rXrrrf)r*rsrtr,r,r-rN�sz
Config.valuescCs.g}x$|j�D]}|j||j|�f�qW|S)N)rXrrrf)r*rsrtr,r,r-�itemsszConfig.itemscCst|j��S)N)rArX)r*r,r,r-�__len__szConfig.__len__cCs||j|<dS)N)rp)r*rarKr,r,r-rgszConfig.__setitem__cCs,||jkr|j|S||jkr(|j|SdS)N)rprn)r*rar,r,r-rfs




zConfig.__getitem__cCs|jj|�S)N)rnrh)r*rar,r,r-rhszConfig.infocCs|jj�dS)N)rnr`)r*r,r,r-r`szConfig.savecCs8|jj|�x&|jj�D]}||jkr(q|j|=qWdS)N)rnr)rXrp)r*r+rtr,r,r-r)!s

zConfig.loadcCs ||j|<||jkr|j|=dS)N)rnrp)r*rarKr,r,r-�set+s

z
Config.set)N)rirjrkr.rbrcrXrNrurvrgrfrhr`r)rwr,r,r,r-rm�s
		
rmcCs^t�}d}|d}|rZ|dd�dkr2|dd�}|jd�}tt|d��|d<dj|�}|S)zl returns proxy string in format hostname:port
    hostname is converted to Punycode (RFC3492) if needed
    Nr#�zhttp://�:r)�initUp2dateConfigr@r^rr])�cfg�proxyZ	proxyHost�partsr,r,r-�getProxySetting2s

r~cCs:t|�}tt|dtt|d��|d|d|df��S)z? returns url where hostname is converted to Punycode (RFC3492) rrr3��)rrrrr)�url�sr,r,r-�convert_url_to_punyCsr�cCs6t|�}tt|dt|d�|d|d|df��S)zZ returns url where hostname is converted from Punycode (RFC3492). Returns unicode string. rrr3rr�)rrrr)r�r�r,r,r-�convert_url_from_punyHsr�c
Csvtd}|dkrd}|jd�rVt|jdd�d�� }ttj|j��}dd�|D�SQRXtj	|�}dd�|j
jd	�D�S)
Nr z>https://repo.cloudlinux.com/cloudlinux/mirrorlists/cln-mirrorszfile://rr/cSsg|]}|rt|��qSr,)r�)r6�mirrorr,r,r-r8Tsz+getServerlURLFromMirror.<locals>.<listcomp>cSsg|]}|rt|��qSr,)r�)r6r�r,r,r-r8VsrQ)r{�
startswithr=�replacer[r^r5r>�requests�get�textr@)r�Z
mirrorlistZmirrorsZrequestr,r,r-�getServerlURLFromMirrorMs

r�cCs>t�}t|d�tg�kr,dd�|dD�St|d�gSdS)z� return list of serverURL from config
        Note: in config may be one value or more values, but this
        function always return list
    rcSsg|]}t|��qSr,)r�)r6�ir,r,r-r8asz!getServerlURL.<locals>.<listcomp>N)rzrYr�)r{r,r,r-�
getServerlURLXsr�cCst�}|jd|�dS)z Set serverURL in config rN)rzrw)rr{r,r,r-�setServerURLesr�cCst�}|jd|�dS)z Set sslCACert in config rN)rzrw)rr{r,r,r-�setSSLCACertjsr��/etc/sysconfig/rhn/up2datecCsPytWntk
r daYnXtdkrLt|�adtd<tjj�rLdtd<tS)z<This function is the right way to get at the up2date config.NF�isattyT)r{�	NameErrorrm�sys�stdoutr�)Zcfg_filer,r,r-rzps

rz)r	r)r
r)rr
)rr)rr)rr)rr)rr)rr)rr)rr)rr)rr)r�)"rlr:r�rCr�Zrhn.connectionsrrZrhn.i18nrrZurlparserr�ImportErrorZurllib.parse�gettextZtranslation�t�hasattrrrUrorZr&rmr~r�r�r�r�r�r�rzr,r,r,r-�<module>sp

O


Filemanager

Name Type Size Permission Actions
__init__.cpython-36.opt-1.pyc File 113 B 0644
__init__.cpython-36.pyc File 113 B 0644
capabilities.cpython-36.opt-1.pyc File 5.28 KB 0644
capabilities.cpython-36.pyc File 5.34 KB 0644
cldetect.cpython-36.opt-1.pyc File 2.31 KB 0644
cldetect.cpython-36.pyc File 2.31 KB 0644
clientCaps.cpython-36.opt-1.pyc File 1.98 KB 0644
clientCaps.cpython-36.pyc File 1.98 KB 0644
clpwd.cpython-36.opt-1.pyc File 3.9 KB 0644
clpwd.cpython-36.pyc File 3.9 KB 0644
config.cpython-36.opt-1.pyc File 10.38 KB 0644
config.cpython-36.pyc File 10.38 KB 0644
debUtils.cpython-36.opt-1.pyc File 2.03 KB 0644
debUtils.cpython-36.pyc File 2.03 KB 0644
getMethod.cpython-36.opt-1.pyc File 2.25 KB 0644
getMethod.cpython-36.pyc File 2.25 KB 0644
haltree.cpython-36.opt-1.pyc File 3.07 KB 0644
haltree.cpython-36.pyc File 3.07 KB 0644
hardware.cpython-36.opt-1.pyc File 18.42 KB 0644
hardware.cpython-36.pyc File 18.42 KB 0644
hardware_gudev.cpython-36.opt-1.pyc File 7.69 KB 0644
hardware_gudev.cpython-36.pyc File 7.69 KB 0644
hardware_hal.cpython-36.opt-1.pyc File 6.73 KB 0644
hardware_hal.cpython-36.pyc File 6.73 KB 0644
hardware_udev.cpython-36.opt-1.pyc File 7.67 KB 0644
hardware_udev.cpython-36.pyc File 7.67 KB 0644
pkgUtils.cpython-36.opt-1.pyc File 269 B 0644
pkgUtils.cpython-36.pyc File 269 B 0644
pkgplatform.cpython-36.opt-1.pyc File 288 B 0644
pkgplatform.cpython-36.pyc File 288 B 0644
pmPlugin.cpython-36.opt-1.pyc File 2.45 KB 0644
pmPlugin.cpython-36.pyc File 2.45 KB 0644
rhnChannel.cpython-36.opt-1.pyc File 4.39 KB 0644
rhnChannel.cpython-36.pyc File 4.39 KB 0644
rhnHardware.cpython-36.opt-1.pyc File 468 B 0644
rhnHardware.cpython-36.pyc File 468 B 0644
rhnPackageInfo.cpython-36.opt-1.pyc File 1.9 KB 0644
rhnPackageInfo.cpython-36.pyc File 1.9 KB 0644
rhncli.cpython-36.opt-1.pyc File 7.17 KB 0644
rhncli.cpython-36.pyc File 7.17 KB 0644
rhnreg.cpython-36.opt-1.pyc File 27 KB 0644
rhnreg.cpython-36.pyc File 27.25 KB 0644
rhnreg_constants.cpython-36.opt-1.pyc File 13.69 KB 0644
rhnreg_constants.cpython-36.pyc File 13.69 KB 0644
rhnserver.cpython-36.opt-1.pyc File 4.6 KB 0644
rhnserver.cpython-36.pyc File 4.6 KB 0644
rpcServer.cpython-36.opt-1.pyc File 7.27 KB 0644
rpcServer.cpython-36.pyc File 7.27 KB 0644
rpmUtils.cpython-36.opt-1.pyc File 3.11 KB 0644
rpmUtils.cpython-36.pyc File 3.11 KB 0644
transaction.cpython-36.opt-1.pyc File 2.59 KB 0644
transaction.cpython-36.pyc File 2.59 KB 0644
tui.cpython-36.opt-1.pyc File 31.25 KB 0644
tui.cpython-36.pyc File 31.25 KB 0644
up2dateAuth.cpython-36.opt-1.pyc File 7.07 KB 0644
up2dateAuth.cpython-36.pyc File 7.07 KB 0644
up2dateErrors.cpython-36.opt-1.pyc File 13.32 KB 0644
up2dateErrors.cpython-36.pyc File 13.32 KB 0644
up2dateLog.cpython-36.opt-1.pyc File 2.48 KB 0644
up2dateLog.cpython-36.pyc File 2.48 KB 0644
up2dateUtils.cpython-36.opt-1.pyc File 4.06 KB 0644
up2dateUtils.cpython-36.pyc File 4.06 KB 0644