/opt/cloudlinux/venv/lib/python3.11/site-packages/__pycache__
Edit: /opt/cloudlinux/venv/lib/python3.11/site-packages/__pycache__/cllicenselib.cpython-311.pyc (16193B)
§
rbß1Ì‚·×ã óø — d dl Z d dlZd dlZd dlZd dlZd dlZd dlZd dlZd dlm Z m
Z
d dlZd dl
mZ dZdZdZdZej e¦ « ZdZej ed ¦ « Zej ed
¦ « Zej ed¦ « ZdZd
ZdZdZeddœeddœdœZdZ G d„ d¦ « Z! e!¦ « Z"de#fd„Z$de#de%fd„Z&d„ Z'd„ Z(d„ Z)d„ Z*d„ Z+d „ Z,d!„ Z-d"„ Z.dS )#é N)ÚerrorÚrequest)Úmod_makedirsz/usr/sbin/rhn_checkz/usr/sbin/rhnreg_ksz--activationkey=-z/var/lve/lveinfo.verz/etc/sysconfig/rhnÚsystemidz jwt.tokenÚjwt_last_update_tsi€ô i@8 z1/usr/share/cloudlinux/no_valid_license_screen.txtz3/usr/share/cloudlinux/license_out_of_date_email.txtz3Error: License out of date, email template missing.)Ú
template_fileÚ error_msgz3Error: No valid license found, template is missing.)ÚEmailÚNoValidz!https://cloudlinux.com/showip.phpc óN — e Zd ZdZdZdZed„ ¦ « Zd„ Zd„ Z d„ Z
d„ Zd„ ZdS ) ÚLicenseDataÚ c ój — t j t ¦ « r£t j t ¦ « sdS t t j t ¦ « ¦ « }|t t j ¦ « ¦ « t z
k rdS t t ¦ « }||k rdS dS t j t ¦ « rGt j t ¦ « }|t j | ¦ « k S dS )aý
Update license when:
in case JWT token present:
- if no timestamp file with jwt token last update time
- if jwt token was not updated during last 4 hours
- if jwt token was updated later than our timestamp in file
in case JWT token is not present, but systemid exists
(fallback for licensing w/o token)
- update license only if systemid was changed after last timestamp update
when no jwt and no systemid - re-update license
TF)ÚosÚpathÚexistsÚ JWT_TOKENÚJWT_TOKEN_TIMESTAMP_FILEÚintÚgetmtimeÚtimeÚJWT_UPDATE_INTERVALÚread_time_from_fileÚRHN_SYSTEMID)Úlicense_timestamp_fileÚrhn_updatedÚjwt_last_update_timestamps úpy/cllicenselib.pyÚ_is_license_needs_updatez$LicenseData._is_license_needs_updateR sè € õ Œ7�>Š>�)Ñ$Ô$ð Ý”7—>’>Õ":Ñ;Ô;ð
Ø�tÝ�bœg×.Ò.yÑ9Ô9Ñ:Ô:ˆKØ�S¥¤¡¤Ñ-Ô-Õ0CÑCÒCÐCØ�tÝ(;Õ
Š>�,Ñ'Ô'ð JÝœ'×*Ò*<Ñ8Ô8ˆKØ¥¤×!1Ò!1Ð2HÑ!IÔ!IÒIÐI؈tó c óZ — t |¦ « | _ t t j ¦ « ¦ « | j z
t k rG| |¦ « rt
¦ « S t j t ¦ « S dS # t t j
f$ r Y dS w xY w)zè
Checks license:
1. Reads cache file with timestamp
2. Ensures license must be re-checked:
- if timestamp in cache file > CACHE_TIME ->
check if we need to re-update licensing
TF)r Ú_license_last_timestampr r Ú
CACHE_TIMEr Úupdate_license_timestamp_filer r r r ÚIOErrorÚstructr )Úselfr s r Ú
check_licensezLicenseData.check_licenseq s € ð å+>Ð?UÑ+VÔ+VˆDÔ(Ý•D”I‘K”KÑ Ô 4Ô#?Ñ?Å:ÒMÐMØ×0Ò0Ð1GÑHÔHð ;Ý8Ñ:Ô:Ð:õ ”w—~’~¥iÑ0Ô0Ð0Ø�4øÝ�œÐ&ð