403Webshell
Server IP : 50.21.180.56  /  Your IP : 216.73.216.139
Web Server : Apache
System : Linux info 3.0 #1337 SMP Tue Jan 01 00:00:00 CEST 2000 all GNU/Linux
User : ws67922704 ( 67922704)
PHP Version : 8.5.13
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /kunden/proc/self/root/usr/lib/python3/dist-packages/breezy/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /kunden/proc/self/root/usr/lib/python3/dist-packages/breezy/__pycache__/mail_client.cpython-313.pyc
�

p��g�b���SSKrSSKrSSKrSSKrSSKrSSKJr SSKJrJ	r	J
r
JrJrJ
r
 "SS\	R5r"SS\	R5r"S	S
\	R5r"SS5r\R&\\\4"5r"S
S\5r\R1S\\R2S9 "SS\5r"SS\5r"SS\5r\R1S\\R2S9 "SS\5r\R1S\\R2S9 "SS\5r\R1S\\R2S9 "SS\5r\R1S \\R2S9 "S!S"\5r \R1S#\ \ R2S9 "S$S%\5r!\R1S&\!\!R2S9 "S'S(\5r"\R1S)\"\"R2S9 "S*S+\5r#\R1S,\#\#R2S9 "S-S.\5r$\R1S/\$\$R2S9 "S0S1\5r%\R1S2\%\%R2S9 S2\l&\RN"S3\S4S5S69r(g)7�N���config)�
email_message�errors�	msgeditor�osutils�registry�urlutilsc��\rSrSrSrSrSrg)�MailClientNotFound�zQUnable to find mail client with the following names: %(mail_command_list_string)sc�d�SRU5n[RRUUUS9 g)Nz, )�mail_command_list�mail_command_list_string)�joinr�BzrError�__init__)�selfrrs   �4/usr/lib/python3/dist-packages/breezy/mail_client.pyr�MailClientNotFound.__init__!s2��#'�9�9�->�#?� ���� � ��/�%=�	!�	
��N)�__name__�
__module__�__qualname__�__firstlineno__�_fmtr�__static_attributes__rrrr
r
s��	(�	�

rr
c��\rSrSrSrSrg)�NoMessageSupplied�*zNo message supplied.rN�rrrrrrrrrr!r!*s��!�Drr!c��\rSrSrSrSrg)�NoMailAddressSpecified�.z8No mail-to address (--mail-to) or output (-o) specified.rNr#rrrr%r%.s��E�Drr%c�<�\rSrSrSrSrS	SjrS	SjrSrSr	g)
�
MailClient�2z7A mail client that can send messages with attachements.c��Xlg�Nr)rrs  rr�MailClient.__init__5s���rNc	��[e)a�Compose (and possibly send) an email message.

Must be implemented by subclasses.

:param prompt: A message to tell the user what to do.  Supported by
    the Editor client, but ignored by others
:param to: The address to send the message to
:param subject: The contents of the subject line
:param attachment: An email attachment, as a bytestring
:param mime_subtype: The attachment is assumed to be a subtype of
    Text.  This allows the precise subtype to be specified, e.g.
    "plain", "x-patch", etc.
:param extension: The file extension associated with the attachment
    type, e.g. ".patch"
:param basename: The name to use for the attachment, e.g.
    "send-nick-3252"
��NotImplementedError�	r�prompt�to�subject�
attachment�mime_subtype�	extension�basename�bodys	         r�compose�MailClient.compose8s
��8"�!rc
�T�URSXU5nURXaX#SSXE5 g)a<Compose (and possibly send) a merge request.

:param to: The address to send the request to
:param subject: The subject line to use for the request
:param directive: A merge directive representing the merge request, as
    a bytestring.
:param basename: The name to use for the attachment, e.g.
    "send-nick-3252"
zPlease describe these changes:zx-patchz.patchN)�_get_merge_promptr9)rr2r3�	directiver7r8r1s       r�compose_merge_request� MailClient.compose_merge_requestVs4���'�'�,�b�9�
��	
�����I�x��	
rc��g)z�Generate a prompt string.  Overridden by Editor.

:param prompt: A string suggesting what user should do
:param to: The address the mail will be sent to
:param subject: The subject line of the mail
:param attachment: The attachment that will be used
�r�rr1r2r3r4s     rr<�MailClient._get_merge_promptgs��rr�NN)
rrrr�__doc__rr9r>r<rrrrr(r(2s!��A���
�"�<
�"rr(c�0�\rSrSrSrSrSrSSjrSrg)	�Editor�uz/DIY mail client that uses commit message editorTc	�J�SRUUUURSS55$)z!See MailClient._get_merge_prompt.z{}

To: {}
Subject: {}

{}zutf-8�replace)�format�decoderBs     rr<�Editor._get_merge_promptzs.��0�7�7�������g�y�1�	
�	
rNc	
��U(d
[5e[R"XS9nUS:Xa
[5e[R
R
URURRS5UUUUUS9 g)�See MailClient.compose.)�
start_messagerA�email)�attachment_mime_subtypeN)	r%r�edit_commit_messager!r�EmailMessage�sendr�getr0s	         rr9�Editor.compose�so���(�*�*��,�,�V�H���2�:�#�%�%��"�"�'�'��K�K��K�K�O�O�G�$�����$0�	(�	
rrrD)	rrrrrE�
supports_bodyr<r9rrrrrGrGus��C�G��M�
�"�
�
rrG�editor)�helpc�L�\rSrSrSrSrSSjrSSjrSrSr	S	r
S
rg)�BodyExternalMailClient�Tc��[RS:Xa/SSKnURVs/sHo!R	U5PM sn$UR$s snf)z;Provide a list of commands that may invoke the mail client.�win32rN)�sys�platform�
win32utils�_client_commands�get_app_path)rrb�is   r�_get_client_commands�+BodyExternalMailClient._get_client_commands�sI���<�<�7�"��8<�8M�8M�N�8M�1�+�+�A�.�8M�N�N��(�(�(��Os�ANc	��UcSn[R"SS9n	[R"X�U-5n
[	U
S5nURU5 SSS5 UbSU0nO0nUR"XX:XV40UD6 g!,(df   N.=f)zVSee MailClient.compose.

Writes the attachment to a temporary file, invokes _compose.
Nr4z	bzr-mail-)�prefix�wbr8)�tempfile�mkdtempr	�pathjoin�open�write�_compose)
rr1r2r3r4r5r6r7r8�pathname�attach_path�outfile�kwargss
             rr9�BodyExternalMailClient.compose�s�����#�H��#�#�;�7���&�&�x�I�1E�F��
�+�t�
$���M�M�*�%�%����d�^�F��F��
�
���l�	
�IO�	
�
%�
$�s�A9�9
Bc	��UR5Han	URU	S5/n
UbSU0nO0nUbX�S'U
RUR"X#U40UD65 [R
"U
5  g [UR5e![a*nUR[R:waeSnAM�SnAff=f)a�Invoke a mail client as a commandline process.

Overridden by MAPIClient.
:param to: The address to send the mail to
:param subject: The subject line for the mail
:param pathname: The path to the attachment
:param mime_subtype: The attachment is assumed to have a major type of
    "text", but the precise subtype can be specified here
:param extension: A file extension (including period) associated with
    the attachment type.
:param body: Optional body text.
:param from_: Optional From: header.
�
executableNr8�from_)rf�_encode_path�extend�_get_compose_commandline�
subprocess�call�OSError�errno�ENOENTr
rc)
rr1r2r3rrr5r6r8rx�name�cmdlinert�es
             rrp�BodyExternalMailClient._compose�s���0�-�-�/�D��(�(��|�<�=�G��� �$������ �"'�w���N�N��-�-�b�;�Q�&�Q�
�
�����(�
�#0�&%�T�%:�%:�;�;��
�
��7�7�e�l�l�*��+��
�s�B�
B?�B:�:B?c��[e)z�Determine the commandline to use for composing a message.

Implemented by various subclasses
:param to: The address to send the mail to
:param subject: The subject line for the mail
:param attach_path: The path to the attachment
r.)rr2r3rrr8s     rr{�/BodyExternalMailClient._get_compose_commandline�s
��"�!rc��U$)z�Encode possible unicode string argument to 8-bit string
in user_encoding. Unencodable characters will be replaced
with '?'.

:param  u:  possible unicode string.
:return:    encoded string if u is unicode, u itself otherwise.
r)r�us  r�_encode_safe�#BodyExternalMailClient._encode_safes	���rc��U$)aEncode unicode path in user encoding.

:param  path:   possible unicode path.
:param  kind:   path kind ('executable' or 'attachment').
:return:        encoded path if path is unicode,
                path itself otherwise.
:raise:         UnableEncodePath.
r)r�path�kinds   rry�#BodyExternalMailClient._encode_paths	���rrrD)rrrrrXrfr9rpr{r�ryrrrrr\r\�s7���M�)�"�
�
�J��+<�Z"��	rr\c��\rSrSrSrSrSrg)�ExternalMailClientizAn external mail client.FrN)rrrrrErXrrrrr�r�s��,�G��Mrr�c�(�\rSrSrSrS/rSSjrSrg)�	EvolutionizEvolution mail client.�	evolutionNc
�R�0nUbX%S'UbX5S'UbXES'[UR55VVs/sH+upgSRU[R"U55PM- nnnSRURU=(d S5SR
U55/$s snnf)�0See ExternalMailClient._get_compose_commandline.r3�attachr8z{}={}�mailto:{}?{}rA�&)�sorted�itemsrKr�escaper�r)	rr2r3rrr8�message_options�k�v�options_lists	         rr{�"Evolution._get_compose_commandline#s�������)0�I�&��"�(3�H�%���&*�F�#�!��!6�!6�!8�9�
�9���
�N�N�1�h�o�o�a�0�1�9�	�
�

�!�!�$�"3�"3�B�H�"�"=�s�x�x��?U�V�
�	
��	
s�2B#rr+�rrrrrErcr{rrrrr�r�s��*�G�#�}��
rr�r�c�(�\rSrSrSrS/rSSjrSrg)�Mutti8zMutt mail client.�muttNc���/nUb"URSURU5/5 Ub#URSURUS5/5 Ubw[R"SSSS9UlUR
R
U5 UR
R5 URSUR
R/5 Ub"URS	URU5/5 U$)
r��-sz-ar4z
mutt-body-z.txtzw+)ri�suffix�modez-iz--)	rzr�ryrk�NamedTemporaryFile�
_temp_filero�flushr�)rr2r3rrr8r�s      rr{�Mutt._get_compose_commandline=s��������"�"�D�$�*;�*;�G�*D�#E�F��"��"�"�D�$�*;�*;�K��*V�#W�X���'�9�9�#�F���D�O�
�O�O�!�!�$�'��O�O�!�!�#��"�"�D�$�/�/�*>�*>�#?�@�
�>��"�"�D�$�*;�*;�B�*?�#@�A��r)r�r+r�rrrr�r�8s��%�G��x��rr�r�c�*�\rSrSrSr/SQrSSjrSrg)�ThunderbirdiUaMozilla Thunderbird (or Icedove)

    Note that Thunderbird 1.5 is buggy and does not support setting
    "to" simultaneously with including a attachment.

    There is a workaround if no attachment is present, but we always need to
    send attachments.
    )�thunderbirdzmozilla-thunderbird�icedovezD/Applications/Mozilla/Thunderbird.app/Contents/MacOS/thunderbird-binz</Applications/Thunderbird.app/Contents/MacOS/thunderbird-binNc
���0nUbURU5US'UbURU5US'Ub[R"U5US'Ub6SR[R"URU555/nO/nUR[
UR55VVs/sHupxSRXx5PM snn5 SSRU5/$s snnf)r�r2r3r4zbody={}z{}='{}'z-compose�,)	r�r�local_path_to_urlrK�quoterzr�r�r)	rr2r3rrr8r�r�r�r�s	         rr{�$Thunderbird._get_compose_commandlinegs�����
�>�$(�$5�$5�b�$9�O�D�!���)-�):�):�7�)C�O�I�&��"�,4�,F�,F�{�,S�O�L�)���%�,�,�X�^�^�D�<M�<M�d�<S�-T�U�V�L��L����06��7L�7L�7N�0O�P�0O���Y�
�
�a�
#�0O�P�	
��C�H�H�\�2�3�3��
Qs�/C'
rr+r�rrrr�r�Us���G���4rr�r�c�$�\rSrSrSrS/rSrSrg)�KMaili}zKDE mail client.�kmailc���/nUb"URSURU5/5 Ub#URSURUS5/5 Ub!URURU5/5 U$)r�r��--attachr4)rzr�ry)rr2r3rrr�s     rr{�KMail._get_compose_commandline�s}�������"�"�D�$�*;�*;�G�*D�#E�F��"��"�"��T�.�.�{�L�I�J�
��>��"�"�D�$5�$5�b�$9�#:�;��rrNr�rrrr�r�}s��$�G��y��rr�r�c�H^�\rSrSrSrSrS/rSSjrSU4SjjrSr	U=r
$)	�Clawsi�zClaws mail client.Tz
claws-mailc��/nUb(URS[R"U5-5 Ub7URS[R"URU55-5 Ub7URS[R"URU55-5 Uc
[	5eSRURU5SR
U55nSU/nUb#URSURUS5/5 U$)	r�zfrom=zsubject=zbody=r�r�z	--composer�r4)	�appendrr�r�r%rKrrzry)rr2r3rrr8rx�compose_urlr�s        rr{�Claws._get_compose_commandline�s����������w�����)>�>�?���
���z�H�N�N�4�;L�;L�W�;U�,V�V�W������w�����8I�8I�$�8O�)P�P�Q�
�:�(�*�*�$�+�+����b�!�3�8�8�K�#8�
��'��4���"��"�"��T�.�.�{�L�I�J�
��rc	
�f>�UcURRS5n[T	U]
XX4XVXx5 g)z See ExternalMailClient._compose.NrQ)rrV�superrp)
rr1r2r3rrr5r6r8rx�	__class__s
         �rrp�Claws._compose�s2����=��K�K�O�O�G�,�E�
�����l�t�	
rrrD)rrrrrErXrcr{rpr�
__classcell__�r�s@rr�r��s-���&�G��M�$�~���B��
�
rr��clawsc�(�\rSrSrSrS/rSSjrSrg)�XDGEmaili�z6xdg-email attempts to invoke the preferred mail client�	xdg-emailNc�,�U(d
[5eURU5/nUb"URSURU5/5 Ub#URSURUS5/5 Ub"URSURU5/5 U$)r�z	--subjectr�r4z--body)r%r�rzry)rr2r3rrr8�commandlines      rr{�!XDGEmail._get_compose_commandline�s����(�*�*��(�(��,�-��������T�->�->�w�-G�H�I��"�����T�.�.�{�L�I�J�
�������$�*;�*;�D�*A�B�C��rrr+r�rrrr�r��s��J�G�#�}��
rr�r�c�>^�\rSrSrSrS/rU4SjrSrSrSr	U=r
$)�	EmacsMaili�a�Call emacsclient to have a mail buffer.

    This only work for emacs >= 22.1 due to recent -e/--eval support.

    The good news is that this implementation will work with all mail
    agents registered against ``mail-user-agent``. So there is no need
    to instantiate ExternalMailClient for each and every GNU Emacs
    MUA.

    Users just have to ensure that ``mail-user-agent`` is set according
    to their tastes.
    �emacsclientc�2>�[TU]U5 SUlgr+)r�r�elisp_tmp_file)rrr�s  �rr�EmacsMail.__init__�s���
���� �"��rc���Sn[R"SSS9up#[R"X!5 [R"U5 U$![R"U5 f=f)a�Write our wrapper function into a temporary file.

This temporary file will be loaded at runtime in
_get_compose_commandline function.

This function does not remove the file.  That's a wanted
behaviour since _get_compose_commandline won't run the send
mail function directly but return the eligible command line.
Removing our temporary file here would prevent our sendmail
function to work.  (The file is deleted by some elisp code
after being read by Emacs.)
s�(defun bzr-add-mime-att (file)
  "Attach FILE to a mail buffer as a MIME attachment."
  (let ((agent mail-user-agent))
    (if (and file (file-exists-p file))
        (cond
         ((eq agent 'sendmail-user-agent)
          (progn
            (mail-text)
            (newline)
            (if (functionp 'etach-attach)
              (etach-attach file)
              (mail-attach-file file))))
         ((or (eq agent 'message-user-agent)
              (eq agent 'gnus-user-agent)
              (eq agent 'mh-e-user-agent))
          (progn
            (mml-attach-file file "text/x-patch" "BZR merge" "inline")))
         ((eq agent 'mew-user-agent)
          (progn
            (mew-draft-prepare-attachments)
            (mew-attach-link file (file-name-nondirectory file))
            (let* ((nums (mew-syntax-nums))
                   (syntax (mew-syntax-get-entry mew-encode-syntax nums)))
              (mew-syntax-set-cd syntax "BZR merge")
              (mew-encode-syntax-print mew-encode-syntax))
            (mew-header-goto-body)))
         (t
          (message "Unhandled MUA, report it on bazaar@lists.canonical.com")))
      (error "File %s does not exist." file))))
zemacs-bzr-send-z.el�rir�)rk�mkstemp�osro�close)r�_defun�fd�	temp_files    r�_prepare_send_function� EmacsMail._prepare_send_function�sQ����>!�(�(�0A�%�P�
��	��H�H�R� ��H�H�R�L����
�H�H�R�L�s�A	�	A!c�B�S/nSnSnUb0SRURU5RSS55nUb0SRURU5RSS55nSRXV5nURU5 Ub�UR	5nX�lSRU5n	SRUR
US	55n
S
RU5nURU	5 URU
5 URU5 U$)Nz--eval�nilz"{}"�"�\"z(compose-mail {} {})z(load "{}")z(bzr-add-mime-att "{}")r4z(delete-file "{}"))rKr�rJr�r�r�ry)rr2r3rrr��_to�_subject�mail_cmd�elisp�lmmform�mmform�rmforms            rr{�"EmacsMail._get_compose_commandline(s���j������
�>��-�-�� 1� 1�"� 5� =� =�c�5� I�J�C����}�}�T�%6�%6�w�%?�%G�%G��U�%S�T�H�*�0�0��?�����8�$��"��/�/�1�E�"'��#�*�*�5�1�G�.�5�5��!�!�+�|�<��F�*�0�0��7�F����w�'����v�&����v�&��r)r�)rrrrrErcrr�r{rr�r�s@rr�r��s)����G�&���#�1�f � rr�r�c�$�\rSrSrSrSSjrSrg)�
MAPIClientiNz0Default Windows mail client launched using MAPI.Nc��SSKJn URU=(d SU=(d SU=(d SU5 g!URa>n	U	RUR
:wa[
SU	R4-/5eSn	A	gSn	A	ff=f)zbSee ExternalMailClient._compose.

This implementation uses MAPI via the simplemapi ctypes wrapper
r)�
simplemapirAz%MAPI supported mail client (error %d)N)�utilr��SendMail�	MAPIError�code�MAPI_USER_ABORTr
)
rr1r2r3rrr5r6r8r�r�s
          rrp�MAPIClient._composeQsw��	%�	������b�'�-�R����[�Q���#�#�	��v�v��3�3�3�(�<����y�H�I���4��	�s�/8�B�4B�Brr+)rrrrrErprrrrr�r�Ns��D�G�OS�rr��mapic�(�\rSrSrSrS/rSSjrSrg)�MailAppifanUse MacOS X's Mail.app for sending email messages.

    Although it would be nice to use appscript, it's not installed
    with the shipped Python installations.  We instead build an
    AppleScript and invoke the script using osascript(1).  We don't
    use the _encode_safe() routines as it's not clear what encoding
    osascript expects the script to be in.
    �	osascriptNc	��[R"SSS9uo`l[R"US5 [R"US5 [R"US5 Ub&[R"USRU55 Ub6[R"USRUR
S	S
555 Ub6[R"USRUR
S	S
555 UbF[R"USRUR
S	S
5R
S
S555 Ub6[R"USRURUS555 [R"US5 [R"US5 [R"US5 [R"U5 UR/$![R"U5 f=f)r�z	bzr-send-z.scptr�ztell application "Mail"
z,set newMessage to make new outgoing message
ztell newMessage
z7make new to recipient with properties {{address:"{}"}}
zset sender to "{}"
r�r�zset subject to "{}"
zset content to "{}\n
"
�
z\nzctell content to make new attachment with properties {{file name:"{}"}} at after the last paragraph
r4zset visible to true
z	end tell
)	rkr�r�r�rorKrJryr�)rr2r3rrr8rxr�s       rr{� MailApp._get_compose_commandliners���%�-�-�[��Q���N�/	��H�H�R�4�5��H�H�R�H�I��H�H�R�,�-��~�����N�U�U����� �����3�:�:�5�=�=��e�;T�U�V��"�����/�6�6�w���s�E�7R�S����
����0�7�7����S�%�0�8�8��u�E����&�
����5�5;�V��)�)�+�|�D�6�	�
�H�H�R�0�1��H�H�R��&��H�H�R��&��H�H�R�L�������
�H�H�R�L�s�F'G(�(H)r�rDr�rrrr�r�fs���G�$�}��3 rr�zmail.appc�:�\rSrSrSrSrSrS	SjrS	SjrSr	g)
�DefaultMaili�z[Default mail handling.  Tries XDGEmail (or MAPIClient on Windows),
    falls back to EditorTc��[R"5(a[UR5$[	UR5$)z6Determine the preferred mail client for this platform.)r	�
supports_mapir�rr�)rs r�_mail_client�DefaultMail._mail_client�s/��� � �"�"��d�k�k�*�*��D�K�K�(�(rNc	
��UR5RXX4XVXx5$![a* [UR5RXX4XVU5s$f=f)rO)rr9r
rGrr0s	         rr9�DefaultMail.compose�sb��	��$�$�&�.�.��G��(��
��"�	��$�+�+�&�.�.��G��$��
�	�s�!$�1A�Ac	��UR5RXX4US9$![a' [UR5RXX4US9s$f=f)z%See MailClient.compose_merge_request.)r7r8)rr>r
rGr)rr2r3r=r7r8s      rr>�!DefaultMail.compose_merge_request�sh��	��$�$�&�<�<��Y��=��
��"�	��$�+�+�&�<�<��Y��=��
�	�s�!�.A�ArrD)
rrrrrErXrr9r>rrrrr�r��s'���G��M�)��
��*	rr��default�mail_clientzE-mail client to use.�error)rZ�invalid))rr�r|r`rkrAr�_mod_configrrrr	r
rrr
r!r%r(�Registry�str�type�mail_client_registryrG�registerrEr\r�r�r�r�r�r�r�r�r�r�r��default_key�RegistryOption�opt_mail_clientrrr�<module>rs���"
�	��
��#�K�K�
����
�"����"�F�V�_�_�F�=�=�@ �(�(��d�:�.>�)>�?�A��'
�Z�'
�T���h��V�^�^��D�s�Z�s�l�/��
�&�
�.���k�9�9�;L�;L��M��!��4���f�d�����>�"4�(�"4�J���m�[�{�?R�?R��S����&���g�u�5�=�=��A�0
��0
�f���g�u�5�=�=��A��%��*���k�8�(�:J�:J��K�g�"�g�T���m�Y�Y�=N�=N��O��'��*���f�j�z�7I�7I��J�? �$�? �D���j�'�����H�+�*�+�\���i��;�;N�;N��O�#,�� ��,�,��'�.E�w��r

Youez - 2016 - github.com/yon3zu
LinuXploit