KGRKJGETMRETU895U-589TY5MIGM5JGB5SDFESFREWTGR54TY
Server : Apache/2.2.17 (Unix) mod_ssl/2.2.17 OpenSSL/0.9.8e-fips-rhel5 DAV/2 PHP/5.2.17
System : Linux localhost 2.6.18-419.el5 #1 SMP Fri Feb 24 22:47:42 UTC 2017 x86_64
User : nobody ( 99)
PHP Version : 5.2.17
Disable Function : NONE
Directory :  /proc/21573/task/21573/root/proc/21572/root/usr/lib64/python2.4/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //proc/21573/task/21573/root/proc/21572/root/usr/lib64/python2.4/smtpd.pyc
m
=5Dc@sdZdkZdkZdkZdkZdkZdkZdkZdkZddddgZ	ei
dZdZdfd	YZ
e
ad
ZdZdZdd
ZdeifdYZdeifdYZdefdYZdefdYZdefdYZdfdYZdZedjoeZeioy
dkZWn-e j
o!ei!dIJei"dnXei#ddZ$yeie$Wqe%j
o=Z&e&iei'jonei!dIJei"dqXnei(Z(de(joCe(i)dZ*e+e(e* e,e-dgZ.e(e*dZ(n
dk/Z.e0e.e(Z1e1ei2ei3fei4ei5fZ6yei7Wqe8j
oqXndS(scAn RFC 2821 smtp proxy.

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.

    --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.
Nt
SMTPServertDebuggingServert	PureProxytMailmanProxyisPython SMTP proxy version 0.2tDevnullcBstZdZdZRS(NcCsdS(N((tselftmsg((t/usr/lib64/python2.4/smtpd.pytwriteYscCsdS(N((R((RtflushZs(t__name__t
__module__RR	(((RRXs	s
ts, cCs=tittIJ|oti|IJnti|dS(N(tsyststderrt__doc__tglobalsRtexittcode(RR((RtusagedstSMTPChannelcBstZdZdZdZdZdZdZdZdZ	d	Z
d
ZdZdZ
d
ZdZRS(NiicCstii||||_||_||_	g|_
|i|_d|_
d|_g|_d|_ti|_y|i|_WnDtij
o5}|i|idtijondSnXtdIt|iIJ|id|it f|i!ddS(NiRsPeer:s	220 %s %ss
("tasynchatt
async_chatt__init__Rtconntservert_SMTPChannel__servert_SMTPChannel__conntaddrt_SMTPChannel__addrt_SMTPChannel__linetCOMMANDt_SMTPChannel__statet_SMTPChannel__greetingtNonet_SMTPChannel__mailfromt_SMTPChannel__rcpttost_SMTPChannel__datatsockettgetfqdnt_SMTPChannel__fqdntgetpeernamet_SMTPChannel__peerterrorterrtclosetargsterrnotENOTCONNtDEBUGSTREAMtreprtpusht__version__tset_terminator(RRRRR,((RRps*								
	cCstii||ddS(Ns
(RRR3RR(RR((RR3scCs|ii|dS(N(RRtappendtdata(RR7((Rtcollect_incoming_datasc	Csti|i}tdIt|IJg|_|i|ijo|p|i	ddSnd}|id}|djo|i}d}n%|| i}||di}t|d|d}|p|i	d|dSn||dSn|i|ijo|i	ddSng}xQ|id	D]@}|o&|dd
jo|i|dqB|i|qBWti||_|ii|i|i|i|i}g|_d|_|i|_|i d	|p|i	dn|i	|dS(NsData:s500 Error: bad syntaxt iitsmtp_s'502 Error: command "%s" not implementeds451 Internal confusions
t.s250 Ok(!tEMPTYSTRINGtjoinRRtlineR1R2R RR3R"tmethodtfindtituppertcommandtargtstriptgetattrtDATAR7tsplitttextR6tNEWLINER%Rtprocess_messageR*R#R$tstatusR5(	RRLRARIRCRDR>R7R?((Rtfound_terminatorsR	




		
cCsX|p|iddSn|io|idn||_|id|idS(Ns501 Syntax: HELO hostnames503 Duplicate HELO/EHLOs250 %s(RDRR3R!R((RRD((Rt	smtp_HELOs

	cCs)|o|idn|iddS(Ns501 Syntax: NOOPs250 Ok(RDRR3(RRD((Rt	smtp_NOOPscCs|id|idS(Ns221 Bye(RR3tclose_when_done(RRD((Rt	smtp_QUITs
cCsd}t|}|| i|jo_||i}|pq|ddjo/|ddjo|djo|dd!}qn|S(Nit<it>s<>i(R"taddresstlentkeywordtkeylenRDRBRE(RRVRDRTRW((Rt	__getaddrs/cCstdI|IJ|id|}|p|iddSn|io|iddSn||_tdI|iIJ|iddS(Ns	===> MAILsFROM:s501 Syntax: MAIL FROM:<address>s503 Error: nested MAIL commandssender:s250 Ok(R1RDRt_SMTPChannel__getaddrRTR3R#(RRDRT((Rt	smtp_MAILs


	cCstdI|IJ|ip|iddSn|id|}|p|iddSn|ii|tdI|iIJ|iddS(Ns	===> RCPTs503 Error: need MAIL commandsTO:s501 Syntax: RCPT TO: <address>srecips:s250 Ok(	R1RDRR#R3RYRTR$R6(RRDRT((Rt	smtp_RCPTs


cCsT|o|iddSnd|_g|_d|_|i|_|iddS(Ns501 Syntax: RSETRs250 Ok(	RDRR3R"R#R$R%RR (RRD((Rt	smtp_RSETs
			cCse|ip|iddSn|o|iddSn|i|_|id|iddS(Ns503 Error: need RCPT commands501 Syntax: DATAs
.
s#354 End data with <CR><LF>.<CR><LF>(RR$R3RDRGR R5(RRD((Rt	smtp_DATAs



(R
RRRGRR3R8RMRNRORQRYRZR[R\R](((RRls				1	
			
	
	
	cBs#tZdZdZdZRS(NcCs||_||_tii||it	i
t	i|i|i
||idtd|iititi||fIJdS(Nis0%s started at %s
	Local addr: %s
	Remote addr:%s(t	localaddrRt
_localaddrt
remoteaddrt_remoteaddrtasyncoret
dispatcherRt
create_socketR&tAF_INETtSOCK_STREAMtset_reuse_addrtbindtlistenR1t	__class__R
ttimetctime(RR^R`((RRs		


cCsy|i\}}WnPtj
odSnPtij
o+}|idt	i
jondSnX|djodSntdt
|IJt|||}dS(NisIncoming connection from %s(RtacceptRRt	TypeErrorR&R+R,R.R/tECONNABORTEDR"R1R2Rtchannel(RRR,RpR((Rt
handle_accept's	
cCs
tdS(sIOverride 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.

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

        N(tNotImplementedError(RtpeertmailfromtrcpttosR7((RRK:s(R
RRRqRK(((RRs		cBstZdZRS(NcCs_d}|id}dGHx9|D]1}|o|odG|dGHd}n|GHq!WdGHdS(Nis
s%---------- MESSAGE FOLLOWS ----------sX-Peer:is%------------ END MESSAGE ------------(t	inheadersR7RHtlinesR>Rs(RRsRtRuR7RvRwR>((RRKVs

	(R
RRK(((RRTscBstZdZdZRS(Nc	Cs|id}d}x$|D]}|pPn|d7}qW|i|d|dti|}|i
|||}tdI|IJdS(Ns
iis
X-Peer: %sswe got some refusals:(R7RHRwRAR>tinsertRsRJR=Rt_deliverRtRutrefusedR1(	RRsRtRuR7RARwRzR>((RRKescCsdk}	h}yU|	i}|i|id|idz|i|||}Wd|iXWn|	ij
o}tdIJ|i}nzti|	ifj
oa}tdI|iIJt|dd}t|dd}
x#|D]}||
f||<qWnX|S(	Niisgot SMTPRecipientsRefusedtgott	smtp_codeit
smtp_errortignore(tsmtplibRztSMTPtstconnectRRatsendmailRtRuR7tquittSMTPRecipientsRefusedteR1t
recipientsR&R+t
SMTPExceptionRjRFterrcodeterrmsgtr(RRtRuR7RRRzRRRR((RRyss(	

(R
RRKRy(((RRds	cBstZdZRS(NcCsdkl}dkl}dkl}dkl}g}x|D]}
|
i	i
dd}	|	i
d}t
|djoqAn|d}t
|djo|d	}nd
}|i|p
|d joqAn|i|
||fqAWx$|D]\}
}}|i|
qWtdIdi|IJ|o)|i|||}
tdI|
IJnh}||}|i|}|idp||d<n|idptiti|d<nx9|D]1\}
}}tdI|
IJ|i |}|p#|i|dd}|||<n|d
jo|i"|dd	q|djo|i"|dd	q|djo|i"|dd	q|d
jo|i"|dd	q|d!jo<|djod|d<nd|d<|i"|dd	qqWdS("N(sStringIO(sUtils(sMessage(sMailListt@it-iiRtadmintownertrequestR=tleavesforwarding recips:R9swe got refusals:tfromtFromtdatetDatessending message totlockttolistttoadminttoownert	torequestt	subscribetSubjecttunsubscribe(RRRRsjoinR(sjoinR(#t	cStringIOtStringIOtMailmantUtilstMessagetMailListt	listnamesRutrcpttlowerRHtlocaltpartsRUtlistnameRCtlist_existsR6tremoveR1R=RRyRtR7RztmlistsRRt	getheaderRkRltgettmlisttEnqueue(RRsRtRuR7RRRRRRRRRzRRRRRCR((RRKsh











(R
RRK(((RRstOptionscBstZdZdZRS(NiR(R
Rtsetuidt	classname(((RRsc	Csy5titidddddddg\}}Wn%tij
o}td|nXt}x|D]\}}|djotd
qm|djotit
IJtid
qm|djo
d
|_qm|d jo
||_qm|d!jo
tiaqmqmWt|djod}d}nmt|djo|d
}d}nFt|djo|d
}|d}ntddti||id}|d
jotdd|n|| |_yt||d|_Wn$tj
otdd|nX|id}|d
jotdd|n|| |_yt||d|_Wn$tj
otdd|nX|S("NisnVhc:dsclass=tnosetuidtversionthelptdebugs-hs--helpis-Vs	--versions-ns
--nosetuids-cs--classs-ds--debugslocalhost:8025slocalhost:25iisInvalid arguments: %st:sBad local spec: %ssBad local port: %ssBad remote spec: %ssBad remote port: %s(s-hs--help(s-Vs	--version(s-ns
--nosetuid(s-cs--class(s-ds--debug(tgetoptR
targvtoptsR.R+RRRtoptionstoptRDRR4RRRR1RUt	localspect
remotespect
COMMASPACER=R@RAt	localhosttintt	localportt
ValueErrort
remotehostt
remoteport(	RRRAR.RRRDRR((Rt	parseargss^"	















t__main__s7Cannot import module "pwd"; try running with -n option.itnobodyis3Cannot setuid "nobody"; try running with -n option.R;(9RR
tosR/RRkR&RbRt__all__RtprogramR4RR1RJR<RRRRRcRRRRRRR
RRtpwdtImportErrorRRtgetpwnamRtOSErrorRtEPERMRtrfindtlastdott
__import__RtlocalstmodRRFtclass_RRRRtproxytlooptKeyboardInterrupt( RbRRRRR/RJRRRRR4RR
RRRRRRRRR&RRR<RkRRRRR((Rt?$sj%								
	<)O	9
	



	
"	

Anon7 - 2021