__  __    __   __  _____      _            _          _____ _          _ _ 
 |  \/  |   \ \ / / |  __ \    (_)          | |        / ____| |        | | |
 | \  / |_ __\ 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�&����SSKrSSKrSSKrSSKrSSKJr "SS\RR5r	\RRS\	5 \RRRS/5 g)�N)�BackendExceptionc�p�\rSrSrSrSrSrSrSrSr	Sr
S	rS
rSr
SrSS
jrSrSrSrSrg)�
Megav3Backend�a\Backend for MEGA.nz cloud storage, only one that works for accounts created since Nov. 2018
See https://github.com/megous/megatools/issues/411 for more details

This MEGA backend resorts to official tools (MEGAcmd) as available at https://mega.nz/cmd
MEGAcmd works through a single binary called "mega-cmd", which keeps state (for example,
persisting a session). Multiple "mega-*" shell wrappers (ie. "mega-ls") exist as the user
interface to "mega-cmd" and MEGA API
The full MEGAcmd User Guide can be found in the software's GitHub page below :
https://github.com/meganz/MEGAcmd/blob/master/UserGuide.mdc��[RRRX5 UR	S5 UR	S5 UR	S5 UR	S5 UR	S5 UR	S5 UR	S5 UR	S5 UR	S	5 UR	S
5 UR	S5 UR
UlURc�[R"S5S
3Ul
[URS5n0nUHEnURS5SSS2upg[UR!55XFR!5'MG UR#5 USUlUSUlO"URUlUR(UlUR*R-S/5n[/U5S:�=(a USR15S;UlUR55 SUR6SS3UlUR;5 SUR8/n	UR=U	5 g![an[SURS35eSnAff=f![a%nUR?UR85 SnAgSnAff=f)Nzmega-cmd�	mega-exec�	mega-help�mega-get�
mega-login�mega-logout�mega-ls�
mega-mkdir�mega-put�mega-rm�mega-whoami�HOMEz
/.megav3rc�rzYNo password provided in URL and MEGA configuration file for duplicity does not exist as '�'�=��Username�Password�	no_logoutr)�1�yes�true�/�) �	duplicity�backend�Backend�__init__�_check_binary_exists�hostname�	_hostname�username�os�getenv�_megarc�open�	Exceptionr�	partition�str�strip�close�	_username�	_password�password�
query_args�get�len�lower�
_no_logout�ensure_mega_cmd_running�path�_folder�
mega_login�subprocess_popen�_makedir)
�self�
parsed_url�	conf_file�e�myvars�line�name�var�no_logout_option�cmds
          �B/usr/lib/python3/dist-packages/duplicity/backends/megav3backend.pyr"�Megav3Backend.__init__)sv�����!�!�*�*�4�<�	
�!�!�*�-��!�!�+�.��!�!�+�.��!�!�*�-��!�!�,�/��!�!�-�0��!�!�)�,��!�!�,�/��!�!�*�-��!�!�)�,��!�!�-�0�$�,�,������&� �i�i��/�0�
�;�D�L�
� ����s�3�	��F�!�� �N�N�3�/��!��4�	��'*�3�9�9�;�'7��z�z�|�$�"�
�O�O��#�J�/�D�N�#�J�/�D�N�(�0�0�D�N�'�0�0�D�N�%�0�0�4�4�[�"�E���/�0�1�4�o�;K�A�;N�;T�;T�;V�Zn�;n����$�$�&��:�?�?�1�2�.�/�0���	
�����$�,�,�'��	(��!�!�#�&��=�
�&�4�48�L�L�>��D����
��>�	(��M�M�$�,�,�'�'��	(�s0�"I0�J�0
J�:J�J�
K
�%K�K
c�x�[R"SU/5 g![an[SUS35eSnAff=f)zGChecks that a specified command exists in the running user command path�whichz	Command 'zw' not found, make sure 'MEGAcmd' tools (https://mega.nz/cmd) is properly installed and in the running user command pathN)�
subprocess�check_outputr+r)r>rGrAs   rHr#�"Megav3Backend._check_binary_existsbsG��	��#�#�W�c�N�3���	�"��C�5�!7�8��
��	�s��
9�4�9c��[R"S[R[RS9R5 g![a [S5ef=f)z=Trigger any mega command to ensure mega-cmd server is runningr	)�stdout�stderrzCannot execute mega commandN)rL�run�DEVNULL�check_returncoder+r�r>s rHr8�%Megav3Backend.ensure_mega_cmd_runningnsQ��	B��N�N��!�)�)�!�)�)�
��� ���	B�"�#@�A�A�	B�s�AA�Ac���UR5 SSU/nURU5 g![a7n[U5nSU;a[	SUS35e[	SUSUS35eSnAff=f)	z5Creates a remote directory (recursively if necessary)rz-pzFolder already existszFolder 'zp' could not be created on MEGA because it already exists. Use another path or remove the folder in MEGA manuallyz"' could not be created, reason : 'rN)r;r<r+r-r)r>r9rGrA�	error_strs     rHr=�Megav3Backend._makedirys���	
�����T�4�(��
	`��!�!�#�&���	`��A��I�&�)�3�&��t�f�%M�N���
'��$��7Y�Z[�Y\�\]�'^�_�_��	`�s�)�
A*�2A%�%A*c���URUR55 URUR	5R5UR5S9 g![a NGf=f)zoUploads file to the specified remote folder (tries to delete it first to make
sure the new one can be uploaded))�
local_file�remote_fileN)�delete�decoder+�upload�
get_canonical)r>�source_path�remote_filenames   rH�_put�Megav3Backend._put�sd��	��K�K��.�.�0�1�	
���"�0�0�2�9�9�;�'�.�.�0�	�	
���	��	�s�A�
A)�(A)c�p�URUR5URR5S9 g)z-Downloads file from the specified remote path)r\r[N)�downloadr^rD)r>rb�
local_paths   rH�_get�Megav3Backend._get�s1��	
�
�
�'�.�.�0�!���-�-�/�	�	
�c� �URSS9$)z(Lists files in the specified remote pathT)�
files_only)�folder_contentsrUs rH�_list�Megav3Backend._list�s���#�#�t�#�4�4rjc�>�URUR5S9 g)z+Deletes file from the specified remote path)r\N)r]r^)r>�filenames  rH�_delete�Megav3Backend._delete�s��	
������ 1��2rjc�x�UR(dS/nURU5 SS/nURU5 g)z/Function called when backend is done being usedrr�exitN)r7r<)r>rGs  rH�_close�Megav3Backend._close�s8����� �/�C��!�!�#�&��F�#�����c�"rjc��[R"SSSS9nUR5 URR	5RS5SR
5nX R:wa[S5eg	![Ra UR5 [S5e[a�nURcUR5UlS
URUR/n[R"U[RS9R5 S	nAg	![a$nUR5 [SUS
35eS	nAff=fS	nAff=f)z0Helper function to check existing session existsrrT)�timeout�capture_output�:���zUsername is not matchz<Timed out while trying to determine if a MEGA session existsNr)rQz#Could not log in to MEGA, error : 'r)rLrRrTrPr^�splitr.r0r+�TimeoutExpiredrvrr1�get_passwordrS)r>�result�current_usernamerArGs     rHr;�Megav3Backend.mega_login�s3��
	S��^�^���#��F�

�#�#�%�%�}�}�3�3�5�;�;�C�@��D�J�J�L���>�>�1�� 7�8�8�2���(�(�	c��K�K�M�"�#a�b�b��	S��~�~�%�!%�!2�!2�!4����������@�C�
S�����%�-�-��#�"�$�$���
S����
�&�)L�Q�C�q�'Q�R�R��
S��	S�s6�A:A=�=8E�5;E�11D'�'
E�1E�E�E�Ec�H�SSUR/nUR5 [R"U5nUR	5RS5nU(aAUVs/sH4n[R"SU5(dM!UR5SPM6 nnU$s snf)zHLists contents of a remote MEGA path, optionally ignoring subdirectoriesr
z-l�
z^-�)r:r;rLrMr^r}�re�search)r>rlrG�files�fs     rHrm�Megav3Backend.folder_contents�s����$����-�������'�'��,������$�$�T�*���+0�G�5�a�B�I�I�d�A�4F�\�Q�W�W�Y�q�\�5�E�G����Hs�  B�Bc�n�SURSU3U/nUR5 URU5 g)z(Downloads a file from a remote MEGA pathr
rN�r:r;r<)r>r\r[rGs    rHrf�Megav3Backend.download�s7���d�l�l�^�1�[�M�:�J�G���������c�"rjc��SXRSU3/nUR5 URU5 g	![a7n[	U5nSU;a[SUS35e[SUSUS35eS	nAff=f)
z$Uploads a file to a remote MEGA pathrrzReached storage quotaz1MEGA account over quota, could not write file : 'zD' . Upgrade your storage at https://mega.nz/pro or remove some data.zFailed writing file 'z' to MEGA, reason : 'rN)r:r;r<r+r-r)r>r[r\rGrArXs      rHr_�Megav3Backend.upload�s����:�,�,��q��
�'F�G������
	g��!�!�#�&���	g��A��I�&�)�3�&�G��}�UW�X���
'�)>�{�m�K`�ab�`c�cd�'e�f�f��	g�s�7�
A8�2A3�3A8c�n�SSURSU3/nUR5 URU5 g)z&Deletes a file from a remote MEGA pathrz-frNr�)r>r\rGs   rHr]�Megav3Backend.delete�s7���$�4�<�<�.��+�� ?�@���������c�"rj)r:r%r)r7r1r0N)F)�__name__�
__module__�__qualname__�__firstlineno__�__doc__r"r#r8r=rcrhrnrrrvr;rmrfr_r]�__static_attributes__�rjrHrrsT��B�7(�r
�	B�`�"
�
�5�
3�
#�S�@
�#�g�"#rjr�megav3)
r'r�rL�duplicity.backendr�duplicity.errorsrr r!r�register_backend�uses_netloc�extendr�rjrH�<module>r�se��,
�	���-�a#�I�%�%�-�-�a#�H
���"�"�8�]�;�	�����$�$�h�Z�0rj

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