Tryag File Manager
Home
-
Turbo Force
Current Path :
/
proc
/
self
/
root
/
usr
/
lib
/
python2.4
/
Upload File :
New :
File
Dir
//proc/self/root/usr/lib/python2.4/CGIHTTPServer.pyc
mò ‚=5Dc�����������@���s³���d��Z��d�Z�d�g�Z�d�k�Z�d�k�Z�d�k�Z�d�k�Z�d�k�Z�d�k�Z�d�e�i �f�d�„��ƒ��YZ �d�„��Z�e�a �d�„��Z�d�„��Z�e �e�i�d�„�Z�e�d �j�o�e�ƒ��n�d�S( ���sr��CGI-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. s���0.4t���CGIHTTPRequestHandlerNc�����������B���sƒ���t��Z�d��Z�e�e�d�ƒ�Z�e�e�d�ƒ�Z�e�e�d�ƒ�Z�d�Z�d�„��Z �d�„��Z �d�„��Z�d�d �g�Z�d �„��Z �d�„��Z�d�„��Z�RS( ���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. t���forkt���popen2t���popen3i����c���������C���s/���|��i�ƒ��o�|��i�ƒ��n�|��i�d�d�ƒ�d�S(���sR���Serve a POST request. This is only implemented for CGI scripts. iõ��s���Can only POST to CGI scriptsN(���t���selft���is_cgit���run_cgit ���send_error(���R���(����(����t#���/usr/lib/python2.4/CGIHTTPServer.pyt���do_POST3���s����� c���������C���s/���|��i�ƒ��o�|��i�ƒ��Sn�t�i�i�|��ƒ�Sd�S(���s-���Version of send_head that support CGI scriptsN(���R���R���R���t���SimpleHTTPServert���SimpleHTTPRequestHandlert ���send_head(���R���(����(����R���R���?���s����� c���������C���s8���t��|��i�ƒ�}�|�d�|��i�j�o�|�|��_�t�Sn�t�S(���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). i����N(���t���_url_collapse_path_splitR���t���patht ���splitpatht���cgi_directoriest���cgi_infot���Truet���False(���R���R���(����(����R���R���F���s���� � s���/cgi-bins���/htbinc���������C���s ���t��|�ƒ�S(���s1���Test whether argument path is an executable file.N(���t ���executableR���(���R���R���(����(����R���t ���is_executableY���s�����c���������C���s(���t��i�i�|�ƒ�\�}�}�|�i�ƒ��d�j�S(���s.���Test whether argument path is a Python script.s���.pys���.pywN(���s���.pys���.pyw(���t���osR���t���splitextt���headt���tailt���lower(���R���R���R���R���(����(����R���t ���is_python]���s�����c���*������C���sÓ ��|��i�\�}(�} �| �i�d�ƒ�}"�|"�d�j�o�| �|"� | �|"�d�} �} �n�d�} �| �i�d�ƒ�}"�|"�d�j�o�| �|"� | �|"�}�} �n�| �d�}�} �|(�d�|�}�|��i �|�ƒ�}&�t�i �i�|&�ƒ�p�|��i�d�d�|�ƒ�d�Sn�t�i �i�|&�ƒ�p�|��i�d �d �|�ƒ�d�Sn�|��i�|�ƒ�}�|�pj�|��i�p�|��i�p�|��i�p�|��i�d �d�|�ƒ�d�Sn�|��i�|&�ƒ�p�|��i�d �d�|�ƒ�d�Sq‹n�h��}�|��i�ƒ��|�d �<|��i�i�|�d�<d�|�d�<|��i�|�d�<t�|��i�i�ƒ�|�d�<|��i�|�d�<t�i �| �ƒ�}�|�|�d�<|��i �|�ƒ�|�d�<|�|�d�<| �o�| �|�d�<n�|��i"�ƒ��}�|�|��i$�d�j�o�|�|�d�<n�|��i$�d�|�d�<|��i%�i&�d�ƒ�}�|�oÆ�|�i(�ƒ��}�t)�|�ƒ�d�j�o£�d�k*�}�d�k+�}�|�d�|�d�<|�d�i,�ƒ��d�j�oh�y�|�i-�|�d�ƒ�}�Wn�|�i.�j �o�qLX|�i(�d�ƒ�}�t)�|�ƒ�d�j�o�|�d�|�d�<qLqPqTn�|��i%�i/�d�j�o�|��i%�i1�|�d �<n�|��i%�i/�|�d �<|��i%�i&�d!�ƒ�}%�|%�o�|%�|�d"�<n�g��}�xY�|��i%�i4�d#�ƒ�D]E�}�|�d� d$�j�o�|�i6�|�i7�ƒ��ƒ�qË|�|�d%�i(�d&�ƒ�}�qËWd&�i8�|�ƒ�|�d'�<|��i%�i&�d(�ƒ�}#�|#�o�|#�|�d)�<n�t:�d�|��i%�i;�d*�ƒ�ƒ�}�|�o�d+�i8�|�ƒ�|�d,�<n�x�dB�D]�}$�|�i>�|$�d�ƒ�qŽWt�i?�i@�|�ƒ�|��iA�d-�d.�ƒ�| �iB�d/�d0�ƒ�}�|��i�o~|�g�}�d1�|�j�o�|�i6�|�ƒ�n�tE�ƒ��}�|��iG�iH�ƒ��t�iI�ƒ��}�|�d�j�o~�t�iK�|�d�ƒ�\�}�}'�x@�tM�iM�|��iN�g�g��g��d�ƒ�d�o�|��iN�iO�d�ƒ�p�PqUqUW|'�o�|��iP�d2�|'�ƒ�n�d�Sn�yv�y�t�iQ�|�ƒ�Wn�t�iR�j �o�n�Xt�iS�|��iN�iT�ƒ��d�ƒ�t�iS�|��iG�iT�ƒ��d�ƒ�t�iU�|&�|�t�i?�ƒ�WqÏ |��i�iV�|��iW�|��i$�ƒ�t�iX�d3�ƒ�qÏ Xnn|��i�p �|��i�oVd�kY�}�|��i�o �t�iZ�}�n �t�i\�}�|&�}�|��i�|&�ƒ�oI�t^�i_�}�|�i,�ƒ��ia�d4�ƒ�o�|�d5� |�d6�}�n�d7�|�|�f�}�n�d1�| �j�o!�d8�| �j�o�d9�|�| �f�}�n�|��ib�d:�|�ƒ�y�tc�|%�ƒ�}�Wn�te�tf�f�j �o �d�}�n�X|�|�d;�ƒ�}�|�d�}�|�d�}!�|��i�o�|�d�})�n�|��i�i,�ƒ��d<�j�o0�|�d�j�o#�|��iN�iO�|�ƒ�}�|�il�|�ƒ�n�xF�tM�iM�|��iN�im�g�g��g��d�ƒ�d�o�|��iN�im�in�d�ƒ�p�PqòqòW|�io�ƒ��|�ip�|!�|��iG�ƒ�|��i�o5�|)�iO�ƒ��} �|)�io�ƒ��| �o�|��iP�d=�| �ƒ�q”n�|!�io�ƒ��}'�|'�o�|��iP�d2�|'�ƒ�qÏ |��ib�d>�ƒ�nt^�ir�}�t^�it�}�t^�iv�}�t^�ix�} �y¤�t�iz�ƒ��}�z_�|&�g�t^�_r�d1�|�j�o�t^�ir�i6�|�ƒ�n�|��iG�t^�_v�|��iN�t^�_t�t|�|&�h��d?�d@�<ƒ�Wd�|�t^�_r�|�t^�_t�|�t^�_v�| �t^�_x�t�i}�|�ƒ�XWn+�t~�j �o�}'�|��iP�dA�t�|'�ƒ�ƒ�n�X|��ib�d>�ƒ�d�S(C���s���Execute a CGI script.t���?i����i���t����t���/i”��s���No 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)t���SERVER_SOFTWAREt���SERVER_NAMEs���CGI/1.1t���GATEWAY_INTERFACEt���SERVER_PROTOCOLt���SERVER_PORTt���REQUEST_METHODt ���PATH_INFOt���PATH_TRANSLATEDt���SCRIPT_NAMEt���QUERY_STRINGt���REMOTE_HOSTt���REMOTE_ADDRt ���authorizationi���t ���AUTH_TYPEt���basict���:t���REMOTE_USERt���CONTENT_TYPEs���content-lengtht���CONTENT_LENGTHt���accepts��� i���t���,t���HTTP_ACCEPTs ���user-agentt���HTTP_USER_AGENTt���cookies���, t���HTTP_COOKIEiÈ���s���Script output followst���+t��� t���=s���CGI script exit status %#xi���s���w.exeiûÿÿÿiüÿÿÿs���%s -u %st���"s���%s "%s"s���command: %st���bt���posts���%ss���CGI script exited OKt���__name__t���__main__s���CGI script exit status %s(���R(���R)���R1���R5���R7���(���R���R���t���dirt���restt���rfindt���it���queryt���findt���scriptt ���scriptnamet���translate_patht ���scriptfileR���R���t���existsR���t���isfileR���t���ispyt ���have_forkt���have_popen2t���have_popen3R���t���envt���version_stringt���servert���server_namet���protocol_versiont���strt���server_portt���commandt���urllibt���unquotet���uqrestt���address_stringt���hostt���client_addresst���headerst ���getheaderR+���t���splitt���lent���base64t���binasciiR���t���decodestringt���Errort ���typeheadert���Nonet���typet���lengthR2���t���getallmatchingheaderst���linet���appendt���stript���joint���uat���filtert ���getheaderst���cot���kt ���setdefaultt���environt���updatet ���send_responset���replacet ���decoded_queryt���argst ���nobody_uidt���nobodyt���wfilet���flushR���t���pidt���waitpidt���stst���selectt���rfilet���readt ���log_errort���setuidt���errort���dup2t���filenot���execvet���handle_errort���requestt���_exitt���shutilR���t���popenxR���t���cmdlinet���sysR���t���interpt���endswitht���log_messaget���intt���nbytest ���TypeErrort ���ValueErrort���filest���fit���fot���fet���datat���writet���_sockt���recvt���closet���copyfileobjt���errorst���argvt ���save_argvt���stdint ���save_stdint���stdoutt���save_stdoutt���stderrt���save_stderrt���getcwdt���save_cwdt���execfilet���chdirt ���SystemExit(*���R���R©���Rr���R¥���R���R2���R���RG���R§���RD���RA���RŽ���Ry���R£���RF���Rb���Rc���RP���R+���R–���R™���R|���R���RL���R���R’���Rz���R\���RZ���Rš���Rk���R���R«���R›���RC���Ro���Rs���Ri���RI���R���R@���Rœ���(����(����R���R���b���sX���� �� �# #�& � (���R>���t ���__module__t���__doc__t���hasattrR���RM���RN���RO���t���rbufsizeR ���R���R���R���R���R���R���(����(����(����R���R���� ���s���� c���������C���s��g��}�xB�|��i�d�ƒ�D]1�}�|�d�j�o�|�i�d�ƒ�q�|�i�|�ƒ�q�Wg��}�|�d� D]�}�|�o�|�|�qZ�qZ�~�|�d�}�|�o�|�i�ƒ��}�n�d�}�g��}�x6�|�D].�}�|�d�j�o�|�i�ƒ��q�|�i�|�ƒ�q�W|�o!�|�d�j�o�|�i�ƒ��d�}�n�d�d�i �|�ƒ�|�f�S(���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. R���t���.R���iÿÿÿÿs���..N( ���t ���path_partsR���R`���t���partRl���t���_[1]t���popt ���tail_partt ���head_partsRn���(���R���R¶���R¸���R»���Rº���R·���(����(����R���R ���/��s*������ 8� c����������C���s‰���t��o�t��Sn�y �d�k�}��Wn�t�j �o�d�Sn�Xy�|��i�d�ƒ�d�a��Wn5�t�j �o)�d�t�t�d�„��|��i�ƒ��ƒ�ƒ�a��n�Xt��S(���s$���Internal routine to get nobody's uidNiÿÿÿÿR|���i���i���c���������C���s���|��d�S(���Ni���(���t���x(���R¼���(����(����R���t���<lambda>d��s����(���R|���t���pwdt���ImportErrort���getpwnamt���KeyErrort���maxt���mapt���getpwall(���R¾���(����(����R���R{���X��s������ 'c���������C���sA���y�t��i�|��ƒ�}�Wn�t��i�j �o�t�Sn�X|�i�d�@d�j�S(���s���Test for executable file.iI���i����N(���R���t���statR���t���stR‡���R���t���st_mode(���R���RÆ���(����(����R���R���h��s����� c���������C���s���t��i�|��|�ƒ�d��S(���N(���R ���t���testt���HandlerClasst���ServerClass(���RÉ���RÊ���(����(����R���RÈ���q��s����R?���(���R²���t���__version__t���__all__R���R‘���RX���t���BaseHTTPServerR ���R‚���R���R����R ���Rg���R|���R{���R���t ���HTTPServerRÈ���R>���( ���R ���RÌ���R ���R���RX���R����R‘���RÈ���R{���RÍ���RË���R���R‚���(����(����R���R������s"��� ÿ� '