MINI SHELL

Server : Apache/2.2.2 (Fedora)
System : Linux App1.pathumtani.go.th 2.6.20-1.2320.fc5smp #1 SMP Tue Jun 12 19:40:16 EDT 2007 i686
User : apache ( 48)
PHP Version : 5.2.9
Disable Function : NONE
Directory :  /proc/self/root/usr/lib/python2.4/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //proc/self/root/usr/lib/python2.4/smtpd.pyc
m
=Ec@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/lib/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|_|i|_tdIt|iIJ|id|itf|iddS(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__peertDEBUGSTREAMtreprtpusht__version__tset_terminator(RRRR((RRps								cCstii||ddS(Ns
(RRR-RR(RR((RR-scCs|ii|dS(N(RRtappendtdata(RR1((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(!tEMPTYSTRINGtjoinRRtlineR+R,R RR-R"tmethodtfindtituppertcommandtargtstriptgetattrtDATAR1tsplitttextR0tNEWLINER%Rtprocess_messageR*R#R$tstatusR/(	RRFR;RCR=R>R8R1R9((Rtfound_terminatorsR	




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

	cCs)|o|idn|iddS(Ns501 Syntax: NOOPs250 Ok(R>RR-(RR>((Rt	smtp_NOOPscCs|id|idS(Ns221 Bye(RR-tclose_when_done(RR>((Rt	smtp_QUITs
cCsd}t|}|| i|jo_||i}|pq|ddjo/|ddjo|djo|dd!}qn|S(Nit<it>s<>i(R"taddresstlentkeywordtkeylenR>R<R?(RRPR>RNRQ((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(R+R>Rt_SMTPChannel__getaddrRNR-R#(RR>RN((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(	R+R>RR#R-RSRNR$R0(RR>RN((Rt	smtp_RCPTs


cCsT|o|iddSnd|_g|_d|_|i|_|iddS(Ns501 Syntax: RSETRs250 Ok(	R>RR-R"R#R$R%RR (RR>((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$R-R>RAR R/(RR>((Rt	smtp_DATAs



(R
RRRARR-R2RGRHRIRKRSRTRURVRW(((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_addrtbindtlistenR+t	__class__R
ttimetctime(RRXRZ((RRs		


cCs<|i\}}tdt|IJt|||}dS(NsIncoming connection from %s(RtacceptRRR+R,Rtchannel(RRRRh((Rt
handle_acceptscCs
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(RtpeertmailfromtrcpttosR1((RRE%s(R
RRRiRE(((RRs		cBstZdZRS(NcCs_d}|id}dGHx9|D]1}|o|odG|dGHd}n|GHq!WdGHdS(Nis
s%---------- MESSAGE FOLLOWS ----------sX-Peer:is%------------ END MESSAGE ------------(t	inheadersR1RBtlinesR8Rk(RRkRlRmR1RnRoR8((RREAs

	(R
RRE(((RR?scBstZdZdZRS(Nc	Cs|id}d}x$|D]}|pPn|d7}qW|i|d|dti|}|i
|||}tdI|IJdS(Ns
iis
X-Peer: %sswe got some refusals:(R1RBRoR;R8tinsertRkRDR7Rt_deliverRlRmtrefusedR+(	RRkRlRmR1R;RoRrR8((RREPscCsdk}	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(tsmtplibRrtSMTPtstconnectRR[tsendmailRlRmR1tquittSMTPRecipientsRefusedteR+t
recipientsR&terrort
SMTPExceptionRdR@terrcodeterrmsgtr(RRlRmR1R~RRrRyRRwR((RRq^s(	

(R
RRERq(((RROs	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tadmintownertrequestR7tleavesforwarding recips:R3swe got refusals:tfromtFromtdatetDatessending message totlockttolistttoadminttoownert	torequestt	subscribetSubjecttunsubscribe(RRRRsjoinR(sjoinR(#t	cStringIOtStringIOtMailmantUtilstMessagetMailListt	listnamesRmtrcpttlowerRBtlocaltpartsROtlistnameR=tlist_existsR0tremoveR+R7RRqRlR1RrtmlistsRyRt	getheaderReRftgettmlisttEnqueue(RRkRlRmR1RRRRRRRRRrRRRRyR=R((RREysh











(R
RRE(((RRxstOptionscBstZdZdZRS(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
targvtoptstargsRR~RRtoptionstoptR>RR.RRRR+ROt	localspect
remotespect
COMMASPACER7R:R;t	localhosttintt	localportt
ValueErrort
remotehostt
remoteport(	RR~R;RRRR>RR((Rt	parseargss^"	















t__main__s7Cannot import module "pwd"; try running with -n option.itnobodyis3Cannot setuid "nobody"; try running with -n option.R5(9RR
tosterrnoRReR&R\Rt__all__RtprogramR.RR+RDR6RRRRR]RRRRRRR
RRtpwdtImportErrorRRtgetpwnamRtOSErrorR~tEPERMRtrfindtlastdott
__import__RtlocalstmodRR@tclass_RRRRtproxytlooptKeyboardInterrupt( R\RRRRRRDRRRRR.RR
RRRRRRRR~R&RRR6ReRRRRR((Rt?$sj%								
	/)O	9
	



	
"	

Anon7 - 2021