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/21572/root/usr/lib64/python2.4/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //proc/21572/root/usr/lib64/python2.4/CGIHTTPServer.pyo
mò
‚=5Dc@s³dZdZdgZdkZdkZdkZdkZdkZdkZdei	fd„ƒYZ
d„Zea
d„Zd„Ze
eid„Zed	joeƒ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/lib64/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
cCs8t|iƒ}|d|ijo||_tSntS(s°Test whether self.path corresponds to a CGI script.

        Returns True and updates the cgi_info attribute to the tuple
        (dir, rest) if self.path requires running a CGI script.
        Returns False otherwise.

        The default implementation tests whether the normalized url
        path begins with one of the strings in self.cgi_directories
        (and the next character is a '/' or the end of the string).
        iN(t_url_collapse_path_splitRtpatht	splitpathtcgi_directoriestcgi_infotTruetFalse(RR((RRFs
	s/cgi-bins/htbincCs
t|ƒS(s1Test whether argument path is an executable file.N(t
executableR(RR((Rt
is_executableYscCs(tii|ƒ\}}|iƒdjS(s.Test whether argument path is a Python script.s.pys.pywN(s.pys.pyw(tosRtsplitexttheadttailtlower(RRRR((Rt	is_python]sc*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?iitt/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)R1R5R7(RRtdirtresttrfindtitquerytfindtscriptt
scriptnamettranslate_patht
scriptfileRRtexistsRtisfileRtispyt	have_forkthave_popen2thave_popen3Rtenvtversion_stringtservertserver_nametprotocol_versiontstrtserver_porttcommandturllibtunquotetuqresttaddress_stringthosttclient_addresstheaderst	getheaderR+tsplittlentbase64tbinasciiRtdecodestringtErrort
typeheadertNonettypetlengthR2tgetallmatchingheaderstlinetappendtstriptjointuatfiltert
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©RrR¥RR2RRGR§RDRARŽRyR£RFRbRcRPR+R–R™R|R­RLRR’RzR\RZRšRkRR«R›RCRoRsRiRIRR@Rœ((RRbsX








	
	

#
	

		


#&



				
				(R>t
__module__t__doc__thasattrRRMRNROtrbufsizeR	RRRRRR(((RR s					cCsg}xB|idƒD]1}|djo|idƒq|i|ƒqWg}|d D]}|o||qZqZ~|d}|o|iƒ}nd}g}x6|D].}|djo|iƒq­|i|ƒq­W|o!|djo|iƒd}nddi	|ƒ|fS(sÔ
    Given a URL path, remove extra '/'s and '.' path elements and collapse
    any '..' references.

    Implements something akin to RFC-2396 5.2 step 6 to parse relative paths.

    Returns: A tuple of (head, tail) where tail is everything after the final /
    and head is everything before it.  Head will always start with a '/' and,
    if it contains anything else, never have a trailing '/'.

    Raises: IndexError if too many '..' occur within the path.
    Rt.Riÿÿÿÿs..N(
t
path_partsRR`tpartRlt_[1]tpopt	tail_partt
head_partsRn(RR¶R¸R»RºR·((RR
/s*
8


cCs‰totSny
dk}Wntj
odSnXy|idƒdaWn5tj
o)dttd„|iƒƒƒanXtS(s$Internal routine to get nobody's uidNiÿÿÿÿR|iicCs|dS(Ni(tx(R¼((Rt<lambda>ds(R|tpwdtImportErrortgetpwnamtKeyErrortmaxtmaptgetpwall(R¾((RR{Xs
	'cCsAyti|ƒ}Wntij
otSnX|id@djS(sTest for executable file.iIiN(RtstatRtstR‡Rtst_mode(RRÆ((RRhs	cCsti||ƒdS(N(R
ttesttHandlerClasstServerClass(RÉRÊ((RRÈqsR?(R²t__version__t__all__RR‘RXtBaseHTTPServerR
R‚RRR
RgR|R{Rt
HTTPServerRÈR>(
R
RÌR
RRXRR‘RÈR{RÍRËRR‚((RRs"							ÿ	'			


Anon7 - 2021