404

[ Avaa Bypassed ]




Upload:

Command:

elspacio@3.143.239.135: ~ $
�
e f;��@sNdZddlZddlZddlZddlZddlZddlZddlZddl	Z	ddl
Z
ddlmZ
ddlmZddddd	d
ddd
dddgZdZdZdZdZdZejdej�ZGdd�de�ZGdd�de�ZGdd�de�ZGdd�de�ZGdd	�d	e�ZGdd
�d
e�ZGdd�de�Z Gdd�de�Z!Gdd
�d
e�Z"d d�Z#d!d"�Z$d#d�Z%d$d%�Z&d&d'�Z'yddl(Z(Wne)k
rd(Z*YnXd)Z*Gd*d�d�Z+e*raGd+d,�d,e+�Z,ej-d,�nd-Z.Gd.d/�d/e+�Z/e0d0krJddlZd1d2�Z1e1d3�Z2e1d4�j3d5�Z4e5d6�d7Z6x(ej7j8�Z9e9r�Pne6e9Z6q�We5d8e:e6��e+d9�Z;e;j<d:�e;j=e2e4e6�e;j>�ndS);aSMTP/ESMTP client class.

This should follow RFC 821 (SMTP), RFC 1869 (ESMTP), RFC 2554 (SMTP
Authentication) and RFC 2487 (Secure SMTP over TLS).

Notes:

Please remember, when doing ESMTP, that the names of the SMTP service
extensions are NOT the same thing as the option keywords for the RCPT
and MAIL commands!

Example:

  >>> import smtplib
  >>> s=smtplib.SMTP("localhost")
  >>> print(s.help())
  This is Sendmail version 8.8.4
  Topics:
      HELO    EHLO    MAIL    RCPT    DATA
      RSET    NOOP    QUIT    HELP    VRFY
      EXPN    VERB    ETRN    DSN
  For more info use "HELP <topic>".
  To report bugs in the implementation send email to
      sendmail-bugs@sendmail.org.
  For local information send email to Postmaster at your site.
  End of HELP info
  >>> s.putcmd("vrfy","someone@here")
  >>> s.getreply()
  (250, "Somebody OverHere <somebody@here.my.org>")
  >>> s.quit()
�N)�body_encode)�stderr�
SMTPException�SMTPServerDisconnected�SMTPResponseException�SMTPSenderRefused�SMTPRecipientsRefused�
SMTPDataError�SMTPConnectError�
SMTPHeloError�SMTPAuthenticationError�	quoteaddr�	quotedata�SMTP�i�z
s
i z	auth=(.*)c@seZdZdZdS)rz4Base class for all exceptions raised by this module.N)�__name__�
__module__�__qualname__�__doc__�rr�,/opt/alt/python34/lib64/python3.4/smtplib.pyrFsc@seZdZdZdS)rz�Not connected to any SMTP server.

    This exception is raised when the server unexpectedly disconnects,
    or when an attempt is made to use the SMTP instance before
    connecting it to a server.
    N)rrrrrrrrrIsc@s"eZdZdZdd�ZdS)ra2Base class for all exceptions that include an SMTP error code.

    These exceptions are generated in some instances when the SMTP
    server returns an error code.  The error code is stored in the
    `smtp_code' attribute of the error, and the `smtp_error' attribute
    is set to the error message.
    cCs%||_||_||f|_dS)N)�	smtp_code�
smtp_error�args)�self�code�msgrrr�__init__Zs		zSMTPResponseException.__init__N)rrrrrrrrrrQsc@s"eZdZdZdd�ZdS)rz�Sender address refused.

    In addition to the attributes set by on all SMTPResponseException
    exceptions, this sets `sender' to the string that the SMTP refused.
    cCs1||_||_||_|||f|_dS)N)rr�senderr)rrrrrrrrfs			zSMTPSenderRefused.__init__N)rrrrrrrrrr_sc@s"eZdZdZdd�ZdS)rz�All recipient addresses refused.

    The errors for each recipient are accessible through the attribute
    'recipients', which is a dictionary of exactly the same sort as
    SMTP.sendmail() returns.
    cCs||_|f|_dS)N)�
recipientsr)rrrrrrts	zSMTPRecipientsRefused.__init__N)rrrrrrrrrrlsc@seZdZdZdS)r	z'The SMTP server didn't accept the data.N)rrrrrrrrr	ysc@seZdZdZdS)r
z&Error during connection establishment.N)rrrrrrrrr
|sc@seZdZdZdS)rz"The server refused our HELO reply.N)rrrrrrrrrsc@seZdZdZdS)rzvAuthentication error.

    Most probably the server didn't accept the username/password
    combination provided.
    N)rrrrrrrrr�scCsStjj|�\}}||fdkrK|j�jd�rC|Sd|Sd|S)z�Quote a subset of the email addresses defined by RFC 821.

    Should be able to handle anything email.utils.parseaddr can handle.
    ��<z<%s>)r r )�email�utils�	parseaddr�strip�
startswith)�
addrstring�displayname�addrrrrr
�scCs2tjj|�\}}||fdkr.|S|S)Nr )r r )r"r#r$)r'r(r)rrr�
_addr_only�sr*cCs"tjddtjdt|��S)z�Quote data for email.

    Double leading '.', and change Unix newline '\n', or Mac '\r' into
    Internet CRLF end-of-line.
    z(?m)^\.z..z(?:\r\n|\n|\r(?!\n)))�re�sub�CRLF)�datarrrr�scCstjdd|�S)Ns(?m)^\.s..)r+r,)Zbindatarrr�_quote_periods�sr/cCstjdt|�S)Nz(?:\r\n|\n|\r(?!\n)))r+r,r-)r.rrr�	_fix_eols�sr0FTc@s�eZdZdZdZdZdZdZdZdZ	e
Zdddej
ddd�Zdd	�Zd
d�Zdd
�Zdd�Zddddd�Zdd�Zddd�Zdd�Zddd�Zddd�Zddd�Zdd �Zdd!d"�Zd#d$�Zd%d&�Zd'd(�Zgd)d*�Zgd+d,�Z d-d.�Z!d/d0�Z"e"Z#d1d2�Z$d3d4�Z%d5d6�Z&dddd7d8�Z'ggd9d:�Z(ddgid;d<�Z)d=d>�Z*d?d@�Z+dS)Ara�This class manages a connection to an SMTP or ESMTP server.
    SMTP Objects:
        SMTP objects have the following attributes:
            helo_resp
                This is the message given by the server in response to the
                most recent HELO command.

            ehlo_resp
                This is the message given by the server in response to the
                most recent EHLO command. This is usually multiline.

            does_esmtp
                This is a True value _after you do an EHLO command_, if the
                server supports ESMTP.

            esmtp_features
                This is a dictionary, which, if the server supports ESMTP,
                will _after you do an EHLO command_, contain the names of the
                SMTP service extensions this server supports, and their
                parameters (if any).

                Note, all extension names are mapped to lower case in the
                dictionary.

        See each method's docstrings for details.  In general, there is a
        method of the same name to perform each SMTP command.  There is also a
        method called 'sendmail' that will do an entire mail transaction.
        rN�ehlor c
Cs�||_||_i|_||_|rc|j||�\}}|dkrct||��qcn|dk	r{||_nhtj�}d|kr�||_nDd}	ytj	tj
��}	Wntjk
r�YnXd|	|_dS)aInitialize a new instance.

        If specified, `host' is the name of the remote host to which to
        connect.  If specified, `port' specifies the port to which to connect.
        By default, smtplib.SMTP_PORT is used.  If a host is specified the
        connect method is called, and if it returns anything other than a
        success code an SMTPConnectError is raised.  If specified,
        `local_hostname` is used as the FQDN of the local host in the HELO/EHLO
        command.  Otherwise, the local hostname is found using
        socket.getfqdn(). The `source_address` parameter takes a 2-tuple (host,
        port) for the socket to bind to as its source address before
        connecting. If the host is '' and port is 0, the OS default behavior
        will be used.

        ��N�.z	127.0.0.1z[%s])�_host�timeout�esmtp_features�source_address�connectr
�local_hostname�socketZgetfqdnZ
gethostbynameZgethostnameZgaierror)
r�host�portr9r5r7rrZfqdnr)rrrr�s&				z
SMTP.__init__cCs|S)Nr)rrrr�	__enter__szSMTP.__enter__cGsbzPy7|jd�\}}|dkr9t||��nWntk
rNYnXWd|j�XdS)NZQUIT��)�docmdrr�close)rrr�messagerrr�__exit__
s
	z
SMTP.__exit__cCs
||_dS)z�Set the debug output level.

        A non-false value results in debug messages for connection and for all
        messages sent to and received from the server.

        N)�
debuglevel)rrCrrr�set_debuglevelszSMTP.set_debuglevelcCsM|jdkr1td||f|jdt�ntj||f||j�S)Nrzconnect: to�file)rC�printr7rr:�create_connection)rr;r<r5rrr�_get_sockets

zSMTP._get_socket�	localhostc
CsP|r||_n|r�|jd�|jd�kr�|jd�}|dkr�|d|�||dd�}}yt|�}Wq�tk
r�td��Yq�Xq�n|s�|j}n|jdkr�td||fdt	�n|j
|||j�|_d|_
|j�\}}|jdkrFtd|dt	�n||fS)apConnect to a host on a given port.

        If the hostname ends with a colon (`:') followed by a number, and
        there is no port specified, that suffix will be stripped off and the
        number interpreted as the port number to use.

        Note: This method is automatically invoked by __init__, if a host is
        specified during instantiation.

        �:rN�znonnumeric portzconnect:rE)r7�find�rfind�int�
ValueError�OSError�default_portrCrFrrHr5�sockrE�getreply)rr;r<r7�irrrrrr8&s(%%
	zSMTP.connectcCs�|jdkr+tdt|�dt�nt|d�r�|jr�t|t�rd|jd�}ny|jj	|�Wq�t
k
r�|j�td��Yq�Xntd��dS)	zSend `s' to the server.rzsend:rErR�asciizServer not connectedzplease run connect() firstN)
rCrF�reprr�hasattrrR�
isinstance�str�encodeZsendallrPr@r)r�srrr�sendHs

z	SMTP.sendcCsC|dkrd|tf}nd||tf}|j|�dS)zSend a command to the server.r z%s%sz%s %s%sN)r-r\)r�cmdrrYrrr�putcmdWszSMTP.putcmdcCs�g}|jdkr-|jjd�|_nxTy|jjtd�}WnEtk
r�}z%|j�tdt|���WYdd}~XnX|s�|j�td��n|j	dkr�t
dt|�dt�nt
|�tkr
|j�td	d
��n|j|dd�jd��|dd
�}yt|�}Wntk
red}PYnX|d
d�dkr0Pq0q0Wdj|�}|j	dkr�t
d||fdt�n||fS)a�Get a reply from the server.

        Returns a tuple consisting of:

          - server response code (e.g. '250', or such, if all goes well)
            Note: returns -1 if it can't read response code.

          - server response string corresponding to response code (multiline
            responses are converted to a single, multiline string).

        Raises SMTPServerDisconnected if end-of-file is reached.
        N�rbrKz Connection unexpectedly closed: zConnection unexpectedly closedrzreply:rEi�zLine too long.�s 	
��-s
zreply: retcode (%s); Msg: %s���)rErR�makefile�readline�_MAXLINErPr@rrYrCrFrVr�lenr�appendr%rNrO�join)r�resp�line�erZerrcode�errmsgrrrrS_s@

#

 

z
SMTP.getreplycCs|j||�|j�S)z-Send a command, and return its response code.)r^rS)rr]rrrrr?�sz
SMTP.docmdcCs>|jd|p|j�|j�\}}||_||fS)zwSMTP 'helo' command.
        Hostname to send for this command defaults to the FQDN of the local
        host.
        �helo)r^r9rS�	helo_resp)r�namerrrrrrn�s	z	SMTP.heloc
Cs�i|_|j|j|p!|j�|j�\}}|d
krnt|�dkrn|j�td��n||_|dkr�||fSd|_	|jj
d�jd�}|d=x�|D]�}tj
|�}|r|jjdd�d	|jd�d|jd<q�ntj
d
|�}|r�|jd�j�}|j|jd�d�j�}	|dkr�|jj|d�d	|	|j|<q�|	|j|<q�q�W||fS)zx SMTP 'ehlo' command.
        Hostname to send for this command defaults to the FQDN of the local
        host.
        rKrzServer not connected�zlatin-1�
�authr � z((?P<feature>[A-Za-z0-9][A-Za-z0-9\-]*) ?�featureNrc)r6r^�ehlo_msgr9rSrgr@r�	ehlo_resp�
does_esmtp�decode�split�
OLDSTYLE_AUTH�match�get�groupsr+�group�lower�string�endr%)
rrprrrj�eachZ
auth_match�mruZparamsrrrr1�s2	
	
	
1"'z	SMTP.ehlocCs|j�|jkS)z7Does the server support a given SMTP service extension?)r�r6)rZoptrrr�has_extn�sz
SMTP.has_extncCs|jd|�|j�dS)z;SMTP 'help' command.
        Returns help text from server.�helprK)r^rS)rrrrrr��sz	SMTP.helpcCs
|jd�S)z&SMTP 'rset' command -- resets session.�rset)r?)rrrrr��sz	SMTP.rsetcCs'y|j�Wntk
r"YnXdS)aInternal 'rset' command which ignores any SMTPServerDisconnected error.

        Used internally in the library, since the server disconnected error
        should appear to the application when the *next* command is issued, if
        we are doing an internal "safety" reset.
        N)r�r)rrrr�_rset�s
z
SMTP._rsetcCs
|jd�S)z-SMTP 'noop' command -- doesn't do anything :>�noop)r?)rrrrr��sz	SMTP.noopcCsUd}|r+|jr+ddj|�}n|jddt|�|f�|j�S)z0SMTP 'mail' command -- begins mail xfer session.r rt�mailz	FROM:%s%s)rxrir^r
rS)rr�options�
optionlistrrrr��s
 z	SMTP.mailcCsUd}|r+|jr+ddj|�}n|jddt|�|f�|j�S)z;SMTP 'rcpt' command -- indicates 1 recipient for this mail.r rt�rcptzTO:%s%s)rxrir^r
rS)rZrecipr�r�rrrr��s
 z	SMTP.rcptcCs$|jd�|j�\}}|jdkrJtd||fdt�n|dkrht||��n�t|t�r�t|�j	d�}nt
|�}|d
d�tkr�|t}n|d	t}|j|�|j�\}}|jdkrtd||fdt�n||fSdS)a�SMTP 'DATA' command -- sends message data to server.

        Automatically quotes lines beginning with a period per rfc821.
        Raises SMTPDataError if there is an unexpected reply to the
        DATA command; the return value from this method is the final
        response code received when the all data is sent.  If msg
        is a string, lone '\r' and '\n' characters are converted to
        '\r\n' characters.  If msg is bytes, it is transmitted as is.
        r.rzdata:rEibrU�N�.���)
r^rSrCrFrr	rXrYr0rZr/�bCRLFr\)rrr�repl�qrrrr.s"



z	SMTP.datacCs |jdt|��|j�S)z5SMTP 'verify' command -- checks for address validity.�vrfy)r^r*rS)r�addressrrr�verifyszSMTP.verifycCs |jdt|��|j�S)z.SMTP 'expn' command -- expands a mailing list.�expn)r^r*rS)rr�rrrr�&sz	SMTP.expncCs�|jdkr�|jdkr�d|j�dko?dkns�|j�\}}d|komdkns�t||��q�q�ndS)abCall self.ehlo() and/or self.helo() if needed.

        If there has been no previous EHLO or HELO command this session, this
        method tries ESMTP EHLO first.

        This method may raise the following exceptions:

         SMTPHeloError            The server didn't reply properly to
                                  the helo greeting.
        N��ri+)rorwr1rnr)rrrjrrr�ehlo_or_helo_if_needed-s
&zSMTP.ehlo_or_helo_if_neededc
	s�dd�}dd�}d}d}d}|j�|jd�sRtd	��n|jdj��|||g}�fd
d�|D�}	|	s�td��nx2|	D]*}
|
|kr|jd
|�\}}|dkr�|j||||��\}}q�n�|
|kr>|jd
|d|||��\}}n|
|kr�|jd
d|t|jd�dd�f�\}}|dkr�|jt|jd�dd��\}}q�n|dkr�||fSq�Wt||��dS)aALog in on an SMTP server that requires authentication.

        The arguments are:
            - user:     The user name to authenticate with.
            - password: The password for the authentication.

        If there has been no previous EHLO or HELO command this session, this
        method tries ESMTP EHLO first.

        This method will return normally if the authentication was successful.

        This method may raise the following exceptions:

         SMTPHeloError            The server didn't reply properly to
                                  the helo greeting.
         SMTPAuthenticationError  The server didn't accept the username/
                                  password combination.
         SMTPException            No suitable authentication method was
                                  found.
        cSsTtj|�}|dtj|jd�|d�j�}t|jd�dd�S)NrtrUZmd5�eolr )�base64Zdecodebytes�hmacZHMACrZZ	hexdigest�
encode_base64)Z	challenge�user�passwordZresponserrr�encode_cram_md5Tsz#SMTP.login.<locals>.encode_cram_md5cSs)d||f}t|jd�dd�S)NZ%s%srUr�r )r�rZ)r�r�r[rrr�encode_plainZsz SMTP.login.<locals>.encode_plainZPLAINzCRAM-MD5ZLOGINrsz,SMTP AUTH extension not supported by server.cs"g|]}|�kr|�qSrr)�.0rs)�advertised_authlistrr�
<listcomp>qs	zSMTP.login.<locals>.<listcomp>z(No suitable authentication method found.ZAUTHiNrtz%s %srUr�r ���N)r�r�)	r�r�rr6rzr?r�rZr)
rr�r�r�r�Z
AUTH_PLAINZ
AUTH_CRAM_MD5Z
AUTH_LOGINZpreferred_authsZauthlistZ
authmethodrrjr)r�r�login>s:

'	#	.0z
SMTP.logincCs:|j�|jd�s(td��n|jd�\}}|dkr!ts^td��n|dk	r�|dk	r�td��n|dk	r�|dk	r�td��n|dkr�tjd	|d
|�}n|j	|j
d|j�|_
d|_d|_
d|_i|_d|_nt||��||fS)
a�Puts the connection to the SMTP server into TLS mode.

        If there has been no previous EHLO or HELO command this session, this
        method tries ESMTP EHLO first.

        If the server supports TLS, this will encrypt the rest of the SMTP
        session. If you provide the keyfile and certfile parameters,
        the identity of the SMTP server and client can be checked. This,
        however, depends on whether the socket module really checks the
        certificates.

        This method may raise the following exceptions:

         SMTPHeloError            The server didn't reply properly to
                                  the helo greeting.
        �starttlsz+STARTTLS extension not supported by server.ZSTARTTLSr2z&No SSL support included in this PythonNz4context and keyfile arguments are mutually exclusivez5context and certfile arguments are mutually exclusive�certfile�keyfile�server_hostnamer)r�r�rr?�	_have_ssl�RuntimeErrorrO�ssl�_create_stdlib_context�wrap_socketrRr4rErorwr6rxr)rr�r��contextrjZreplyrrrr��s.
				z
SMTP.starttlscCs|j�g}t|t�r7t|�jd�}n|jr�|jd�ri|jdt|��nx|D]}|j|�qpWn|j	||�\}}	|dkr�|dkr�|j
�n
|j�t||	|��ni}
t|t�r|g}nxv|D]n}|j
||�\}}	|dkrW|dkrW||	f|
|<n|dkr|j
�t|
��qqWt|
�t|�kr�|j�t|
��n|j|�\}}	|dkr|dkr�|j
�n
|j�t||	��n|
S)a�
This command performs an entire mail transaction.

        The arguments are:
            - from_addr    : The address sending this mail.
            - to_addrs     : A list of addresses to send this mail to.  A bare
                             string will be treated as a list with 1 address.
            - msg          : The message to send.
            - mail_options : List of ESMTP options (such as 8bitmime) for the
                             mail command.
            - rcpt_options : List of ESMTP options (such as DSN commands) for
                             all the rcpt commands.

        msg may be a string containing characters in the ASCII range, or a byte
        string.  A string is encoded to bytes using the ascii codec, and lone
        \r and \n characters are converted to \r\n characters.

        If there has been no previous EHLO or HELO command this session, this
        method tries ESMTP EHLO first.  If the server does ESMTP, message size
        and each of the specified options will be passed to it.  If EHLO
        fails, HELO will be tried and ESMTP options suppressed.

        This method will return normally if the mail is accepted for at least
        one recipient.  It returns a dictionary, with one entry for each
        recipient that was refused.  Each entry contains a tuple of the SMTP
        error code and the accompanying error message sent by the server.

        This method may raise the following exceptions:

         SMTPHeloError          The server didn't reply properly to
                                the helo greeting.
         SMTPRecipientsRefused  The server rejected ALL recipients
                                (no mail was sent).
         SMTPSenderRefused      The server didn't accept the from_addr.
         SMTPDataError          The server replied with an unexpected
                                error code (other than a refusal of
                                a recipient).

        Note: the connection will be open even after an exception is raised.

        Example:

         >>> import smtplib
         >>> s=smtplib.SMTP("localhost")
         >>> tolist=["one@one.org","two@two.org","three@three.org","four@four.org"]
         >>> msg = '''\
         ... From: Me@my.org
         ... Subject: testin'...
         ...
         ... This is a test '''
         >>> s.sendmail("me@my.org",tolist,msg)
         { "three@three.org" : ( 550 ,"User unknown" ) }
         >>> s.quit()

        In the above example, the message was accepted for delivery to three
        of the four addresses, and one was rejected, with the error code
        550.  If all addresses are accepted, then the method will return an
        empty dictionary.

        rU�sizezsize=%drqi��)r�rXrYr0rZrxr�rhrgr�r@r�rr�rr.r	)r�	from_addr�to_addrsr�mail_options�rcpt_optionsZ
esmtp_optsZoptionrrjZsenderrsr�rrr�sendmail�sF=
	







z
SMTP.sendmailc
Csd|jd�}|dkr$d}n't|�dkr?d}ntd��|dkr�|d|kru||dn||d}n|dkr�d	d
�||d||d||d
fD�}dd
�tjj|�D�}ntj|�}	|	d=|	d=tj��8}
tj	j
|
�}|j|	dd�|
j�}WdQX|j
|||||�S)a�Converts message to a bytestring and passes it to sendmail.

        The arguments are as for sendmail, except that msg is an
        email.message.Message object.  If from_addr is None or to_addrs is
        None, these arguments are taken from the headers of the Message as
        described in RFC 2822 (a ValueError is raised if there is more than
        one set of 'Resent-' headers).  Regardless of the values of from_addr and
        to_addr, any Bcc field (or Resent-Bcc field, when the Message is a
        resent) of the Message object won't be transmitted.  The Message
        object is then serialized using email.generator.BytesGenerator and
        sendmail is called to transmit the message.

        zResent-DateNr rKzResent-z0message has more than one 'Resent-' header blockZSender�FromcSs"g|]}|dk	r|�qS)Nr)r��frrrr�Ns	z%SMTP.send_message.<locals>.<listcomp>�ToZBccZCccSsg|]}|d�qS)rKr)r��arrrr�Qs	z
Resent-Bcc�linesepz
)Zget_allrgrOr"r#Zgetaddresses�copy�io�BytesIOZ	generatorZBytesGeneratorZflatten�getvaluer�)
rrr�r�r�r�ZresentZ
header_prefixZaddr_fieldsZmsg_copyZbytesmsg�gZflatmsgrrr�send_message(s.		"zSMTP.send_messagecCsVz)|j}d|_|r(|j�nWd|j}d|_|rQ|j�nXdS)z(Close the connection to the SMTP server.N)rEr@rR)rrErRrrrr@]s				z
SMTP.closecCs?|jd�}d|_|_i|_d|_|j�|S)zTerminate the SMTP session.�quitNF)r?rwror6rxr@)r�resrrrr�js		
z	SMTP.quit),rrrrrCrErorvrwrx�	SMTP_PORTrQr:�_GLOBAL_DEFAULT_TIMEOUTrr=rBrDrHr8r\r^rSr?rnr1r�r�r�r�r�r�r�r.r�r�r�r�r�r�r�r�r@r�rrrrr�sT	+
		"2
3P3f4
c
@sOeZdZdZeZdddddejdddd�Zdd�Z	dS)	�SMTP_SSLa� This is a subclass derived from SMTP that connects over an SSL
        encrypted socket (to use this class you need a socket module that was
        compiled with SSL support). If host is not specified, '' (the local
        host) is used. If port is omitted, the standard SMTP-over-SSL port
        (465) is used.  local_hostname and source_address have the same meaning
        as they do in the SMTP class.  keyfile and certfile are also optional -
        they can contain a PEM formatted private key and certificate chain file
        for the SSL connection. context also optional, can contain a
        SSLContext, and is an alternative to keyfile and certfile; If it is
        specified both keyfile and certfile must be None.

        r rNc		Cs�|dk	r'|dk	r'td��n|dk	rN|dk	rNtd��n||_||_|dkr�tjd|d|�}n||_tj||||||�dS)Nz4context and keyfile arguments are mutually exclusivez5context and certfile arguments are mutually exclusiver�r�)rOr�r�r�r�r�rr)	rr;r<r9r�r�r5r7r�rrrr�s			zSMTP_SSL.__init__cCsh|jdkr+td||fdt�ntj||f||j�}|jj|d|j�}|S)Nrzconnect:rEr�)	rCrFrr:rGr7r�r�r4)rr;r<r5Z
new_socketrrrrH�szSMTP_SSL._get_socket)
rrrr�
SMTP_SSL_PORTrQr:r�rrHrrrrr�vs	r�i�c@sIeZdZdZdZdedddd�Zdddd	d
�ZdS)�LMTPa�LMTP - Local Mail Transfer Protocol

    The LMTP protocol, which is very similar to ESMTP, is heavily based
    on the standard SMTP client. It's common to use Unix sockets for
    LMTP, so our connect() method must support that as well as a regular
    host:port server.  local_hostname and source_address have the same
    meaning as they do in the SMTP class.  To specify a Unix socket,
    you must use an absolute path as the host, starting with a '/'.

    Authentication is supported, using the regular SMTP mechanism. When
    using a Unix socket, LMTP generally don't support or require any
    authentication, but your mileage might vary.Zlhlor NcCs#tj|||d|d|�dS)zInitialize a new instance.r9r7N)rr)rr;r<r9r7rrrr�sz
LMTP.__init__rIrc
Cs|ddkr)tj|||d|�Sy8tjtjtj�|_d|_|jj|�Wn\tk
r�|jdkr�t	d|dt
�n|jr�|jj�nd|_�YnX|j�\}}|jdkr�t	d|dt
�n||fS)z=Connect to the LMTP daemon, on either a Unix or a TCP socket.r�/r7Nz
connect fail:rEzconnect:)
rr8r:ZAF_UNIXZSOCK_STREAMrRrErPrCrFrr@rS)rr;r<r7rrrrrr8�s"	
		zLMTP.connect)rrrrrv�	LMTP_PORTrr8rrrrr��s
	r��__main__cCs4tjj|d�tjj�tjj�j�S)Nz: )�sys�stdout�write�flush�stdinrer%)�promptrrrr��s
r�r�r��,zEnter message, end with ^D:r zMessage length is %drIrK)?rr:r�r+Zemail.utilsr"Z
email.messageZemail.generatorr�r�r�Zemail.base64mimerr�r�r�__all__r�r�r-r�rf�compile�Ir{rPrrrrrr	r
rrr
r*rr/r0r��ImportErrorr�rr�rhr�r�rr�ZfromaddrrzZtoaddrsrFrr�rerkrgZserverrDr�r�rrrr�<module>!s�			


	
���,/



Filemanager

Name Type Size Permission Actions
__future__.cpython-34.pyc File 4.07 KB 0644
__future__.cpython-34.pyo File 4.07 KB 0644
__phello__.foo.cpython-34.pyc File 134 B 0644
__phello__.foo.cpython-34.pyo File 134 B 0644
_bootlocale.cpython-34.pyc File 1.02 KB 0644
_bootlocale.cpython-34.pyo File 1016 B 0644
_collections_abc.cpython-34.pyc File 23.39 KB 0644
_collections_abc.cpython-34.pyo File 23.39 KB 0644
_compat_pickle.cpython-34.pyc File 7.33 KB 0644
_compat_pickle.cpython-34.pyo File 7.25 KB 0644
_dummy_thread.cpython-34.pyc File 4.71 KB 0644
_dummy_thread.cpython-34.pyo File 4.71 KB 0644
_markupbase.cpython-34.pyc File 8.72 KB 0644
_markupbase.cpython-34.pyo File 8.54 KB 0644
_osx_support.cpython-34.pyc File 10.38 KB 0644
_osx_support.cpython-34.pyo File 10.38 KB 0644
_pyio.cpython-34.pyc File 63.41 KB 0644
_pyio.cpython-34.pyo File 63.39 KB 0644
_sitebuiltins.cpython-34.pyc File 3.59 KB 0644
_sitebuiltins.cpython-34.pyo File 3.59 KB 0644
_strptime.cpython-34.pyc File 15.41 KB 0644
_strptime.cpython-34.pyo File 15.41 KB 0644
_sysconfigdata.cpython-34.pyc File 24.49 KB 0644
_sysconfigdata.cpython-34.pyo File 24.49 KB 0644
_threading_local.cpython-34.pyc File 6.78 KB 0644
_threading_local.cpython-34.pyo File 6.78 KB 0644
_weakrefset.cpython-34.pyc File 8.27 KB 0644
_weakrefset.cpython-34.pyo File 8.27 KB 0644
abc.cpython-34.pyc File 7.69 KB 0644
abc.cpython-34.pyo File 7.64 KB 0644
aifc.cpython-34.pyc File 27.26 KB 0644
aifc.cpython-34.pyo File 27.26 KB 0644
antigravity.cpython-34.pyc File 847 B 0644
antigravity.cpython-34.pyo File 847 B 0644
argparse.cpython-34.pyc File 64.33 KB 0644
argparse.cpython-34.pyo File 64.17 KB 0644
ast.cpython-34.pyc File 12.07 KB 0644
ast.cpython-34.pyo File 12.07 KB 0644
asynchat.cpython-34.pyc File 8.16 KB 0644
asynchat.cpython-34.pyo File 8.16 KB 0644
asyncore.cpython-34.pyc File 17.54 KB 0644
asyncore.cpython-34.pyo File 17.54 KB 0644
base64.cpython-34.pyc File 17.87 KB 0644
base64.cpython-34.pyo File 17.67 KB 0644
bdb.cpython-34.pyc File 18.26 KB 0644
bdb.cpython-34.pyo File 18.26 KB 0644
binhex.cpython-34.pyc File 13.22 KB 0644
binhex.cpython-34.pyo File 13.22 KB 0644
bisect.cpython-34.pyc File 2.79 KB 0644
bisect.cpython-34.pyo File 2.79 KB 0644
bz2.cpython-34.pyc File 14.8 KB 0644
bz2.cpython-34.pyo File 14.8 KB 0644
cProfile.cpython-34.pyc File 4.51 KB 0644
cProfile.cpython-34.pyo File 4.51 KB 0644
calendar.cpython-34.pyc File 26.92 KB 0644
calendar.cpython-34.pyo File 26.92 KB 0644
cgi.cpython-34.pyc File 29.13 KB 0644
cgi.cpython-34.pyo File 29.13 KB 0644
cgitb.cpython-34.pyc File 10.8 KB 0644
cgitb.cpython-34.pyo File 10.8 KB 0644
chunk.cpython-34.pyc File 5.15 KB 0644
chunk.cpython-34.pyo File 5.15 KB 0644
cmd.cpython-34.pyc File 13.14 KB 0644
cmd.cpython-34.pyo File 13.14 KB 0644
code.cpython-34.pyc File 9.47 KB 0644
code.cpython-34.pyo File 9.47 KB 0644
codecs.cpython-34.pyc File 34.31 KB 0644
codecs.cpython-34.pyo File 34.31 KB 0644
codeop.cpython-34.pyc File 6.31 KB 0644
codeop.cpython-34.pyo File 6.31 KB 0644
colorsys.cpython-34.pyc File 3.57 KB 0644
colorsys.cpython-34.pyo File 3.57 KB 0644
compileall.cpython-34.pyc File 7.21 KB 0644
compileall.cpython-34.pyo File 7.21 KB 0644
configparser.cpython-34.pyc File 43.83 KB 0644
configparser.cpython-34.pyo File 43.83 KB 0644
contextlib.cpython-34.pyc File 10.13 KB 0644
contextlib.cpython-34.pyo File 10.13 KB 0644
copy.cpython-34.pyc File 7.87 KB 0644
copy.cpython-34.pyo File 7.79 KB 0644
copyreg.cpython-34.pyc File 4.5 KB 0644
copyreg.cpython-34.pyo File 4.46 KB 0644
crypt.cpython-34.pyc File 2.38 KB 0644
crypt.cpython-34.pyo File 2.38 KB 0644
csv.cpython-34.pyc File 12.69 KB 0644
csv.cpython-34.pyo File 12.69 KB 0644
datetime.cpython-34.pyc File 54.95 KB 0644
datetime.cpython-34.pyo File 53.02 KB 0644
decimal.cpython-34.pyc File 168.48 KB 0644
decimal.cpython-34.pyo File 168.48 KB 0644
difflib.cpython-34.pyc File 59.1 KB 0644
difflib.cpython-34.pyo File 59.05 KB 0644
dis.cpython-34.pyc File 14.25 KB 0644
dis.cpython-34.pyo File 14.25 KB 0644
doctest.cpython-34.pyc File 78.23 KB 0644
doctest.cpython-34.pyo File 77.97 KB 0644
dummy_threading.cpython-34.pyc File 1.19 KB 0644
dummy_threading.cpython-34.pyo File 1.19 KB 0644
enum.cpython-34.pyc File 15.96 KB 0644
enum.cpython-34.pyo File 15.96 KB 0644
filecmp.cpython-34.pyc File 8.91 KB 0644
filecmp.cpython-34.pyo File 8.91 KB 0644
fileinput.cpython-34.pyc File 13.96 KB 0644
fileinput.cpython-34.pyo File 13.96 KB 0644
fnmatch.cpython-34.pyc File 3.07 KB 0644
fnmatch.cpython-34.pyo File 3.07 KB 0644
formatter.cpython-34.pyc File 18.47 KB 0644
formatter.cpython-34.pyo File 18.47 KB 0644
fractions.cpython-34.pyc File 18.82 KB 0644
fractions.cpython-34.pyo File 18.82 KB 0644
ftplib.cpython-34.pyc File 32.54 KB 0644
ftplib.cpython-34.pyo File 32.54 KB 0644
functools.cpython-34.pyc File 23.06 KB 0644
functools.cpython-34.pyo File 23.06 KB 0644
genericpath.cpython-34.pyc File 3.41 KB 0644
genericpath.cpython-34.pyo File 3.41 KB 0644
getopt.cpython-34.pyc File 6.58 KB 0644
getopt.cpython-34.pyo File 6.53 KB 0644
getpass.cpython-34.pyc File 4.52 KB 0644
getpass.cpython-34.pyo File 4.52 KB 0644
gettext.cpython-34.pyc File 14.82 KB 0644
gettext.cpython-34.pyo File 14.82 KB 0644
glob.cpython-34.pyc File 2.81 KB 0644
glob.cpython-34.pyo File 2.81 KB 0644
gzip.cpython-34.pyc File 18.99 KB 0644
gzip.cpython-34.pyo File 18.94 KB 0644
hashlib.cpython-34.pyc File 7.76 KB 0644
hashlib.cpython-34.pyo File 7.76 KB 0644
heapq.cpython-34.pyc File 13.58 KB 0644
heapq.cpython-34.pyo File 13.58 KB 0644
hmac.cpython-34.pyc File 5.03 KB 0644
hmac.cpython-34.pyo File 5.03 KB 0644
imaplib.cpython-34.pyc File 42.46 KB 0644
imaplib.cpython-34.pyo File 40 KB 0644
imghdr.cpython-34.pyc File 4.05 KB 0644
imghdr.cpython-34.pyo File 4.05 KB 0644
imp.cpython-34.pyc File 9.64 KB 0644
imp.cpython-34.pyo File 9.64 KB 0644
inspect.cpython-34.pyc File 74.54 KB 0644
inspect.cpython-34.pyo File 74.22 KB 0644
io.cpython-34.pyc File 3.38 KB 0644
io.cpython-34.pyo File 3.38 KB 0644
ipaddress.cpython-34.pyc File 61.51 KB 0644
ipaddress.cpython-34.pyo File 61.51 KB 0644
keyword.cpython-34.pyc File 1.9 KB 0644
keyword.cpython-34.pyo File 1.9 KB 0644
linecache.cpython-34.pyc File 3.04 KB 0644
linecache.cpython-34.pyo File 3.04 KB 0644
locale.cpython-34.pyc File 36.4 KB 0644
locale.cpython-34.pyo File 36.4 KB 0644
lzma.cpython-34.pyc File 15.54 KB 0644
lzma.cpython-34.pyo File 15.54 KB 0644
macpath.cpython-34.pyc File 5.87 KB 0644
macpath.cpython-34.pyo File 5.87 KB 0644
macurl2path.cpython-34.pyc File 2.05 KB 0644
macurl2path.cpython-34.pyo File 2.05 KB 0644
mailbox.cpython-34.pyc File 68.64 KB 0644
mailbox.cpython-34.pyo File 68.54 KB 0644
mailcap.cpython-34.pyc File 6.39 KB 0644
mailcap.cpython-34.pyo File 6.39 KB 0644
mimetypes.cpython-34.pyc File 16.41 KB 0644
mimetypes.cpython-34.pyo File 16.41 KB 0644
modulefinder.cpython-34.pyc File 16.97 KB 0644
modulefinder.cpython-34.pyo File 16.89 KB 0644
netrc.cpython-34.pyc File 4.18 KB 0644
netrc.cpython-34.pyo File 4.18 KB 0644
nntplib.cpython-34.pyc File 35.46 KB 0644
nntplib.cpython-34.pyo File 35.46 KB 0644
ntpath.cpython-34.pyc File 12.99 KB 0644
ntpath.cpython-34.pyo File 12.99 KB 0644
nturl2path.cpython-34.pyc File 1.68 KB 0644
nturl2path.cpython-34.pyo File 1.68 KB 0644
numbers.cpython-34.pyc File 12.37 KB 0644
numbers.cpython-34.pyo File 12.37 KB 0644
opcode.cpython-34.pyc File 5.05 KB 0644
opcode.cpython-34.pyo File 5.05 KB 0644
operator.cpython-34.pyc File 12.48 KB 0644
operator.cpython-34.pyo File 12.48 KB 0644
optparse.cpython-34.pyc File 50.33 KB 0644
optparse.cpython-34.pyo File 50.25 KB 0644
os.cpython-34.pyc File 28.91 KB 0644
os.cpython-34.pyo File 28.91 KB 0644
pathlib.cpython-34.pyc File 39.53 KB 0644
pathlib.cpython-34.pyo File 39.53 KB 0644
pdb.cpython-34.pyc File 48.31 KB 0644
pdb.cpython-34.pyo File 48.25 KB 0644
pickle.cpython-34.pyc File 45.88 KB 0644
pickle.cpython-34.pyo File 45.74 KB 0644
pickletools.cpython-34.pyc File 68.61 KB 0644
pickletools.cpython-34.pyo File 67.55 KB 0644
pipes.cpython-34.pyc File 8.23 KB 0644
pipes.cpython-34.pyo File 8.23 KB 0644
pkgutil.cpython-34.pyc File 17.19 KB 0644
pkgutil.cpython-34.pyo File 17.19 KB 0644
platform.cpython-34.pyc File 30.44 KB 0644
platform.cpython-34.pyo File 30.44 KB 0644
plistlib.cpython-34.pyc File 29.44 KB 0644
plistlib.cpython-34.pyo File 29.36 KB 0644
poplib.cpython-34.pyc File 13.43 KB 0644
poplib.cpython-34.pyo File 13.43 KB 0644
posixpath.cpython-34.pyc File 9.58 KB 0644
posixpath.cpython-34.pyo File 9.58 KB 0644
pprint.cpython-34.pyc File 11.19 KB 0644
pprint.cpython-34.pyo File 11.03 KB 0644
profile.cpython-34.pyc File 14.8 KB 0644
profile.cpython-34.pyo File 14.55 KB 0644
pstats.cpython-34.pyc File 23.12 KB 0644
pstats.cpython-34.pyo File 23.12 KB 0644
pty.cpython-34.pyc File 4.13 KB 0644
pty.cpython-34.pyo File 4.13 KB 0644
py_compile.cpython-34.pyc File 6.7 KB 0644
py_compile.cpython-34.pyo File 6.7 KB 0644
pyclbr.cpython-34.pyc File 8.98 KB 0644
pyclbr.cpython-34.pyo File 8.98 KB 0644
pydoc.cpython-34.pyc File 88.78 KB 0644
pydoc.cpython-34.pyo File 88.72 KB 0644
queue.cpython-34.pyc File 9.04 KB 0644
queue.cpython-34.pyo File 9.04 KB 0644
quopri.cpython-34.pyc File 6.29 KB 0644
quopri.cpython-34.pyo File 6.09 KB 0644
random.cpython-34.pyc File 18.61 KB 0644
random.cpython-34.pyo File 18.61 KB 0644
re.cpython-34.pyc File 14.21 KB 0644
re.cpython-34.pyo File 14.21 KB 0644
reprlib.cpython-34.pyc File 5.73 KB 0644
reprlib.cpython-34.pyo File 5.73 KB 0644
rlcompleter.cpython-34.pyc File 5.56 KB 0644
rlcompleter.cpython-34.pyo File 5.56 KB 0644
runpy.cpython-34.pyc File 7.57 KB 0644
runpy.cpython-34.pyo File 7.57 KB 0644
sched.cpython-34.pyc File 6.42 KB 0644
sched.cpython-34.pyo File 6.42 KB 0644
selectors.cpython-34.pyc File 16.35 KB 0644
selectors.cpython-34.pyo File 16.35 KB 0644
shelve.cpython-34.pyc File 9.72 KB 0644
shelve.cpython-34.pyo File 9.72 KB 0644
shlex.cpython-34.pyc File 7.34 KB 0644
shlex.cpython-34.pyo File 7.34 KB 0644
shutil.cpython-34.pyc File 32.24 KB 0644
shutil.cpython-34.pyo File 32.24 KB 0644
site.cpython-34.pyc File 17.55 KB 0644
site.cpython-34.pyo File 17.55 KB 0644
smtpd.cpython-34.pyc File 25.07 KB 0644
smtpd.cpython-34.pyo File 25.07 KB 0644
smtplib.cpython-34.pyc File 32.35 KB 0644
smtplib.cpython-34.pyo File 32.28 KB 0644
sndhdr.cpython-34.pyc File 6.61 KB 0644
sndhdr.cpython-34.pyo File 6.61 KB 0644
socket.cpython-34.pyc File 17.69 KB 0644
socket.cpython-34.pyo File 17.64 KB 0644
socketserver.cpython-34.pyc File 22.71 KB 0644
socketserver.cpython-34.pyo File 22.71 KB 0644
sre_compile.cpython-34.pyc File 11.66 KB 0644
sre_compile.cpython-34.pyo File 11.5 KB 0644
sre_constants.cpython-34.pyc File 5.45 KB 0644
sre_constants.cpython-34.pyo File 5.45 KB 0644
sre_parse.cpython-34.pyc File 19.76 KB 0644
sre_parse.cpython-34.pyo File 19.76 KB 0644
ssl.cpython-34.pyc File 26.96 KB 0644
ssl.cpython-34.pyo File 26.96 KB 0644
stat.cpython-34.pyc File 3.49 KB 0644
stat.cpython-34.pyo File 3.49 KB 0644
statistics.cpython-34.pyc File 16.76 KB 0644
statistics.cpython-34.pyo File 16.46 KB 0644
string.cpython-34.pyc File 8.18 KB 0644
string.cpython-34.pyo File 8.18 KB 0644
stringprep.cpython-34.pyc File 13.32 KB 0644
stringprep.cpython-34.pyo File 13.25 KB 0644
struct.cpython-34.pyc File 347 B 0644
struct.cpython-34.pyo File 347 B 0644
subprocess.cpython-34.pyc File 42.34 KB 0644
subprocess.cpython-34.pyo File 42.23 KB 0644
sunau.cpython-34.pyc File 17.88 KB 0644
sunau.cpython-34.pyo File 17.88 KB 0644
symbol.cpython-34.pyc File 2.6 KB 0644
symbol.cpython-34.pyo File 2.6 KB 0644
symtable.cpython-34.pyc File 11.04 KB 0644
symtable.cpython-34.pyo File 10.92 KB 0644
sysconfig.cpython-34.pyc File 16.88 KB 0644
sysconfig.cpython-34.pyo File 16.88 KB 0644
tabnanny.cpython-34.pyc File 7.57 KB 0644
tabnanny.cpython-34.pyo File 7.57 KB 0644
tarfile.cpython-34.pyc File 66.45 KB 0644
tarfile.cpython-34.pyo File 66.45 KB 0644
telnetlib.cpython-34.pyc File 18.94 KB 0644
telnetlib.cpython-34.pyo File 18.94 KB 0644
tempfile.cpython-34.pyc File 21.07 KB 0644
tempfile.cpython-34.pyo File 21.07 KB 0644
textwrap.cpython-34.pyc File 13.48 KB 0644
textwrap.cpython-34.pyo File 13.39 KB 0644
this.cpython-34.pyc File 1.29 KB 0644
this.cpython-34.pyo File 1.29 KB 0644
threading.cpython-34.pyc File 38.05 KB 0644
threading.cpython-34.pyo File 37.36 KB 0644
timeit.cpython-34.pyc File 10.8 KB 0644
timeit.cpython-34.pyo File 10.8 KB 0644
token.cpython-34.pyc File 3.53 KB 0644
token.cpython-34.pyo File 3.53 KB 0644
tokenize.cpython-34.pyc File 19.48 KB 0644
tokenize.cpython-34.pyo File 19.43 KB 0644
trace.cpython-34.pyc File 23.62 KB 0644
trace.cpython-34.pyo File 23.56 KB 0644
traceback.cpython-34.pyc File 10.83 KB 0644
traceback.cpython-34.pyo File 10.83 KB 0644
tracemalloc.cpython-34.pyc File 16.73 KB 0644
tracemalloc.cpython-34.pyo File 16.73 KB 0644
tty.cpython-34.pyc File 1.12 KB 0644
tty.cpython-34.pyo File 1.12 KB 0644
types.cpython-34.pyc File 5.43 KB 0644
types.cpython-34.pyo File 5.43 KB 0644
uu.cpython-34.pyc File 3.93 KB 0644
uu.cpython-34.pyo File 3.93 KB 0644
uuid.cpython-34.pyc File 21.35 KB 0644
uuid.cpython-34.pyo File 21.29 KB 0644
warnings.cpython-34.pyc File 11.98 KB 0644
warnings.cpython-34.pyo File 11.27 KB 0644
wave.cpython-34.pyc File 18.69 KB 0644
wave.cpython-34.pyo File 18.63 KB 0644
weakref.cpython-34.pyc File 19.87 KB 0644
weakref.cpython-34.pyo File 19.83 KB 0644
webbrowser.cpython-34.pyc File 16.73 KB 0644
webbrowser.cpython-34.pyo File 16.69 KB 0644
xdrlib.cpython-34.pyc File 8.79 KB 0644
xdrlib.cpython-34.pyo File 8.79 KB 0644
zipfile.cpython-34.pyc File 44.75 KB 0644
zipfile.cpython-34.pyo File 44.7 KB 0644