__  __    __   __  _____      _            _          _____ _          _ _ 
 |  \/  |   \ \ / / |  __ \    (_)          | |        / ____| |        | | |
 | \  / |_ __\ 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:

[email protected]: ~ $
�

x[h������SSKrSSKrSSKrSSKrSSKrSSKrSSKrSSKrSSKJ	r	J
r
Jr SSKJ
r
 SSKJr SSKJr SSKJr SSKJr SSKJrJrJrJrJrJrJrJrJr SS	K J!r!J"r"J#r#J$r$ SSK%r%SS
K%J&r& SSK'J(r(J)r)J*r* \RV"\,5r-Sr.\\S
/\/4r0Sr1Sr2S\34Sjr4SKS\5S\6S\7SS4Sjjr8S\5SS4Sjr9S\S4Sjr:"SS5r;"SS\;5r<"SS\;5r="S S!5r>"S"S
\?5r@S#rAS$\5S\64S%jrBSS&.S'\@S(\0S\\64S)jjrCSSSS*SSSSS+S+SSS,S+S-S,S..S(\0S/\/S\>4S0jjrDSLS1\S2\4S3\5S\3S4\R�S5\\6S\4S6jjrFSMS1\S2\4S8\\5S9\6S\3S\\\5\\>44
S:jjrG"S;S<\5rH\6"S=5S\-R�SSSSSS-S+S7S>.S?\6S\\6S@\SA\\SB\\6S(\0SC\\\\6/\64SD\5SE\/SF\64SGjjrJ"SHSI5rKSLSJjrLg)N�N)�ThreadPoolExecutor�TimeoutError�as_completed)�	parsedate)�partial)�	NOT_FOUND)�count)�create_default_context)	�Any�Callable�Iterator�List�Mapping�
NamedTuple�Optional�Tuple�Union)�quote�urlparse�urlsplit�
urlunparse)�
exceptions)�performance�util�version�REDACTED�UrlErrorc��[[USS95nUS(dUS(a
USUS'SUS'[U5$)N�http)�scheme���)�listrr)�url�
parsed_urls  �6/usr/lib/python3/dist-packages/cloudinit/url_helper.py�	_cleanurlr(1sC���h�s�6�2�3�J��a�=�Z��]�#�1�
�
�1�
��
�1�
��j�!�!�c�2�SnUnUHnU"X45nM
 U$)Nc���[[U55nUSnU(aURS5(dUS-
nU[[	U5SS9-
nX2S'[U5$)Nr"�/z/:)�safe)r$r�endswithr�strr)r%�add_on�
url_parsed�paths    r'�combine_single�#combine_url.<locals>.combine_single<sZ���(�3�-�(�
��!�}����
�
�c�*�*��C�K�D���c�&�k��-�-���1�
��*�%�%r)�)�base�add_onsr3r%r0s     r'�combine_urlr8;s'��&��C����S�)����Jr)�returnc
�L�[RS[RS[RS[RS[
S0nUR
[U55nU(d:[U[5(aURnU$[RS5 SnU$)z4helper for read_ftps to map return codes to a number�,���iXi�z9Unexpected exception type while connecting to ftp server.i����)
�ftplib�error_reply�
error_temp�
error_perm�error_proto�EOFError�get�type�
isinstance�OSError�errno�LOG�warning)�exc�ftp_error_codes�codes   r'�"ftp_get_return_code_from_exceptionrNKs���	���C����3����3����C��#��O����t�C�y�)�D���c�7�#�#��9�9�D��K�	
�K�K�K�
��D��Kr)r%�timeout�kwargs�FtpResponsec	�b�[U5nUR(d[S[SUS9e[R
"5nUR=(d SnUR=(d SnSUR:XGaG[R"[5S9n[RSUU5 URURUU=(d S	S
9 [RSU5 UR#UUR$=(d SS9 [RS5 UR'5 [RSUR,5 UR/SUR,3UR0S9 [3UR55U5[RS5 UR75 sSSS5 $[R8"5n
[RSX5 U
RURUU=(d S	S
9 [RSU5 U
R#UUR$=(d SS9 [RSUR,5 U
R/SUR,3UR0S9 [3UR55U5[RS5 U
R75 sSSS5 $![Ra$n[!U5n	[SUSU	S
3U	SUS9UeSnAff=f![R(a'n[R+S5 [SSSUS9UeSnAff=f![Ra$n[!U5n	[SUSU	S
3U	SUS9UeSnAff=f![RS5 UR75 f=f![Ra$n[!U5n	[SUSU	S
3U	SUS9UeSnAff=f![RS5 W
R75 f=f!,(df   g=f)aNconnect to URL using ftp over TLS and read a file

when using strict mode (ftps://), raise exception in event of failure
when not using strict mode (ftp://), fall back to using unencrypted ftp

url: string containing the desination to read a file from. The url is
    parsed with urllib.urlsplit to identify username, password, host,
    path, and port in the following format:
        ftps://[username:password@]host[:port]/[path]
    host is the only required component
timeout: maximum time for the connection to take
kwargs: unused, for compatibility with read_url
returns: UrlResponse
zInvalid url providedN��causerM�headersr%��	anonymous�ftps)�contextz3Attempting to connect to %s via port [%s] over tls.�@)�host�portrOz1Reading file from server over tls failed for url z [�]z"Attempting to login with user [%s]r#)�user�passwdzCreating a secure connectionz�Attempted to connect to an insecure ftp server but used a scheme of ftps://, which is not allowed. Use ftp:// to allow connecting to insecure ftp servers.r=zReading file: %szRETR )�callbackzClosing connectionz,Reading file from ftp server failed for url z(Attempting to connect to %s via port %s.)r�hostnamerr�io�BytesIOr\�usernamer r>�FTP_TLSr
rI�debug�connect�
all_errorsrN�login�password�prot_prArJr2�
retrbinary�writerQ�getvalue�close�FTP)r%rOrP�	url_parts�bufferr\r^�ftp_tls�erM�ftps           r'�	read_ftpsrvbs��� ��
�I�����(�y�$�C�
�	
�
������~�~�#����!�!�0�[���Y�%�%�%�
� �.�.�2�4����	�	�I����
���"�+�+��#�N�s� �� 
�I�I�:�D�A�
��
�
��$�-�-�3�����	�	�8�9���� �"
 ��	�	�,�i�n�n�=��"�"��I�N�N�+�,�v�|�|�#��#�6�?�?�#4�c�:��	�	�.�/��
�
��S
��V
��j�j�l���	�	�>������"�+�+��#�N�s���
�	�	�>��E��	�	��$�-�-�3�����	�	�,�i�n�n�=�����y�~�~�&6�7�&�,�,��O�"�6�?�?�#4�c�:��	�	�.�/��	�	��U
���$�$�$�

�9�!�<���*�*-��b���a�9�� ������

��&�$�$�
����C��
�N�� ��	��	��

��.�$�$�

�9�!�<���+�+.�%�r�$��q�:�� ������

���	�	�.�/��
�
���(�$�$�

�9�!�<���+�+.�%�r�$��q�:�� ������

���	�	�.�/��	�	���U
��s��<P �?AK�P �-AL�6A M�%P �C(N;�.%P �L�1L�L�P �M�,"M�M�P �N�*N	�	N�N�'N8�8P �;O3�O.�.O3�3O6�6'P�P � 
P.r2�FileResponsec�*�URS5(a[RSU5 [R"U5n[X 5$![an[U[SUS9UeSnAf[an[X3RSUS9UeSnAff=f)zeread a binary file and return a FileResponse

matches function signature with read_ftps and read_url
�dataz'Unable to post data to file resource %sNrS)rDrIrJr�load_binary_filerw�FileNotFoundErrorrr�IOErrorrH)r2rP�contentsrts    r'�
_read_filer~�s���
�z�z�&������=�t�D�M��(�(��.���H�+�+���O��Q�Y��$�G�Q�N���M��Q�W�W�d��E�1�L��M�s#� A�
B�A*�*
B�7B
�
B)rw�UrlResponserQc�n�UR5n[U5nURnUS:XdU(aSUS:Xa[UR40UD6$US;a[U40UD6$US;a[U40UD6$[RSU5 [U40UD6$![an[X0S9UeSnAff=f)	a Wrapper function around readurl to allow passing a file path as url.

When url is not a local file path, passthrough any kwargs to readurl.

In the case of parameter passthrough to readurl, default values for some
parameters. See: call-signature of readurl in this module for param docs.
)rTr%N�filer,r)rurX)r�httpszAttempting unknown protocol %s)�lstripr�
ValueErrorrr r~r2rv�readurlrIrJ)r%rP�parsedrtr s     r'�read_file_or_urlr��s����*�*�,�C�0��#����]�]�F�
���C�C�3�q�6�M��&�+�+�0��0�0�	�?�	"���'��'�'�	�$�	$��s�%�f�%�%����4�f�=��s�%�f�%�%���0��Q�(�a�/��0�s�B�
B4�%
B/�/B4c�*�\rSrSrSSjrSrSrSrg)�StringResponseic�6�X0l0UlXlX lg�N)rMrUr}r%)�selfr}r%rMs    r'�__init__�StringResponse.__init__s���	���� �
��r)c� �URS:H$)N���rM�r��argsrPs   r'�ok�StringResponse.oks���y�y�C��r)c�8�URRS5$)Nzutf-8)r}�decode�r�s r'�__str__�StringResponse.__str__s���}�}�#�#�G�,�,r))rMr}rUr%N�r�)�__name__�
__module__�__qualname__�__firstlineno__r�r�r��__static_attributes__r5r)r'r�r�s��� �-r)r�c�8^�\rSrSrSS\S\4U4SjjjrSrU=r$)rwi r}r%c�">�[TU]XUS9 g)Nr���superr�)r�r}r%rM�	__class__s    �r'r��FileResponse.__init__!s���
����T��2r)r5r��	r�r�r�r��bytesr/r�r��
__classcell__�r�s@r'rwrw s���3��3�S�3�3r)c�4^�\rSrSrS\S\4U4SjjrSrU=r$)rQi%r}r%c�$>�[TU]X5 gr�r�)r�r}r%r�s   �r'r��FtpResponse.__init__&s���
����'r)r5r�r�s@r'rQrQ%s���(��(�S�(�(r)c���\rSrSrS\R
4Sjr\S\4Sj5r	\S\
4Sj5rSS\4Sjjr
\S5r\S\4S	j5rS
rSS\\S\S\\4S
jjrSrg)ri*�responsec��Xlgr���	_response)r�r�s  r'r��UrlResponse.__init__+s��!�r)r9c�^�URRcgURR$)Nr))r��contentr�s r'r}�UrlResponse.contents.s%���>�>�!�!�)���~�~�%�%�%r)c�.�URR$r�)r�r%r�s r'r%�UrlResponse.url4s���~�~�!�!�!r)c�P�SnU(aSnSURs=::aU:ag gg)Nr;r<r�TFr�)r��redirects_ok�uppers   r'r��UrlResponse.ok8s-������E��$�)�)�#�e�#��$�r)c�.�URR$r�)r�rUr�s r'rU�UrlResponse.headersAs���~�~�%�%�%r)c�.�URR$r�)r��status_coder�s r'rM�UrlResponse.codeEs���~�~�)�)�)r)c�.�URR$r�)r��textr�s r'r��UrlResponse.__str__Is���~�~�"�"�"r)�
chunk_size�decode_unicodec#�V# �URRX5Shv�N gN7f)aDIterates over the response data.

When stream=True is set on the request, this avoids reading the content
at once into memory for large responses.

:param chunk_size: Number of bytes it should read into memory.
:param decode_unicode: If True, content will be decoded using the best
available encoding based on the response.
N)r��iter_content)r�r�r�s   r'r��UrlResponse.iter_contentLs����>�>�.�.�z�J�J�J�s�)�'�)r�N)F)r!F)r�r�r�r��requests�Responser��propertyr�r}r/r%�boolr�rU�intrMr�rr
r�r�r5r)r'rr*s���"��!2�!2�"��&�%�&��&�
�"�S�"��"�����&��&��*�c�*��*�#�EJ�K�"�3�-�K�=A�K�	�%��K�Kr)rc
�J�\rSrSrS	S\S\\S\\S\\4Sjjr	Sr
g)
ri[NrTrMrUr%c�~�[RU[U55 XlX lUc0OUUlX@lgr�)r|r�r/rTrMrUr%)r�rTrMrUr%s     r'r��UrlError.__init__\s4��	����s�5�z�*��
��	�&-�o��7����r)rS)NNN)r�r�r�r�rrr�rr/r�r�r5r)r'rr[sJ��#�%)�!�����s�m���'�"�	�
�c�]��r)c���0n[U5RnUS:XaWU(aPSU;aUS(a	USUS'OSUS'SU;aSU;aUSUS/US'U$SU;a[US5US'U$)Nr��ca_certs�verifyT�	cert_file�key_file�cert)rr r/)r%�ssl_details�ssl_argsr s    r'�
_get_ssl_argsr�js����H�
�c�]�
!�
!�F�
���[���$��Z�)@�!,�Z�!8�H�X��!%�H�X���+�%�*��*C��K�(��J�'� �H�V���O��K�
'�"�;�{�#;�<�H�V���Or)�retry_afterc�r�[U5nU$![a� [U5nU(d[S5e[[R"U5[R"5-
5nO(![a [
R
SU5 SnOf=fUS:a[
R
S5 SnU$f=f)a(Parse a Retry-After header value into an integer.

: param retry_after: The value of the Retry-After header.
    https://www.rfc-editor.org/rfc/rfc9110.html#section-10.2.3
    https://www.rfc-editor.org/rfc/rfc2616#section-3.3
: return: The number of seconds to wait before retrying the request.
z(Failed to parse Retry-After header valuezGFailed to parse Retry-After header value: %s. Waiting 1 second instead.r!rzBRetry-After header value is in the past. Waiting 1 second instead.)�floatr�r�time�mktimerI�info)r��to_wait�
time_tuples   r'�_get_retry_afterr�|s������$��,�N��+��	�"�;�/�J�� �!K�L�L��D�K�K�
�3�d�i�i�k�A�B�G���	��H�H�,��
�
�G�
	���Q�;��H�H�,�
��G���N�+�s3��
B6�AA-�,B6�-"B�B6�B� B6�5B6��exception_cb�errorr�c�D�U(aU"U5(agUR(aqURS:Xaa[RS5 UR(a%[	URRSS55$[R
S5 gU(dgUe)a�Handle exceptions raised during request processing.

If we have no exception callback or the callback handled the error or we
got a 503, return with an optional timeout so the request can be retried.
Otherwise, raise the error.

:param error: The exception raised during the request.
:param response: The response object.
:param exception_cb: Callable to handle the exception.

:return: Optional time to wait before retrying the request.
Ni�zEEndpoint returned a 503 error. HTTP endpoint is overloaded. Retrying.zRetry-After�1z7Unable to introspect response header. Waiting 1 second.r!)rMrIrJrUr�rDr�)r�r�s  r'�
_handle_errorr��sw��"��U�+�+���z�z�e�j�j�C�'����
5�	
��=�=�#�E�M�M�$5�$5�m�S�$I�J�J����J�K����
�Kr)r!TFr#)ryrO�retries�sec_betweenrU�
headers_cb�headers_redactr��check_status�allow_redirectsr��session�infinite�log_req_resp�request_method�streamr�c	��[U5nUUS.nUR[X55 U
US'U(dU(aSOSnUUS'Ub3[U[5(aUUS'O[[
U5S5US'Uc/nS	nU(a[[U5S	-S	5nS
[R"5-nUbUR5nO0nU(aUUS'UcSnUc[R"5n[5GHRnU(aU"U5nS
U;aUUS
'UUS'0nUR5H�unnUS:XaMUS:XajU(acUVs/sHnURU5(dMUPM nnU(a0[R "U5UW'UHn["UUU'M M|M~UUU'M� U(a"[$R'SUU
(aSOUUU5 UR("S0UD6nU	(aUR+5 [$R'SUUR,[/UR05US	-5 [3U5s $ [IS5es snf![4R6anUS9UeSnAf[4R:a@nUR<R,UR<R>US9nUnSnAO2SnAf[4R@anUS9nUnSnSnAOSnAff=f[CUUS9nU(dU
=(d US	-U:nU(dUUeU=(d Un US:�dGMJU(a[$R'SU5 [DRF"U 5 GM�)a�Wrapper around requests.Session to read the url and retry if necessary

:param url: Mandatory url to request.
:param data: Optional form data to post the URL. Will set request_method
    to 'POST' if present.
:param timeout: Timeout in seconds to wait for a response. May be a tuple
    if specifying (connection timeout, read timeout).
:param retries: Number of times to retry on exception if exception_cb is
    None or exception_cb returns True for the exception caught. Default is
    to fail with 0 retries on exception.
:param sec_between: Default 1: amount of seconds passed to time.sleep
    between retries. None or -1 means don't sleep.
:param headers: Optional dict of headers to send during request
:param headers_cb: Optional callable returning a dict of values to send as
    headers during request
:param headers_redact: Optional list of header names to redact from the log
:param ssl_details: Optional dict providing key_file, ca_certs, and
    cert_file keys for use on in ssl connections.
:param check_status: Optional boolean set True to raise when HTTPError
    occurs. Default: True.
:param allow_redirects: Optional boolean passed straight to Session.request
    as 'allow_redirects'. Default: True.
:param exception_cb: Optional callable to handle exception and returns
    True if retries are permitted.
:param session: Optional exiting requests.Session instance to reuse.
:param infinite: Bool, set True to retry indefinitely. Default: False.
:param log_req_resp: Set False to turn off verbose debug messages.
:param request_method: String passed as 'method' to Session.request.
    Typically GET, or POST. Default: POST if data is provided, GET
    otherwise.
:param stream: if False, the response content will be immediately
downloaded.
)r%r�r��POST�GET�methodNrOrr!z
Cloud-Init/%sry���z
User-AgentrUz'[%s/%s] open '%s' with %s configurationr�z(Read from %s (%s, %sb) after %s attempts)r%�rMrUr%r��1Please wait %s seconds while we wait to try againz"This path should be unreachable...r5)%r(�updater�rF�tuple�maxr�r�r�version_string�copyr��Sessionr	�itemsrD�deepcopyrrIrf�request�raise_for_statusr��lenr�rr�SSLErrorr�	HTTPErrorr�rU�RequestExceptionr�r��sleep�RuntimeError)!r%ryrOr�r�rUr�r�r�r�r�r�r�r�r�r�r��req_args�manual_tries�
user_agent�i�filtered_req_args�k�v�matched_headers�keyr�rt�	url_error�raised_exception�response_sleep_time�
will_retry�
sleep_times!                                 r'r�r��s[��j�C�.�C����H�
�O�O�M�#�3�4�"1�H�
���#'��U��'�H�X�����g�u�%�%�")�H�Y��"%�e�G�n�a�"8�H�Y�������L���3�w�<�!�+�Q�/�� �G�$:�$:�$<�=�J����,�,�.����������������"�"�$���W��� ��o�G��w�&�$.�G�L�!�%�������N�N�$�D�A�q��F�{���I�~�.�.<�"I�n�����a��1�n��"I�"�+/�=�=��+;�%�a�(�.��4<�)�!�,�S�1� /�#�
()�!�!�$�%�(	���	�	�=��"*�J���%�����2��2�H���)�)�+��I�I�:���$�$��H�$�$�%��Q��
��x�(�(�[�f�;�
<�<��M#J��B�"�"�	.��1�#�&�A�-���#�#�	!� ���Z�Z�+�+��
�
�*�*��	�I� !����*�*�	� ���,�I� ���H��	��
,��%�
��#�!�;�a�!�e�l�&:�J���%5�5�(�7�K�
���?���	�	�G���
�J�J�z�"s=�I&�6I&�BI+�+L�?J
�
L�!6K�L�3L�L�func.�addr�event�delayc�J�U(aURUS9(agU"X5$)z Execute func with optional delay�rON��wait�rrrOrrs     r'�_run_func_with_delayr#ps%��
�
�:�:�e�:�$�����r)�333333�?�	addresses�
stagger_delayc
�L�SnSnSn/n[R"5n[[U5S9n	[	U5V
Vs0sH up�U	R[UUUUX�-S9U_M" nn
n[X�S9Hon
X�nU
R5nU(aUnUR"U5 M4U
R5nU(dMMUR5 XT4s U	RSS9 $ U(a[RSUU5 Ue[RSU5 [!S	5es snn
f!["aF [RS
SR%U5SR%['[(U555 Of=fU	RSS9 XT4$!U	RSS9 f=f)aexecute multiple callbacks in parallel

Run blocking func against two different addresses staggered with a
delay. The first call to return successfully is returned from this
function and remaining unfinished calls are cancelled if they have not
yet started
N)�max_workersr"rFr z<Exception(s) %s during request to %s, raising last exceptionzEmpty result for address %szNo result returnedzJTimed out waiting for addresses: %s, exception(s) raised while waiting: %s� )�	threading�Eventrr�	enumerate�submitr#r�	exception�append�result�set�shutdownrIrfr�r�r�join�mapr/)rr%r&rO�
return_result�returned_address�last_exceptionr�is_done�executorrr�futures�future�return_exceptions               r'�
dual_stackr=�s����M���.2�N��J��o�o��G�"�c�)�n�=�H�5&�%�Y�/�

�0���
�O�O�$������(�

�
��
�0�	�

�#�7�<�F�&���%�/�/�1���!1���!�!�.�1� &�
�
��
� �=��K�K�M�,�<�<�2	���u��%�O=�$��I�I�-�� �	
�!� ��I�I�3�5E�F��1�2�2��S

��X�
��	�	�
4��H�H�Y���H�H�S��j�)�*�		
�
��	
�	���u��%��,�,��	���u��%�s=�D,�'D&�&AD,�?D,�#A	D,�,A
E<�9F�;E<�<F�F#c�F�\rSrSr%\\\S'\\\S'\\\S'Sr	g)�HandledResponsei�r%r��	wait_timer5N)
r�r�r�r�rr/�__annotations__rr�r�r5r)r'r?r?�s#��	�#����{�#�#����r)r?�inf)�max_waitrO�	status_cbr�r�rr��
sleep_time_cbr��connect_synchronously�async_delayrCrDr�rrEr�rFrGc��^^^^^^	^^^^^^^�S[S[4U4SjjnSS[S[S[4SjjmS	[[S
[[S[
[[[44SjmS[[/[
[[[[44S
[[[[4S[S[S[S[4UU4SjjmS
[S[S[4UUU	4SjjmS[4UUUUUUU4Sjjn
S[4UUUU4Sjjn[R"5nT(aU(a[S5eU
(aU
OUnU=(d UnSmSnU"X�Xs5nSmUR (a"UR"UR R$4$UR&(a)[R("UR&5 TS-mSmMyU"UT5nT"TUU5(agTS-m[*R-SU5 [R("U5 [R"5nU(aUU-UT-:�aTUU-
-
nUS::agM�)a�Wait for a response from one of the urls provided.

:param urls: List of urls to try
:param max_wait: Roughly the maximum time to wait before giving up
    The max time is *actually* len(urls)*timeout as each url will
    be tried once and given the timeout provided.
    a number <= 0 will always result in only one try
:param timeout: Timeout provided to urlopen
:param status_cb: Callable with string message when a url is not available
:param headers_cb: Callable with single argument of url to get headers
    for request.
:param headers_redact: List of header names to redact from the log
:param sleep_time: Amount of time to sleep between retries. If this and
    sleep_time_cb are None, the default sleep time defaults to 1 second
    and increases by 1 seconds every 5 tries. Cannot be specified along
    with `sleep_time_cb`.
:param exception_cb: Callable to handle exception and returns True if
    retries are permitted.
:param sleep_time_cb: Callable with 2 arguments (response, loop_n) that
    generates the next sleep time. Cannot be specified
    along with 'sleep_time`.
:param request_method: Indicates the type of HTTP request:
    GET, PUT, or POST
:param connect_synchronously: If false, enables executing requests
    in parallel
:param async_delay: Delay before parallel metadata requests, see RFC 6555

:return: tuple of (url, response contents), on failure, (False, None)

:raises: UrlError on unrecoverable error
�loop_numberr9c�>�TbT$US-S-$)N�r!r5)�_rIrs  �r'�default_sleep_time�(wait_for_url.<locals>.default_sleep_time
s���'�3�z�M���9I�A�9M�Mr)rrC�
start_timerc�z�U[S5S4;agUS:*=(d [R"5U-
U-U:�$)z4Check if time is up based on start time and max waitrBNFr)r�r��	monotonic)rCrOrs   r'�timeup�wait_for_url.<locals>.timeups@����e��d�+�+���A�
�
��N�N��z�)�J�6��A�	
r)r�r%c��SnSnU(aU(dSn[[U55nX24$URR5 UR(d;SUR-n[[U5URURUS9nX24$UR5(d8SUR-n[[U5URURUS9nX24$![R
RaKn[UURRURRUS9nU[U54sSnA$SnAff=f)z?Map requests response code/contents to internal "UrlError" typer#NzRequest timed outr�zempty response [%s]zbad status code [%s])rr�r�rr�rrr�r�rUr/r}rMr�)r�r%�reason�url_excrts     r'�handle_url_response�)wait_for_url.<locals>.handle_url_responses4�������S�(�F��z�&�1�2�G��?�"�	#�
���/�/�1�� � �*�h�m�m�<�F���6�"��]�]� �(�(��	�G�� � ������+�x�}�}�=�F���6�"��]�]� �(�(��	�G�� � ��3�"�"�,�,�	#����Z�Z�+�+��
�
�*�*��	�G��C��F�?�"��	#�s�C#�#E�AE�E�E�
url_reader_cb�urls�exc_cb�log_cbc	��>�SnSnU"U5upgT
"Xv5up�U(d
[XgSS9$[[R
"5U-
5n
T(aST-OSnSU=(d
 [
US	S	5<S
U
<SU<SU<3nU"U5 [SS[U[5(a[X�S
9S9$SS9$![an	SU	-nU	nSn	A	N�Sn	A	f[an	SU	-nU	nSn	A	N�Sn	A	ff=f)z:Execute request, handle response, optionally log exceptionr#N)r@zrequest error [%s]zunexpected error [%s]z%ss�	unlimitedz	Calling 'r%z
' failed [r,z]: r��r%r�r@)	r?r�	Exceptionr�r�rQ�getattrrFr�)rYrZrOr[r\rUr%r�rVrt�
time_taken�max_wait_str�
status_msgrWrCs             ��r'�read_url_handle_exceptions�0wait_for_url.<locals>.read_url_handle_exceptionsAs	�������
	�)�$�/�M�C�1�(�@�O�G��&�s��E�E������)�J�6�7�
�+3�u�x�'����1�7�7�E�5�1�1����	
�
�	�z������g�x�0�0��g�;�	
�	
��

�	
��!�	�)�A�-�F��G���	�,�q�0�F��G��	�s#�$B5�5
C)�?C�
C)�C$�$C)rOc	�6>�[UTc0OT"U5TUSTS9$)NF)rUr�rOr�r�)r�)r%rOr�r�r�s  ���r'�read_url_cb�!wait_for_url.<locals>.read_url_cbms-�����$�,�B�*�S�/�)���)�

�	
r)c��>^�S[4U
U4Sjjn/nTH�n[R"5nT
S:waIT(dBT"TU5(a
[SSSS9s $Tb$T(aUT-UT-:�a[	UT-U-
5mT"XFXU5nUR
(aUs $UR(dM�URUR5 M� U(a[U5OSn	[SSU	S9$)zliterate over list of urls, request each one and handle responses
and thrown exceptions individually per url
r%c�>�UT"UT54$r�r5)r%rhrOs ��r'�url_reader_serial�@wait_for_url.<locals>.read_url_serial.<locals>.url_reader_serial~s�����S�'�2�3�3r)rNr_)	r/r�rQr?r�r�r@r/r�)rOrOr[r\rl�
wait_timesr%�now�outr@�loop_nrC�must_try_againrhrerRrZs `        �������r'�read_url_serial�%wait_for_url.<locals>.read_url_serialws����	4�3�	4�	4��
��C��.�.�"�C���{�>��(�J�/�/�*� �4�4����(���w��*�x�*?�@�"�:��#8�C�"?�@�G�,�!�
�F��C��|�|��
������!�!�#�-�-�0�+�,(2�C�
�O�t�	��4�$�)�L�Lr)c�:>�[[TTUS9nT"UTXU5$)z�pass list of urls to dual_stack which sends requests in parallel
handle response and exceptions of the first endpoint to respond
)r&rO)rr=)	rOrOr[r\�url_reader_parallelrGrhrerZs	     ����r'�read_url_parallel�'wait_for_url.<locals>.read_url_parallel�s4���&���%��	
��*���z�6�
�	
r)z3sleep_time and sleep_time_cb are mutually exclusiveNTFr!r�)FN)r)r�r�rrr/rrrrrr�ExceptionCallbackr?r�rQr�r�r%r}r@r
rIrf)rZrCrOrDr�r�rr�rEr�rFrGrMrsrwrO�do_read_url�calculate_sleep_timer��resp�current_sleep_time�current_timerWrqrrrhrerRs``  ```  ` `          @@@@@@r'�wait_for_urlr�s\����^N�3�N�5�N�
��
�E�
�u�
�'!��;�'�'!�.6�s�m�'!�	�x��!�3�&�	'�'!�R*
��
�E�5��#����(=�=�>�>�
�*
��C��c��N�#�	*
�
�*
�"�
*
��*
�
�*
�*
�X
��
�s�
�{�
�
�"M�	�"M�"M�H
�	�
�
� ���!�J��m��N�O�O�1��6G��)�>�,>���F��H�
��:��H�����=�=��8�8�T�]�]�3�3�3�3�
�^�^��J�J�t�~�~�&��a�Z�F�!�N��1�(�F�C���(�J�(:�;�;��"��!����	�	�?��	
�	
�
�
�%�&��~�~�'���|�g�-�
�X�0E�E��,��";�<�G��!�|���=r)c�^�\rSrSrSSjrSrSrSrSrSr	S	r
S
rSrSr
S
rg)�OauthUrlHelperi�Nc�\�XlU=(d SUlX lX0lXPlSUlSUlURURUR4n[U5(dSUlO[U5(d[S5eUR5nU=(d 0Ulg)Nr#TrKFzBall or none of token_key, token_secret, or consumer_key can be set)�consumer_key�consumer_secret�	token_key�token_secret�skew_data_file�	_do_oauth�skew_change_limit�any�allr��read_skew_file�	skew_data)r�r�r�r�r�r��required�olds        r'r��OauthUrlHelper.__init__�s���)��.�4�"���"��(��,�����!"����N�N�D�$5�$5�t�7H�7H�I���8�}�}�"�D�N��X����*��
�
�!�!�#������r)c��UR(a�[RRUR5(aa[R
"SUR35 [
URSS9n[R"U5sSSS5 sSSS5 $g!,(df   O=fSSS5 g!,(df   g=f)NzReading �r��mode)	r��osr2�isfiler�Timed�open�json�load)r��fps  r'r��OauthUrlHelper.read_skew_file�s������2�7�7�>�>�$�2E�2E�#F�#F��"�"�X�d�.A�.A�-B�#C�D�d��#�#�#�G���y�y��}�G�G�D�D��	G�G��D��	E�D��s$�#B<�8B"�	B<�"
B0	�,B<�<
C
c�z�UR(dgUR5nUc0nX#U'[R"SUR35 [	URSS9nUR[R"U55 SSS5 SSS5 g!,(df   N=f!,(df   g=f)NzWriting �wr�)r�r�rr�r�rmr��dumps)r�r[�value�curr�s     r'�update_skew_file�OauthUrlHelper.update_skew_files����"�"���!�!�#���;��C��D�	�
�
�
��$�*=�*=�)>�?�
@�$����c�C
�
��H�H�T�Z�Z��_�%�C
�
@�
@�C
�C
��
@�
@�s$�B,�$&B�
B,�
B)	�%B,�,
B:c���[U[5(a URS:XdURS:XdgSUR;a![RSUR5 gURSn[R"[U55n[U[R"5-
5n[UR5RnURRUS5n[!Xu-
5UR":�a'UR%Xe5 [RSXe5 XPRU'g![a n[RSX$5 SnAgSnAff=f)Ni�i��datez$Missing header 'date' in %s responsez#Failed to convert datetime '%s': %srz$Setting oauth clockskew for %s to %d)rFrrMrUrIrJr�r�rr`r�rr%�netlocr�rD�absr�r�)r�r.r��remote_timert�skewr[�old_skews        r'r��OauthUrlHelper.exception_cbs���y�(�+�+����3�&�)�.�.�C�*?����*�*�*��K�K�>�	���O��� � ��(��	��+�+�i��o�6�K�
�;�����,�-���	�
�
�&�-�-���>�>�%�%�d�A�.���x���$�"8�"8�8��!�!�$�-��K�K�>��K�#���t�����	��K�K�=�t�G���	�s�8E�
E.�E)�)E.c	�^�UR(d0$Sn[U5RnUR(a=X0R;a.[	[
R
"55URU-n[
UURURURURUS9$)N)r%r�r�r�r��	timestamp)r�rr�r�r�r��
oauth_headersr�r�r�r�)r�r%r�r[s    r'r��OauthUrlHelper.headers_cb*s����~�~��I��	���}�#�#���>�>�d�n�n�4��D�I�I�K�(�4�>�>�$�+?�?�I����*�*��n�n��*�*� �0�0��

�	
r)c��[URURS55US'[URURS55US'U"U0UD6$)Nr�r�)r�_headers_cbrD�
_exception_cb)r��wrapped_funcr�rPs    r'�_wrapped�OauthUrlHelper._wrapped<s\��&����f�j�j��6� 
��|��")�����
�
�>� :�"
��~���T�,�V�,�,r)c�.�UR[X5$r�)r�rr�s   r'r�OauthUrlHelper.wait_for_urlEs���}�}�\�4�8�8r)c�.�UR[X5$r�)r�r�r�s   r'r��OauthUrlHelper.readurlHs���}�}�W�d�3�3r)c�x�SnU(aU"U5nURU5 U$!URU5 f=f)NTr�)r��extra_exception_cbr.�rets    r'r��OauthUrlHelper._exception_cbKs>����	)�!�(��3�����i�(��
��
���i�(�s�&�9c�h�0nU(aU"U5nURURU55 U$r�)r�r�)r��extra_headers_cbr%rUs    r'r��OauthUrlHelper._headers_cbTs.�����&�s�+�G����t���s�+�,��r))r�r�r�r�r�r�r�r�)NNNNz/run/oauth_skew.json)r�r�r�r�r�r�r�r�r�r�rr�r�r�r�r5r)r'r�r��sE������-�
#�6�&��8
�$-�9�4��r)r�c	���SSKJn U(a[	U5nOSnURUUUUURUS9nURU5up�nU
$![an[S5UeSnAff=f)Nrzoauth support is not available)�
client_secret�resource_owner_key�resource_owner_secret�signature_methodr�)�oauthlib.oauth1�oauth1�ImportError�NotImplementedErrorr/�Client�SIGNATURE_PLAINTEXT�sign)r%r�r�r�r�r�r�rt�client�_uri�signed_headers�_bodys            r'r�r�\s���K�(���	�N�	��	�
�]�]��%�$�*��3�3��
��F�#)�+�+�c�"2��D�%����#�K�!�"B�C��J��K�s�A�
A,�A'�'A,)rZr�)r$�
)Mrr>rbr��loggingr�r*r��concurrent.futuresrrr�email.utilsr�	functoolsr�http.clientr�	itertoolsr	�sslr
�typingrrr
rrrrrr�urllib.parserrrrr�r�	cloudinitrrr�	getLoggerr�rIrr�ryr(r8r�rNr/r��dictrvr~r�r�rwrQrr|rr�r�r�r�r+r#r=r?rfrr�r�r5r)r'�<module>r�s\���
�	���	���M�M�!��!��&�
�
�
�?�>���0�0�
����!�����X�z�l�D�&8�9�:��"�
� �s��.�3��������D
M�S�
M�~�
M� &�
�7�8�&�<-�-�3�>�3�
(�.�(�
.K�.K�b�w���$�#��%��J'+����$���e�_�	�J
��
��������&*��
����%m=�$�m=�$
�%m=�&�'m=�j"��
�3��8�
��

�����?�?�	�
�E�?��	�
�*!��	P-�
�3��8�
�P-��C�y�P-��P-��	P-�
�8�C�=�(�;�/�/�0�P-�f�j���E�l�#��)�)�%)��"&�&*�=A��"&��|��|��e�_�	|�
�|���"�
|����|�$�|��H�c�5�\�5�%8�9�:�|��|� �|��|�~|�|�@LP�r)

Filemanager

Name Type Size Permission Actions
__init__.cpython-313.pyc File 149 B 0644
apport.cpython-313.pyc File 9.96 KB 0644
atomic_helper.cpython-313.pyc File 4.39 KB 0644
cloud.cpython-313.pyc File 4.96 KB 0644
dmi.cpython-313.pyc File 9.85 KB 0644
event.cpython-313.pyc File 2.56 KB 0644
features.cpython-313.pyc File 1.85 KB 0644
gpg.cpython-313.pyc File 9.41 KB 0644
helpers.cpython-313.pyc File 21.72 KB 0644
importer.cpython-313.pyc File 2.82 KB 0644
lifecycle.cpython-313.pyc File 10.41 KB 0644
netinfo.cpython-313.pyc File 24.76 KB 0644
performance.cpython-313.pyc File 4.42 KB 0644
persistence.cpython-313.pyc File 3.04 KB 0644
registry.cpython-313.pyc File 1.86 KB 0644
safeyaml.cpython-313.pyc File 12.13 KB 0644
settings.cpython-313.pyc File 1.25 KB 0644
signal_handler.cpython-313.pyc File 5.39 KB 0644
simpletable.cpython-313.pyc File 3.36 KB 0644
socket.cpython-313.pyc File 7.08 KB 0644
ssh_util.cpython-313.pyc File 25.03 KB 0644
stages.cpython-313.pyc File 47.25 KB 0644
subp.cpython-313.pyc File 15.1 KB 0644
temp_utils.cpython-313.pyc File 3.96 KB 0644
templater.cpython-313.pyc File 9.34 KB 0644
type_utils.cpython-313.pyc File 755 B 0644
url_helper.cpython-313.pyc File 43.18 KB 0644
user_data.cpython-313.pyc File 13.78 KB 0644
util.cpython-313.pyc File 111.33 KB 0644
version.cpython-313.pyc File 576 B 0644
warnings.cpython-313.pyc File 4.48 KB 0644
Filemanager