Your IP : 3.145.115.45


Current Path : /opt/alt/python39/lib64/python3.9/__pycache__/
Upload File :
Current File : //opt/alt/python39/lib64/python3.9/__pycache__/uuid.cpython-39.opt-2.pyc

a

R�f�j�@sNddlZddlZddlmZdZejdvr4dZZn ddlZe��Z	e	dkZe	dkZdZ
dZerhd	Z
d
Zgd�\ZZ
ZZeZeZGdd
�d
e�ZGdd�d�Zdd�Zdd�Zdd�Zdd�Zdd�Zdd�Zdd�Zdd�Zd d!�Zd"d#�Zd$d%�Z d&d'�Z!z*ddl"Z"e#e"d(d�Z$e#e"d)d�Z%e"j&Z'Wn$e(�yLdZ"dZ$dZ%dZ'Yn0d*d+�Z)d,d-�Z*d.d/�Z+d0d1�Z,e�r~eegZ-nFejd2k�r�eeegZ-n.ejd3k�r�gZ-ne�r�egZ-neeeeegZ-ej.d4k�r�e*ge-Z/nej.d5k�r�e+ge-Z/ne-Z/da0d6d7�Z1da2dDd8d9�Z3d:d;�Z4d<d=�Z5d>d?�Z6ed@�Z7edA�Z8edB�Z9edC�Z:dS)E�N)�EnumzKa-Ping Yee <ping@zesty.ca>)�win32�darwinFZAIXZLinux�:�.T)zreserved for NCS compatibilityzspecified in RFC 4122z$reserved for Microsoft compatibilityzreserved for future definitionc@seZdZdZdZdZdS)�SafeUUIDr���N)�__name__�
__module__�__qualname__ZsafeZunsafe�unknown�r
r
�)/opt/alt/python39/lib64/python3.9/uuid.pyrNsrc@s6eZdZdZd<ejd�dd�Zdd�Zdd	�Zd
d�Z	dd
�Z
dd�Zdd�Zdd�Z
dd�Zdd�Zdd�Zdd�Zdd�Zedd��Zed d!��Zed"d#��Zed$d%��Zed&d'��Zed(d)��Zed*d+��Zed,d-��Zed.d/��Zed0d1��Zed2d3��Zed4d5��Zed6d7��Z ed8d9��Z!ed:d;��Z"dS)=�UUID)�int�is_safe�__weakref__N)rcCs�|||||g�d�dkr td��|durl|�dd��dd�}|�d��dd�}t|�dkrbtd	��t|d
�}|dur�t|�d
kr�td��|ddd
�|ddd
�|ddd
�|dd�}|dur�t|�d
kr�td��tj|dd�}|du�rt|�dk�rtd��|\}}	}
}}}
d|k�r0dk�s:ntd��d|	k�rRdk�s\ntd��d|
k�rtdk�s~ntd��d|k�r�dk�s�ntd��d|k�r�dk�s�ntd��d|
k�r�dk�s�ntd ��|d>|B}|d!>|	d">B|
d#>B|d$>B|
B}|du�rDd|k�r:d%d&>k�sDntd'��|du�r�d%|k�rfdk�spntd(��|d)M}|d*O}|d+M}||d,>O}t�	|d-|�t�	|d.|�dS)/N�zGone of the hex, bytes, bytes_le, fields, or int arguments must be givenzurn:�zuuid:z{}�-� z$badly formed hexadecimal UUID string�z bytes_le is not a 16-char string�r���zbytes is not a 16-char string�big)�	byteorder�zfields is not a 6-tuplerlz*field 1 out of range (need a 32-bit value)iz*field 2 out of range (need a 16-bit value)z*field 3 out of range (need a 16-bit value)�z*field 4 out of range (need an 8-bit value)z*field 5 out of range (need an 8-bit value)�z*field 6 out of range (need a 48-bit value)�`�P�@�0��z*int is out of range (need a 128-bit value)zillegal version numberl�����l�����Lrr)
�count�	TypeError�replace�strip�len�
ValueError�int_�
from_bytes�object�__setattr__)�self�hex�bytes�bytes_le�fieldsr�versionr�time_low�time_mid�time_hi_version�clock_seq_hi_variant�
clock_seq_low�node�	clock_seqr
r
r�__init__�st 
�
�
����

z
UUID.__init__cCs&d|ji}|jtjkr"|jj|d<|S�Nrr)rrrr�value)r3�dr
r
r�__getstate__�s
zUUID.__getstate__cCs:t�|d|d�t�|dd|vr.t|d�ntj�dSrA)r1r2rr)r3�stater
r
r�__setstate__�s��zUUID.__setstate__cCst|t�r|j|jkStS�N��
isinstancerr�NotImplemented�r3�otherr
r
r�__eq__�s
zUUID.__eq__cCst|t�r|j|jkStSrGrHrKr
r
r�__lt__�s
zUUID.__lt__cCst|t�r|j|jkStSrGrHrKr
r
r�__gt__�s
zUUID.__gt__cCst|t�r|j|jkStSrGrHrKr
r
r�__le__s
zUUID.__le__cCst|t�r|j|jkStSrGrHrKr
r
r�__ge__s
zUUID.__ge__cCs
t|j�SrG)�hashr�r3r
r
r�__hash__sz
UUID.__hash__cCs|jSrG�rrSr
r
r�__int__szUUID.__int__cCsd|jjt|�fS)Nz%s(%r))�	__class__r	�strrSr
r
r�__repr__sz
UUID.__repr__cCstd��dS)NzUUID objects are immutable)r*)r3�namerBr
r
rr2szUUID.__setattr__cCsDd|j}d|dd�|dd�|dd�|dd�|dd�fS)N�%032xz%s-%s-%s-%s-%sr�r�rU)r3r4r
r
r�__str__s
2�zUUID.__str__cCs|j�dd�S)Nrr)r�to_bytesrSr
r
rr5sz
UUID.bytescCs<|j}|ddd�|ddd�|ddd�|dd�S)Nrrrrr�r5)r3r5r
r
rr6 s(
�z
UUID.bytes_lecCs|j|j|j|j|j|jfSrG)r9r:r;r<r=r>rSr
r
rr7&s�zUUID.fieldscCs
|jd?S)Nr!rUrSr
r
rr9+sz
UUID.time_lowcCs|jd?d@S)Nr"�rUrSr
r
rr:/sz
UUID.time_midcCs|jd?d@S)Nr#rarUrSr
r
rr;3szUUID.time_hi_versioncCs|jd?d@S)N�8�rUrSr
r
rr<7szUUID.clock_seq_hi_variantcCs|jd?d@S)Nr$rcrUrSr
r
rr=;szUUID.clock_seq_lowcCs|jd@d>|jd>B|jBS)N�r$r)r;r:r9rSr
r
r�time?s
��z	UUID.timecCs|jd@d>|jBS)N�?r)r<r=rSr
r
rr?Ds�zUUID.clock_seqcCs
|jd@S)Nl���rUrSr
r
rr>Isz	UUID.nodecCs
d|jS)Nr[rUrSr
r
rr4MszUUID.hexcCsdt|�S)Nz	urn:uuid:)rXrSr
r
r�urnQszUUID.urncCs2|jd@stS|jd@stS|jd@s*tStSdS)Nr'll)r�RESERVED_NCS�RFC_4122�RESERVED_MICROSOFT�RESERVED_FUTURErSr
r
r�variantUs


zUUID.variantcCs |jtkrt|jd?d@�SdS)Nr(�)rlrirrSr
r
rr8`s
zUUID.version)NNNNNN)#r	r
r�	__slots__rrr@rDrFrMrNrOrPrQrTrVrYr2r^�propertyr5r6r7r9r:r;r<r=rer?r>r4rgrlr8r
r
r
rrTs`4��V














rc	Gs�ddl}ddl}ddl}ddl}z�|j�d|j��|j�}|�	ddg�|j
||j�|�d�}|durlWdSt|j�}d|d<|j
|f||j|j|d�}	|	s�WdS|	��\}
}|�|
�WSt|jfy�YdS0dS)	Nr�PATHz/sbinz	/usr/sbin)�path�C�LC_ALL)�stdout�stderr�env)�io�os�shutil�
subprocess�environ�get�defpath�split�pathsep�extendZwhich�join�dict�Popen�PIPEZDEVNULLZcommunicate�BytesIO�OSErrorZSubprocessError)�command�argsrwrxryrzZ	path_dirs�
executablerv�procrtrur
r
r�_get_command_stdoutgs( 
�r�cCs
|d@S)Nlr
��macr
r
r�
_is_universal�sr�cCs�t||�}|durdSd}|D]�}|������}tt|��D]f}|||vr>z"|||�}	t|	�td�d�}
Wnt	t
fy�Yq>0t|
�r�|
S|p�|
}q>q|p�dS)N�r)r��lower�rstripr~�ranger-rr+�
_MAC_DELIMr.�
IndexErrorr�)r�r��keywordsZget_word_indexrt�first_local_mac�line�words�i�wordr�r
r
r�_find_mac_near_keyword�s"	
r�cCs�|�t�}t|�dkrdStrJtdd�|D��s4dSd�dd�|D��}n tdd�|D��s`dSd�|�}zt|d�WSty�YdS0dS)Nrcss*|]"}dt|�kodknVqdS)r%�N�r-��.0�partr
r
r�	<genexpr>�r�z_parse_mac.<locals>.<genexpr>r�css|]}|�dd�VqdS)r��0N)�rjustr�r
r
rr��r�css|]}t|�dkVqdS)r�Nr�r�r
r
rr��r�r)r~r�r-�_MAC_OMITS_LEADING_ZEROES�allr�rr.)r��partsZhexstrr
r
r�
_parse_mac�s

r�c	Cs�t||�}|durdS|������}z|�|�}WntyHYdS0d}|D]b}|����}z||}	Wnty�YqRYn0t|	�}
|
dur�qRt|
�r�|
S|durR|
}qR|SrG)	r��readliner�r~�indexr.r�r�r�)r�r�Zheadingrtr�Zcolumn_indexr�r�r�r�r�r
r
r�_find_mac_under_heading�s.

r�cCs4d}dD]&}td||dd��}|r*|SdSdS)N)shwaddrsethersaddress:slladdr)rz-az-avZifconfigcSs|dS�Nr%r
�r�r
r
r�<lambda>�r�z#_ifconfig_getnode.<locals>.<lambda>�r�)r�r�r�r
r
r�_ifconfig_getnode�sr�cCs tdddgdd��}|r|SdS)NZip�links
link/ethercSs|dSr�r
r�r
r
rr�r�z_ip_getnode.<locals>.<lambda>r�r�r
r
r�_ip_getnodesr�cCs�ddl}ddl}z|�|���}Wnty6YdS0tdd|�|�gdd��}|rZ|Stdd|�|�gdd��}|r||Stdd|�d|�gdd��}|r�|SdS)	NrZarpz-ancSsdS)Nrr
r�r
r
rr�r�z_arp_getnode.<locals>.<lambda>cSs|dSr�r
r�r
r
rr�r�z(%s)cSs|dS)Nr�r
r�r
r
rr�r�)rx�socketZ
gethostbynameZgethostnamer�r��fsencode)rxr�Zip_addrr�r
r
r�_arp_getnodes"�r�cCstdddgdd��S)NZlanscanz-aislan0cSsdS)Nrr
r�r
r
rr�(r�z"_lanscan_getnode.<locals>.<lambda>r�r
r
r
r�_lanscan_getnode%sr�cCstddd�S)NZnetstatz-iansAddress)r�r
r
r
r�_netstat_getnode*sr�cCst�SrG��_windll_getnoder
r
r
r�_ipconfig_getnode/sr�cCst�SrGr�r
r
r
r�_netbios_getnode4sr�Zgenerate_time_safeZ
UuidCreatecCsdSrGr
r
r
r
r�_load_system_functionsGsr�cCstrt�\}}t|d�jSdS)Nr`)�_generate_time_saferr>)�	uuid_time�_r
r
r�
_unix_getnodeKs
r�cCstrt�}t|d�jSdS)N)r6)�_UuidCreaterr>)Z
uuid_bytesr
r
rr�Qsr�cCsddl}|�d�dBS)Nrr$l)�random�getrandbits)r�r
r
r�_random_getnodeWsr�rr�posix�ntcCsdtdurtSttgD]H}z
|�aWnYqYn0tdurdtkrRdkrnqtSqdS)Nrr )�_node�_GETTERSr�)�getterr
r
r�getnode�s	

 
r�cCstdur\||urdur\nn<t�\}}zt|�}WntyNtj}Yn0t||d�Sddl}|��}|dd}tdur�|tkr�td}|a|dur�ddl}|�	d�}|d@}	|d?d	@}
|d
?d@}|d@}|d
?d@}
|dur�t
�}t|	|
||
||fdd�S)N)r5rr�dl@'Hw�
r%�l��rrar$rdrcrrf)r7r8)r�rr.rrre�time_ns�_last_timestampr�r�r�)r>r?r�Zsafely_generatedrreZnanosecondsZ	timestampr�r9r:r;r=r<r
r
r�uuid1�s8 

��r�cCs<ddlm}||jt|d�dd���}t|dd�dd�S)	Nr)�md5�utf-8F)Zusedforsecurityrr�r5r8)�hashlibr�r5�digestr)�	namespacerZr�r�r
r
r�uuid3�s�
r�cCstt�d�dd�S)Nrrr�)rrx�urandomr
r
r
r�uuid4�sr�cCs8ddlm}||jt|d����}t|dd�dd�S)Nr)�sha1r�rrr�)r�r�r5r�r)r�rZr�rRr
r
r�uuid5�sr�z$6ba7b810-9dad-11d1-80b4-00c04fd430c8z$6ba7b811-9dad-11d1-80b4-00c04fd430c8z$6ba7b812-9dad-11d1-80b4-00c04fd430c8z$6ba7b814-9dad-11d1-80b4-00c04fd430c8)NN);rx�sys�enumr�
__author__�platformZ_AIXZ_LINUX�systemZ_platform_systemr�r�rhrirjrkrr/r5Zbytes_rrr�r�r�r�r�r�r�r�r�r�r�r�Z_uuid�getattrr�r�Zhas_uuid_generate_time_safeZ_has_uuid_generate_time_safe�ImportErrorr�r�r�r�Z_OS_GETTERSrZr�r�r�r�r�r�r�r�Z
NAMESPACE_DNSZ
NAMESPACE_URLZ
NAMESPACE_OIDZNAMESPACE_X500r
r
r
r�<module>/s�

)#&



�
&	

?>