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/proc/self/root/usr/lib/python2.4/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //proc/self/root/proc/self/root/usr/lib/python2.4/CGIHTTPServer.pyc
mò
Ï=Ec@sªdZdZdgZdkZdkZdkZdkZdkZdkZdei	fd„ƒYZ
ead„Z
d„Ze
eid„ZedjoeƒndS(	srCGI-savvy HTTP Server.

This module builds on SimpleHTTPServer by implementing GET and POST
requests to cgi-bin scripts.

If the os.fork() function is not present (e.g. on Windows),
os.popen2() is used as a fallback, with slightly altered semantics; if
that function is not present either (e.g. on Macintosh), only Python
scripts are supported, and they are executed by the current process.

In all cases, the implementation is intentionally naive -- all
requests are executed sychronously.

SECURITY WARNING: DON'T USE THIS CODE UNLESS YOU ARE INSIDE A FIREWALL
-- it may execute arbitrary Python code or external programs.

s0.4tCGIHTTPRequestHandlerNcBsƒtZdZeedƒZeedƒZeedƒZdZd„Z	d„Z
d„Zdd	gZd
„Z
d„Zd„ZRS(
s­Complete HTTP server with GET, HEAD and POST commands.

    GET and HEAD also support running CGI scripts.

    The POST command is *only* implemented for CGI scripts.

    tforktpopen2tpopen3icCs/|iƒo|iƒn|iddƒdS(sRServe a POST request.

        This is only implemented for CGI scripts.

        iõsCan only POST to CGI scriptsN(tselftis_cgitrun_cgit
send_error(R((t#/usr/lib/python2.4/CGIHTTPServer.pytdo_POST3s
cCs/|iƒo|iƒSntii|ƒSdS(s-Version of send_head that support CGI scriptsN(RRRtSimpleHTTPServertSimpleHTTPRequestHandlert	send_head(R((RR?s
cCs~|i}xn|iD]c}t|ƒ}|| |jo@||p||djo#|| ||df|_tSqqWtS(s±Test whether self.path corresponds to a CGI script.

        Return a tuple (dir, rest) if self.path requires running a
        CGI script, None if not.  Note that rest begins with a
        slash if it is not empty.

        The default implementation tests whether the path
        begins with one of the strings in the list
        self.cgi_directories (and the next character is a '/'
        or the end of the string).

        t/iN(	Rtpathtcgi_directoriestxtlentitcgi_infotTruetFalse(RRRR((RRFs	
.s/cgi-bins/htbincCs
t|ƒS(s1Test whether argument path is an executable file.N(t
executableR(RR((Rt
is_executable_scCs(tii|ƒ\}}|iƒdjS(s.Test whether argument path is a Python script.s.pys.pywN(s.pys.pyw(tosRtsplitexttheadttailtlower(RRRR((Rt	is_pythoncsc*CsÓ	|i\}(}
|
idƒ}"|"djo|
|" |
|"d}
}	nd}	|
idƒ}"|"djo|
|" |
|"}}
n|
d}}
|(d|}|i
|ƒ}&ti
i|&ƒp|idd|ƒdSnti
i|&ƒp|id	d
|ƒdSn|i|ƒ}|pj|ip|ip|ip|id	d|ƒdSn|i|&ƒp|id	d|ƒdSq‹nh}|iƒ|d
<|ii|d<d|d<|i|d<t|iiƒ|d<|i|d<ti |
ƒ}||d<|i
|ƒ|d<||d<|	o|	|d<n|i"ƒ}||i$djo||d<n|i$d|d<|i%i&dƒ}|oÆ|i(ƒ}t)|ƒdjo£dk*}dk+}|d|d<|di,ƒdjohy|i-|dƒ}Wn|i.j
oqLX|i(dƒ}t)|ƒdjo|d|d<qLqPqTn|i%i/djo|i%i1|d <n|i%i/|d <|i%i&d!ƒ}%|%o|%|d"<ng}xY|i%i4d#ƒD]E}|d d$jo|i6|i7ƒƒqË||d%i(d&ƒ}qËWd&i8|ƒ|d'<|i%i&d(ƒ}#|#o|#|d)<nt:d|i%i;d*ƒƒ}|od+i8|ƒ|d,<nxdBD]}$|i>|$dƒqŽWti?i@|ƒ|iAd-d.ƒ|	iBd/d0ƒ}|io~|g}d1|jo|i6|ƒntEƒ}|iGiHƒtiIƒ}|djo~tiK|dƒ\}}'x@tMiM|iNgggdƒdo|iNiOdƒpPqUqUW|'o|iPd2|'ƒndSnyvytiQ|ƒWntiRj
onXtiS|iNiTƒdƒtiS|iGiTƒdƒtiU|&|ti?ƒWqÏ	|iiV|iW|i$ƒtiXd3ƒqÏ	Xnn|ip
|ioVdkY}|io
tiZ}n
ti\}|&}|i|&ƒoIt^i_}|i,ƒiad4ƒo|d5 |d6}nd7||f}nd1|	jo!d8|	jod9||	f}n|ibd:|ƒytc|%ƒ}Wntetffj
o
d}nX||d;ƒ}|d}|d}!|io|d})n|ii,ƒd<jo0|djo#|iNiO|ƒ}|il|ƒnxFtMiM|iNimgggdƒdo|iNimindƒpPqòqòW|ioƒ|ip|!|iGƒ|io5|)iOƒ}
|)ioƒ|
o|iPd=|
ƒq”n|!ioƒ}'|'o|iPd2|'ƒqÏ	|ibd>ƒnt^ir}t^it}t^iv}t^ix} y¤tizƒ}z_|&gt^_rd1|jot^iri6|ƒn|iGt^_v|iNt^_tt||&hd?d@<ƒWd|t^_r|t^_t|t^_v| t^_xti}|ƒXWn+t~j
o}'|iPdAt|'ƒƒnX|ibd>ƒdS(CsExecute a CGI script.t?iitR
i”sNo such CGI script (%r)Ni“s#CGI script is not a plain file (%r)s&CGI script is not a Python script (%r)s!CGI script is not executable (%r)tSERVER_SOFTWAREtSERVER_NAMEsCGI/1.1tGATEWAY_INTERFACEtSERVER_PROTOCOLtSERVER_PORTtREQUEST_METHODt	PATH_INFOtPATH_TRANSLATEDtSCRIPT_NAMEtQUERY_STRINGtREMOTE_HOSTtREMOTE_ADDRt
authorizationit	AUTH_TYPEtbasict:tREMOTE_USERtCONTENT_TYPEscontent-lengthtCONTENT_LENGTHtaccepts	

 it,tHTTP_ACCEPTs
user-agenttHTTP_USER_AGENTtcookies, tHTTP_COOKIEiÈsScript output followst+t t=sCGI script exit status %#xisw.exeiûÿÿÿiüÿÿÿs%s -u %st"s%s "%s"scommand: %stbtposts%ssCGI script exited OKt__name__t__main__sCGI script exit status %s(R)R*R2R6R8(RRtdirtresttrfindRtquerytfindtscriptt
scriptnamettranslate_patht
scriptfileRRtexistsRtisfileRtispyt	have_forkthave_popen2thave_popen3Rtenvtversion_stringtservertserver_nametprotocol_versiontstrtserver_porttcommandturllibtunquotetuqresttaddress_stringthosttclient_addresstheaderst	getheaderR,tsplitRtbase64tbinasciiRtdecodestringtErrort
typeheadertNonettypetlengthR3tgetallmatchingheaderstlinetappendtstriptjointuatfiltert
getheaderstcotkt
setdefaulttenvirontupdatet
send_responsetreplacet
decoded_querytargst
nobody_uidtnobodytwfiletflushRtpidtwaitpidtststselecttrfiletreadt	log_errortsetuidterrortdup2tfilenotexecvethandle_errortrequestt_exittshutilRtpopenxRtcmdlinetsysRtinterptendswithtlog_messagetinttnbytest	TypeErrort
ValueErrortfilestfitfotfetdatatwritet_socktrecvtclosetcopyfileobjterrorstargvt	save_argvtstdint
save_stdintstdouttsave_stdouttstderrtsave_stderrtgetcwdtsave_cwdtexecfiletchdirt
SystemExit(*RR¨RqR¤R~R3RRGR¦RDRBRRxR¢RFRaRbRPR,R•R˜R{R¬RLRŽR‘RyR\RZR™RjRœRªRšRRnRrRhRIR€RAR›((RRhsX








	
	

#
	

		


#&



				
				(R?t
__module__t__doc__thasattrRRMRNROtrbufsizeR	RRRRRR(((RR s					cCs‰totSny
dk}Wntj
odSnXy|idƒdaWn5tj
o)dttd„|iƒƒƒanXtS(s$Internal routine to get nobody's uidNiÿÿÿÿR{iicCs|dS(Ni(R(R((Rt<lambda>Bs(R{tpwdtImportErrortgetpwnamtKeyErrortmaxtmaptgetpwall(Rµ((RRz6s
	'cCsAyti|ƒ}Wntij
otSnX|id@djS(sTest for executable file.iIiN(RtstatRtstR†Rtst_mode(RR½((RRFs	cCsti||ƒdS(N(R
ttesttHandlerClasstServerClass(RÀRÁ((RR¿OsR@(R±t__version__t__all__RRRXtBaseHTTPServerR
RRRRfR{RzRt
HTTPServerR¿R?(RÃR
RRXRRR¿RzRÄRÂRR((RRs 							ÿ			


Anon7 - 2021