ok

Mini Shell

Direktori : /proc/thread-self/root/opt/alt/python38/lib64/python3.8/__pycache__/
Upload File :
Current File : //proc/thread-self/root/opt/alt/python38/lib64/python3.8/__pycache__/smtpd.cpython-38.pyc

U

@��d���@s^dZddlZddlZddlZddlZddlZddlZddlZddlZddl	Z	ddl
mZddlm
Z
mZddddd	gZejdZd
ZGdd�d�Ze�ad
ZdZdZd%dd�ZGdd�dej�ZGdd�dej�ZGdd�de�ZGdd�de�ZGdd	�d	e�ZGdd�d�Z dd�Z!e"dk�rZe!�Z#e#j$Z$de$k�rpe$�%d�Z&e'e$de&�e(�e)�dg�Z*e$e&dd�Z$nddl+Z*e,e*e$�Z-e-e#j.e#j/fe#j0e#j1fe#j2e#j3d�Z4e#j5�r6zddl6Z6Wn.e7k
�r�e8d ej9d!�e�:d�YnXe6�;d"�d#Z<ze�5e<�Wn.e=k
�r4e8d$ej9d!�e�:d�YnXze�>�Wne?k
�rXYnXdS)&a�An RFC 5321 smtp proxy with optional RFC 1870 and RFC 6531 extensions.

Usage: %(program)s [options] [localhost:localport [remotehost:remoteport]]

Options:

    --nosetuid
    -n
        This program generally tries to setuid `nobody', unless this flag is
        set.  The setuid call will fail if this program is not run as root (in
        which case, use this flag).

    --version
    -V
        Print the version number and exit.

    --class classname
    -c classname
        Use `classname' as the concrete SMTP proxy class.  Uses `PureProxy' by
        default.

    --size limit
    -s limit
        Restrict the total size of the incoming message to "limit" number of
        bytes via the RFC 1870 SIZE extension.  Defaults to 33554432 bytes.

    --smtputf8
    -u
        Enable the SMTPUTF8 extension and behave as an RFC 6531 smtp proxy.

    --debug
    -d
        Turn on debugging prints.

    --help
    -h
        Print this message and exit.

Version: %(__version__)s

If localhost is not given then `localhost' is used, and if localport is not
given then 8025 is used.  If remotehost is not given then `localhost' is used,
and if remoteport is not given, then 25 is used.
�N)�warn)�
get_addr_spec�get_angle_addr�SMTPChannel�
SMTPServer�DebuggingServer�	PureProxy�MailmanProxyzPython SMTP proxy version 0.3c@seZdZdd�Zdd�ZdS)�DevnullcCsdS�N���self�msgrr�*/opt/alt/python38/lib64/python3.8/smtpd.py�writef�z
Devnull.writecCsdSrr�rrrr�flushgrz
Devnull.flushN)�__name__�
__module__�__qualname__rrrrrrr
esr
�
z, i�cCs4ttt�tjd�|r&t|tjd�t�|�dS)N��file)�print�__doc__�globals�sys�stderr�exit)�coderrrr�usagepsr#c@s�eZdZdZdZdZe�efdd��Ze	dd��Z
edd	d	fd
d�Zdd
�Z
dd�Ze	dd��Zejdd��Ze	dd��Zejdd��Ze	dd��Zejdd��Ze	dd��Zejdd��Ze	dd��Zejdd��Ze	dd ��Zejd!d ��Ze	d"d#��Zejd$d#��Ze	d%d&��Zejd'd&��Ze	d(d)��Zejd*d)��Ze	d+d,��Zejd-d,��Ze	d.d/��Zejd0d/��Zd1d2�Zd3d4�Zd5d6�Zd7d8�Zd9d:�Zd;d<�Z d=d>�Z!d?d@�Z"dAdB�Z#dCdD�Z$dEdF�Z%dGdH�Z&dIdJ�Z'dKdL�Z(dMdN�Z)dOdP�Z*dQdR�Z+dS)Srr�icCs|Srr)�xrrr�<lambda>|rzSMTPChannel.<lambda>cCs0zt|j���WStk
r*|jYSXdSr)�max�command_size_limits�values�
ValueError�command_size_limitrrrr�max_command_size_limit~sz"SMTPChannel.max_command_size_limitNFc	
Cs&tjj|||d�||_||_||_||_||_||_|rF|rFt	d��|rdd|_
d|_d|_t
|_nd|_
d|_td�|_d	|_|��d|_d
|_|j��t��|_z|��|_WnBtk
r�}z$|��|jdtjkr�WY�dSd}~XYnXtdt |j�t!d
�|�"d|jt#f�dS)N��map�Fdecode_data and enable_SMTPUTF8 cannot be set to True at the same timer�
�.r�
�.�
FrzPeer:rz	220 %s %s)$�asynchat�
async_chat�__init__�smtp_server�conn�addr�data_size_limit�enable_SMTPUTF8�_decode_datar*�_emptystring�_linesep�_dotsep�NEWLINE�_newline�ord�_set_rset_state�
seen_greeting�
extended_smtpr(�clear�socketZgetfqdn�fqdnZgetpeername�peer�OSError�close�args�errnoZENOTCONNr�repr�DEBUGSTREAM�push�__version__)	rZserverr9r:r;r.r<�decode_data�errrrrr7�s@


zSMTPChannel.__init__cCs.|j|_d|_g|_d|_d|_|�d�dS)z/Reset state variables to their post-DATA state.NFrr2)�COMMAND�
smtp_state�mailfrom�rcpttos�require_SMTPUTF8�	num_bytes�set_terminatorrrrr�_set_post_data_state�sz SMTPChannel._set_post_data_statecCs|��d|_g|_dS)z.Reset all state variables except the greeting.rN)r\�
received_data�received_linesrrrrrD�szSMTPChannel._set_rset_statecCstdtd�|jS)NzTAccess to __server attribute on SMTPChannel is deprecated, use 'smtp_server' instead��r�DeprecationWarningr8rrrr�__server�s
�zSMTPChannel.__servercCstdtd�||_dS)NzRSetting __server attribute on SMTPChannel is deprecated, set 'smtp_server' insteadr_r`�r�valuerrrrb�s
�cCstdtd�|jS)NzUAccess to __line attribute on SMTPChannel is deprecated, use 'received_lines' insteadr_�rrar^rrrr�__line�s
�zSMTPChannel.__linecCstdtd�||_dS)NzSSetting __line attribute on SMTPChannel is deprecated, set 'received_lines' insteadr_rercrrrrf�s
�cCstdtd�|jS)NzRAccess to __state attribute on SMTPChannel is deprecated, use 'smtp_state' insteadr_�rrarVrrrr�__state�s
�zSMTPChannel.__statecCstdtd�||_dS)NzPSetting __state attribute on SMTPChannel is deprecated, set 'smtp_state' insteadr_rgrcrrrrh�s
�cCstdtd�|jS)NzXAccess to __greeting attribute on SMTPChannel is deprecated, use 'seen_greeting' insteadr_�rrarErrrr�
__greeting�s
�zSMTPChannel.__greetingcCstdtd�||_dS)NzVSetting __greeting attribute on SMTPChannel is deprecated, set 'seen_greeting' insteadr_rircrrrrj�s
�cCstdtd�|jS)NzSAccess to __mailfrom attribute on SMTPChannel is deprecated, use 'mailfrom' insteadr_�rrarWrrrr�
__mailfrom�s
�zSMTPChannel.__mailfromcCstdtd�||_dS)NzQSetting __mailfrom attribute on SMTPChannel is deprecated, set 'mailfrom' insteadr_rkrcrrrrl�s
�cCstdtd�|jS)NzQAccess to __rcpttos attribute on SMTPChannel is deprecated, use 'rcpttos' insteadr_�rrarXrrrr�	__rcpttos�s
�zSMTPChannel.__rcpttoscCstdtd�||_dS)NzOSetting __rcpttos attribute on SMTPChannel is deprecated, set 'rcpttos' insteadr_rmrcrrrrn�s
�cCstdtd�|jS)NzTAccess to __data attribute on SMTPChannel is deprecated, use 'received_data' insteadr_�rrar]rrrr�__data�s
�zSMTPChannel.__datacCstdtd�||_dS)NzRSetting __data attribute on SMTPChannel is deprecated, set 'received_data' insteadr_rorcrrrrps
�cCstdtd�|jS)NzKAccess to __fqdn attribute on SMTPChannel is deprecated, use 'fqdn' insteadr_�rrarIrrrr�__fqdn
s
�zSMTPChannel.__fqdncCstdtd�||_dS)NzISetting __fqdn attribute on SMTPChannel is deprecated, set 'fqdn' insteadr_rqrcrrrrrs
�cCstdtd�|jS)NzKAccess to __peer attribute on SMTPChannel is deprecated, use 'peer' insteadr_�rrarJrrrr�__peers
�zSMTPChannel.__peercCstdtd�||_dS)NzISetting __peer attribute on SMTPChannel is deprecated, set 'peer' insteadr_rsrcrrrrts
�cCstdtd�|jS)NzKAccess to __conn attribute on SMTPChannel is deprecated, use 'conn' insteadr_�rrar9rrrr�__conn s
�zSMTPChannel.__conncCstdtd�||_dS)NzISetting __conn attribute on SMTPChannel is deprecated, set 'conn' insteadr_rurcrrrrv%s
�cCstdtd�|jS)NzKAccess to __addr attribute on SMTPChannel is deprecated, use 'addr' insteadr_�rrar:rrrr�__addr+s
�zSMTPChannel.__addrcCstdtd�||_dS)NzISetting __addr attribute on SMTPChannel is deprecated, set 'addr' insteadr_rwrcrrrrx0s
�cCs&tj�|t|d|jrdnd��dS)Nr0�utf-8�ascii)r5r6rQ�bytesrYr
rrrrQ7s
�zSMTPChannel.pushcCs|d}|j|jkr|j}n|j|jkr*|j}|r<|j|kr<dS|rR|jt|�7_|jrl|j�	t
|d��n|j�	|�dS)Nry)rVrUr,�DATAr;rZ�lenr=r^�append�str)r�data�limitrrr�collect_incoming_data<sz!SMTPChannel.collect_incoming_datac
Cs|j�|j�}tdt|�td�g|_|j|jk�r|jd}|_|sT|�	d�dS|j
sdt|d�}|�d�}|dkr�|�
�}d}n$|d|��
�}||dd���}|jr�|j|n|j}||kr�|�	d�dSt|d	|d�}|s�|�	d
|�dS||�dS|j|jk�r(|�	d�d|_dS|j�rR|j|jk�rR|�	d�d|_dSg}|�|j�D]:}	|	�r�|	d|jk�r�|�|	dd��n
|�|	��qb|j�|�|_|j|j|j|jf}
i}|j
�s�|j|jd
�}|j j!|
|�}|�"�|�s|�	d�n
|�	|�dS)NzData:rrz500 Error: bad syntaxry� r$z500 Error: line too longZsmtp_z&500 Error: command "%s" not recognizedz451 Internal confusionz552 Error: Too much mail data)�mail_options�rcpt_options�250 OK)#r>�joinr^rrOrPrVrUrZrQr=r�find�upper�striprFr(r+�getattrr|r;�splitr?r@r~rBr]rJrWrXr�r�r8�process_messager\)
r�lineZsz�i�command�argZmax_sz�methodr��textrM�kwargsZstatusrrr�found_terminatorLsl


��


�zSMTPChannel.found_terminatorcCsH|s|�d�dS|jr&|�d�dS|��||_|�d|j�dS)Nz501 Syntax: HELO hostname�503 Duplicate HELO/EHLOz250 %s)rQrErDrI�rr�rrr�	smtp_HELO�s

zSMTPChannel.smtp_HELOcCs�|s|�d�dS|jr&|�d�dS|��||_d|_|�d|j�|jrr|�d|j�|jdd7<|js�|�d�|jr�|�d	�|jdd
7<|�d�dS)Nz501 Syntax: EHLO hostnamer�Tz250-%sz250-SIZE %s�MAIL�z250-8BITMIMEz250-SMTPUTF8�
z250 HELP)	rQrErDrFrIr;r(r=r<r�rrr�	smtp_EHLO�s&



zSMTPChannel.smtp_EHLOcCs|r|�d�n
|�d�dS)Nz501 Syntax: NOOPr��rQr�rrr�	smtp_NOOP�szSMTPChannel.smtp_NOOPcCs|�d�|��dS)Nz221 Bye)rQZclose_when_doner�rrr�	smtp_QUIT�s
zSMTPChannel.smtp_QUITcCs0t|�}|d|���|kr,||d���SdS)Nr)r}r�r�)r�keywordr�Zkeylenrrr�_strip_command_keyword�sz"SMTPChannel._strip_command_keywordcCsF|sdS|���d�r$t|�\}}nt|�\}}|s<||fS|j|fS)N)rr�<)�lstrip�
startswithrrZ	addr_spec)rr��address�restrrr�_getaddr�szSMTPChannel._getaddrcCsHi}|D]:}|�d�\}}}|��r,|r2|s2dS|r:|nd||<q|S)N�=T)�	partition�isalnum)r�params�resultZparam�eqrdrrr�
_getparams�szSMTPChannel._getparamscCs|r�d}|��}|dkr$|�d�q�|dkr8|�d�q�|dkr^d}|jrR||7}|�|�q�|dkr�d	}|jrx||7}|�|�q�|d
kr�|�d�q�|dkr�|�d
�q�|dkr�|�d�q�|dkr�|�d�q�|dkr�|�d�q�|�d�n
|�d�dS)N� [SP <mail-parameters>]ZEHLOz250 Syntax: EHLO hostnameZHELOz250 Syntax: HELO hostnamer�z 250 Syntax: MAIL FROM: <address>ZRCPTz250 Syntax: RCPT TO: <address>r|z250 Syntax: DATAZRSETz250 Syntax: RSETZNOOPz250 Syntax: NOOPZQUITz250 Syntax: QUITZVRFYz250 Syntax: VRFY <address>zD501 Supported commands: EHLO HELO MAIL RCPT DATA RSET NOOP QUIT VRFYzD250 Supported commands: EHLO HELO MAIL RCPT DATA RSET NOOP QUIT VRFY)r�rQrF)rr�ZextendedZlc_argrrrr�	smtp_HELP�s:zSMTPChannel.smtp_HELPcCs@|r2|�|�\}}|r"|�d�q<|�d|�n
|�d�dS)NzB252 Cannot VRFY user, but will accept message and attempt deliveryz502 Could not VRFY %sz501 Syntax: VRFY <address>)r�rQ)rr�r�r�rrr�	smtp_VRFY�szSMTPChannel.smtp_VRFYcCs�|js|�d�dStd|td�d}|jr4|d7}|dkrJ|�|�dS|�d|�}|�|�\}}|sv|�|�dS|js�|r�|�|�dS|jr�|�d�dS|���	�|_
|�|j
�}|dkr�|�|�dS|js�|�
dd	�}|d
kr�|�d�dS|j�r8|�
dd
�}|dk�r d|_n|d
k	�r8|�d�dS|�
dd�}|�r�|���sb|�|�dS|j�r�t|�|jk�r�|�d�dSt|���dk�r�|�d�dS||_td|jtd�|�d�dS)N�503 Error: send HELO firstz	===> MAILrz 501 Syntax: MAIL FROM: <address>r�zFROM:z503 Error: nested MAIL commandZBODY�7BIT)r�Z8BITMIMEz1501 Error: BODY can only be one of 7BIT, 8BITMIMEZSMTPUTF8FTz&501 Error: SMTPUTF8 takes no argumentsZSIZEz:552 Error: message size exceeds fixed maximum message sizerz:555 MAIL FROM parameters not recognized or not implementedzsender:r�)rErQrrPrFr�r�rWr�r�r�r�r=�popr<rY�isdigitr;�intr}�keys)rr��	syntaxerrr�r�Zbody�smtputf8�sizerrr�	smtp_MAILsh














zSMTPChannel.smtp_MAILcCs|js|�d�dStd|td�|js6|�d�dSd}|jrH|d7}|dkr^|�|�dS|�d|�}|�|�\}}|s�|�|�dS|js�|r�|�|�dS|���	�|_
|�|j
�}|dkr�|�|�dSt|�
��dkr�|�d	�dS|j�|�td
|jtd�|�d�dS)Nr�z	===> RCPTrz503 Error: need MAIL commandz501 Syntax: RCPT TO: <address>r�zTO:rz8555 RCPT TO parameters not recognized or not implementedzrecips:r�)rErQrrPrWrFr�r�r�r�r�r�r}r�rXr~)rr�r�r�r�rrr�	smtp_RCPT7s@







zSMTPChannel.smtp_RCPTcCs(|r|�d�dS|��|�d�dS)Nz501 Syntax: RSETr�)rQrDr�rrr�	smtp_RSETZs

zSMTPChannel.smtp_RSETcCsZ|js|�d�dS|js(|�d�dS|r:|�d�dS|j|_|�d�|�d�dS)Nr�z503 Error: need RCPT commandz501 Syntax: DATAs
.
z#354 End data with <CR><LF>.<CR><LF>)rErQrXr|rVr[r�rrr�	smtp_DATAas



zSMTPChannel.smtp_DATAcCs|�d�dS)Nz502 EXPN not implementedr�r�rrr�	smtp_EXPNpszSMTPChannel.smtp_EXPN),rrrrUr|r+�collections�defaultdictr(�propertyr,�DATA_SIZE_DEFAULTr7r\rDZ_SMTPChannel__server�setterZ_SMTPChannel__lineZ_SMTPChannel__stateZ_SMTPChannel__greetingZ_SMTPChannel__mailfromZ_SMTPChannel__rcpttosZ_SMTPChannel__dataZ_SMTPChannel__fqdnZ_SMTPChannel__peerZ_SMTPChannel__connZ_SMTPChannel__addrrQr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rrrrrws�
�
'	





















>#6#c@s2eZdZeZedddfdd�Zdd�Zdd�ZdS)	rNFcCs�||_||_||_||_||_|r.|r.td��tjj||d�zNt	j
|dt	ji�}|�|dd|dd�|�
�|�|�|�d�Wn|���Yn(Xtd|jjt�t���||ftd�dS)	Nr/r-�typerr$�z0%s started at %s
	Local addr: %s
	Remote addr:%sr)Z
_localaddr�_remoteaddrr;r<r=r*�asyncore�
dispatcherr7rHZgetaddrinfoZSOCK_STREAMZ
create_socketZset_reuse_addrZbindZlistenrLr�	__class__r�time�ctimerP)rZ	localaddrZ
remoteaddrr;r.r<rSZgai_resultsrrrr7xs6�
��zSMTPServer.__init__c	Cs6tdt|�td�|�||||j|j|j|j�}dS)NzIncoming connection from %sr)rrOrP�
channel_classr;�_mapr<r=)rr9r:Zchannelrrr�handle_accepted�s�zSMTPServer.handle_acceptedcKst�dS)aOverride this abstract method to handle messages from the client.

        peer is a tuple containing (ipaddr, port) of the client that made the
        socket connection to our smtp port.

        mailfrom is the raw address the client claims the message is coming
        from.

        rcpttos is a list of raw addresses the client wishes to deliver the
        message to.

        data is a string containing the entire full text of the message,
        headers (if supplied) and all.  It has been `de-transparencied'
        according to RFC 821, Section 4.5.2.  In other words, a line
        containing a `.' followed by other text has had the leading dot
        removed.

        kwargs is a dictionary containing additional information.  It is
        empty if decode_data=True was given as init parameter, otherwise
        it will contain the following keys:
            'mail_options': list of parameters to the mail command.  All
                            elements are uppercase strings.  Example:
                            ['BODY=8BITMIME', 'SMTPUTF8'].
            'rcpt_options': same, for the rcpt command.

        This function should return None for a normal `250 Ok' response;
        otherwise, it should return the desired response string in RFC 821
        format.

        N)�NotImplementedError�rrJrWrXr�r�rrrr��szSMTPServer.process_message)	rrrrr�r�r7r�r�rrrrrts�
c@seZdZdd�Zdd�ZdS)rcCsld}|��}|D]V}|rL|sLd|d}t|t�s@t|�d��}t|�d}t|t�s^t|�}t|�qdS)Nr$zX-Peer: rry)�
splitlines�
isinstancerrO�encoder)rrJr�Z	inheaders�linesr�Z
peerheaderrrr�_print_message_content�s

z&DebuggingServer._print_message_contentcKsXtd�|r@|�d�r&td|d�|�d�r@td|d�|�||�td�dS)Nz%---------- MESSAGE FOLLOWS ----------r�zmail options: %sr�zrcpt options: %s
z%------------ END MESSAGE ------------)r�getr�r�rrrr��s

zDebuggingServer.process_messageN)rrrr�r�rrrrr�scs,eZdZ�fdd�Zdd�Zdd�Z�ZS)rcs.d|kr|drtd��tt|�j||�dS)Nr<z$PureProxy does not support SMTPUTF8.�r*�superrr7�rrMr��r�rrr7�szPureProxy.__init__c	Csf|�d�}d}|D]}|sq(|d7}q|�|d|d�t�|�}|�|||�}td|td�dS)Nrrr$z
X-Peer: %szwe got some refusals:r)r��insertrAr��_deliverrrP)	rrJrWrXr�r�r�r��refusedrrrr��s


zPureProxy.process_messagec
Cs�ddl}i}zB|��}|�|jd|jd�z|�|||�}W5|��XWn�|jk
r�}ztdtd�|j	}W5d}~XYnft
|jfk
r�}zBtd|jtd�t
|dd�}t
|dd	�}	|D]}
||	f||
<q�W5d}~XYnX|S)
Nrr$zgot SMTPRecipientsRefusedrZgotZ	smtp_code���Z
smtp_error�ignore)�smtplibZSMTPZconnectr��quitZsendmailZSMTPRecipientsRefusedrrPZ
recipientsrKZ
SMTPExceptionr�r�)rrWrXr�r�r��s�eZerrcode�errmsg�rrrrr��s$ zPureProxy._deliver)rrrr7r�r��
__classcell__rrr�rr�scs$eZdZ�fdd�Zdd�Z�ZS)r	cs.d|kr|drtd��tt|�j||�dS)Nr<z'MailmanProxy does not support SMTPUTF8.r�r�r�rrr7
szMailmanProxy.__init__cCs*ddlm}ddlm}ddlm}ddlm}g}	|D]t}
|
���d�d}|�d�}t|�dkrfq8|d}
t|�dkr�|d	}nd
}|�	|
�r8|dkr�q8|	�
|
|
|f�q8|	D]\}
}
}|�|
�q�tdd
�
|�td�|r�|�|||�}td|td�i}||�}|�|�}|�d��s&||d<|�d��sDt�t���|d<|	D]�\}
}
}td|
td�|�|
�}|�s�|j|
dd�}|||
<|d
k�r�|j|d	d�n�|dk�r�|j|d	d�nh|dk�r�|j|d	d�nN|dk�r�|j|d	d�n4|dk�rH|dk�rd|d <nd!|d <|j|d	d��qHdS)"Nr)�StringIO)�Utils)�Message)�MailList�@�-r_r$r)r�admin�owner�requestr��leavezforwarding recips:r�rzwe got refusals:�fromZFrom�dateZDatezsending message to)�lock)�tolistr�)Ztoadminr�)Ztoownerr�)Z	torequest)r�r�r�Z	subscribeZSubjectZunsubscribe)�ior�ZMailmanr�r�r��lowerr�r}Zlist_existsr~�removerr�rPr�r�r�r�ZEnqueue)rrJrWrXr�r�r�r�r�Z	listnamesZrcptZlocal�partsZlistnamer�r�Zmlistsr�rZmlistrrrr�sb










zMailmanProxy.process_message)rrrr7r�r�rrr�rr	sc@seZdZdZdZdZdZdS)�OptionsTrNF)rrr�setuid�	classname�
size_limitr<rrrrr�_sr�c
Cspz.t�tjdd�dddddddd	g�\}}Wn.tjk
r\}ztd|�W5d}~XYnXt�}|D]�\}}|d
kr�td�qh|dkr�tt�t�d�qh|d
kr�d|_	qh|dkr�||_
qh|dkr�tjaqh|dkr�d|_
qh|dkrhzt|�}||_Wqhtd|tjd�t�d�YqhXqht|�dk�r<d}d}nPt|�dk�rX|d}d}n4t|�dk�rx|d}|d}ntddt�|��|�d�}	|	dk�r�tdd|�|d|	�|_zt||	dd��|_Wn$tk
�r�tdd|�YnX|�d�}	|	dk�rtdd|�|d|	�|_zt||	dd��|_Wn$tk
�rjtdd|�YnX|S) Nr$z	nVhc:s:duzclass=Znosetuid�version�helpzsize=�debugr�)z-hz--helpr)z-Vz	--version)z-nz
--nosetuidF)z-cz--class)z-dz--debug)z-uz
--smtputf8T)z-sz--sizezInvalid size: rzlocalhost:8025zlocalhost:25r_�zInvalid arguments: %s�:zBad local spec: %szBad local port: %szBad remote spec: %szBad remote port: %s)�getoptr�argv�errorr#r�rrRr!r�r�r rPr<r�r�r}�
COMMASPACEr�r��	localhost�	localportr*�
remotehost�
remoteport)
ZoptsrMr��options�optr�Zint_sizeZ	localspecZ
remotespecr�rrr�	parseargsfsv��






r
�__main__r1r$)r<z7Cannot import module "pwd"; try running with -n option.r�nobodyr_z3Cannot setuid "nobody"; try running with -n option.)r)@rr�osrNrr�rHr�r5r��warningsrZemail._header_value_parserrr�__all__rZprogramrRr
rPrArr�r#r6rr�rrrr	r�r
rrr��rfindZlastdot�
__import__r�locals�modrr�Zclass_rrr	r
r�r<�proxyr��pwd�ImportErrorrr r!�getpwnamr�PermissionErrorZloop�KeyboardInterruptrrrr�<module>s�N�

M-SB




�

Zerion Mini Shell 1.0