[ Avaa Bypassed ]




Upload:

Command:

hmhc3928@18.217.128.174: ~ $
�
v�{gc@sMddlZddlZddlZddlmZddlmZddlmZddlmZddlmZddlm	Z	dd	lm
Z
ddlZe
je
j
gZd
ZdZdZed
�Zd�Zd�Zeje	je	j�dddd�edd��Zdefd��YZejd��Zd�ZdS(i����Ni(tutils(tauth(tselinux(t
http_utils(tconfig(terrors(t	constantss/usr/bin/gpgs/var/lib/kcare/gpgsrelease.content.jsonc	Cs�tj}|rtj}ntjr:tddd�}nt}xU|D]M}y|||�}PWqGtjk
r�}||dkr�|�q�qGXqGW||}t	j
||�|S(Ni����(RturlopenRturlopen_authRtFORCE_JSON_SIG_V3tSIG_VERIFY_ORDERRtNotFoundRtsave_to_file(	turltdsttdo_autht
urlopen_localtsig_extstsig_extt	signaturetnftsig_dst((s+/usr/libexec/kcare/python/kcarectl/fetch.pytfetch_signatures 		

cCs1tjjt�s-tjdjt���ndS(Ns$No {0} present. Please install gnupg(tostpathtisfiletGPG_BINRt
KcareErrortformat(((s+/usr/libexec/kcare/python/kcarectl/fetch.pyt
check_gpg_bin0scCs
t�|jtj�r�tjjtd�}ytj	|||�Wq	tj
k
r~}tjdj
|t|����q	Xn�t|d��}|j�}WdQXtjjtd�}ytj|||�Wn4tk
r}tjdj
|t|����nXdS(s8
    Check a file signature using the gpg tool.
    If signature is wrong BadSignatureException will be raised.

    :param file_path: path to file which signature will be checked
    :param signature: a file with the signature
    :return: True in case of valid signature
    :raises: BadSignatureException
    sroot-keys.jsonsBad Signature: {0}: {1}trbNs
kcare_pub.key(RtendswithRtSIG_JSONRRtjointGPG_KEY_DIRtkcsig_verifytverifytErrorRtBadSignatureExceptionRtstrtopentreadtrun_gpg_verifyt	Exception(t	file_pathRt	root_keystetftsigdatatkeyring((s+/usr/libexec/kcare/python/kcarectl/fetch.pytcheck_gpg_signature5s
(tcountitdelayicCs�tj|�}tj|�}tj||�|rG|j||�n+|rrt||dt�}t	||�nt
j||�|S(NR(RRRtselinux_safe_tmpnameRRtcheckRtTrueR2Rtrename(R
Rtcheck_signaturethash_checkertresponsettmpR((s+/usr/libexec/kcare/python/kcarectl/fetch.pyt	fetch_urlTstHashCheckercBseZd�Zd�ZRS(cCsK||_tj|�jd�d|_tjtj|��d|_dS(Nt/tfiles(	tcontent_fileRtget_patch_server_urltrstript
url_prefixtjsontloadst	read_filethashes(tselftbaseurlRA((s+/usr/libexec/kcare/python/kcarectl/fetch.pyt__init__es	cCs�|t|j�}||jkrCtjdj||j���ntjt	j
|��j�}|j|d}||kr�tjdj|||���ndS(Ns3Invalid checksum: {0} not found in content file {1}tsha256s<Invalid checksum: {0} has invalid checksum {1}, expected {2}(
tlenRDRHRRRRAthashlibRLRt
read_file_bint	hexdigestR&(RIR
tfnametcfnamethshtexpected_hsh((s+/usr/libexec/kcare/python/kcarectl/fetch.pyR6js!(t__name__t
__module__RKR6(((s+/usr/libexec/kcare/python/kcarectl/fetch.pyR>ds	cCs�tjs
dS|jsdS|jt�}tjj|�s|y&t	t
j|jt�|tj�Wq|t
jk
rxdSXnt|j|�S(N(RtUSE_CONTENT_FILE_V3tNoneRJt
cache_pathtCONTENT_FILERRtexistsR=RRBt
USE_SIGNATURERRR>(tlevelR((s+/usr/libexec/kcare/python/kcarectl/fetch.pytget_hash_checkerxs		&cs�fd�}|S(s=Enrish request with a cache key, and save it if responce had.cs�tj�}|dk	rEd|kr1i|d<n||dtj<n�||�}|jjtj�}|dk	r�||kr�tjtj|�n|S(Ntheaders(	Rt
get_cache_keyRXRtCACHE_KEY_HEADERR_tgettatomic_writetCACHE_KEY_DUMP_PATH(targstkwargst	cache_keytrespt
new_cache_key(tclbl(s+/usr/libexec/kcare/python/kcarectl/fetch.pytwrapper�s
((RjRk((Rjs+/usr/libexec/kcare/python/kcarectl/fetch.pytwrap_with_cache_key�s( RRERNtRRRRRRRR#tSIGR R
RR"RZtFalseRRR2tretryt	check_excR&RXR=tobjectR>tcachedR^Rl(((s+/usr/libexec/kcare/python/kcarectl/fetch.pyt<module>s,		$

Filemanager

Name Type Size Permission Actions
__init__.py File 69.58 KB 0644
__init__.pyc File 64.25 KB 0644
__init__.pyo File 64.25 KB 0644
__main__.py File 829 B 0644
__main__.pyc File 926 B 0644
__main__.pyo File 926 B 0644
auth.py File 11.87 KB 0644
auth.pyc File 11.82 KB 0644
auth.pyo File 11.82 KB 0644
config.py File 1.71 KB 0644
config.pyc File 2.01 KB 0644
config.pyo File 2.01 KB 0644
config_handlers.py File 7.26 KB 0644
config_handlers.pyc File 8.47 KB 0644
config_handlers.pyo File 8.47 KB 0644
constants.py File 1.27 KB 0644
constants.pyc File 1.34 KB 0644
constants.pyo File 1.34 KB 0644
errors.py File 1.29 KB 0644
errors.pyc File 2.94 KB 0644
errors.pyo File 2.94 KB 0644
fetch.py File 4.88 KB 0644
fetch.pyc File 5.47 KB 0644
fetch.pyo File 5.47 KB 0644
http_utils.py File 4.06 KB 0644
http_utils.pyc File 4.16 KB 0644
http_utils.pyo File 4.16 KB 0644
kcare.py File 8.56 KB 0644
kcare.pyc File 11.09 KB 0644
kcare.pyo File 11.09 KB 0644
libcare.py File 17.24 KB 0644
libcare.pyc File 19.16 KB 0644
libcare.pyo File 19.16 KB 0644
log_utils.py File 2.82 KB 0644
log_utils.pyc File 3.75 KB 0644
log_utils.pyo File 3.75 KB 0644
platform_utils.py File 3.4 KB 0644
platform_utils.pyc File 4.56 KB 0644
platform_utils.pyo File 4.56 KB 0644
process_utils.py File 3.81 KB 0644
process_utils.pyc File 3.67 KB 0644
process_utils.pyo File 3.67 KB 0644
py23.py File 1.74 KB 0644
py23.pyc File 2.15 KB 0644
py23.pyo File 2.15 KB 0644
selinux.py File 1.68 KB 0644
selinux.pyc File 2.43 KB 0644
selinux.pyo File 2.43 KB 0644
server_info.py File 2.99 KB 0644
server_info.pyc File 3.48 KB 0644
server_info.pyo File 3.48 KB 0644
update_utils.py File 923 B 0644
update_utils.pyc File 1.18 KB 0644
update_utils.pyo File 1.18 KB 0644
utils.py File 7.07 KB 0644
utils.pyc File 7.8 KB 0644
utils.pyo File 7.8 KB 0644