ok

Mini Shell

Direktori : /proc/thread-self/root/proc/self/root/proc/self/root/proc/thread-self/root/lib64/python2.7/
Upload File :
Current File : //proc/thread-self/root/proc/self/root/proc/self/root/proc/thread-self/root/lib64/python2.7/cgi.pyo

�
zfc@s�dZdZddlmZddlZddlZddlZddlZddlm	Z	m
Z
mZe
��Iejr�e	dde
�e	dde
�nddlZddlZWdQXydd	lmZWn!ek
r�dd	lmZnXd
ddd
ddddddddddddddgZdZead�Zd�Zd�Zead aeejd d ed!�Zd d ed"�Zd d eed#�Zd$�Z d%�Z!d&�Z"d
fd'��YZ#dfd(��YZ$dejfd)��YZ%d
e%fd*��YZ&de&fd+��YZ'de%fd,��YZ(ejd-�Z)eeeed.�Z*ejd/�Z+d0�Z,d1�Z-d2�Z.d3�Z/ed4�Z0d5d6�Z1e2d7kr�e)�ndS(8s�Support module for CGI (Common Gateway Interface) scripts.

This module defines a number of utilities for use by CGI scripts
written in Python.
s2.6i����(t
attrgetterN(tfilterwarningstcatch_warningstwarntignores.*mimetools has been removeds.*rfc822 has been removed(tStringIOtMiniFieldStoragetFieldStoragetFormContentDicttSvFormContentDicttInterpFormContentDicttFormContenttparsetparse_qst	parse_qsltparse_multiparttparse_headertprint_exceptiont
print_environt
print_formtprint_directorytprint_argumentstprint_environ_usagetescapetcGsZtr7tr7yttd�aWq7tk
r3q7XntsFtantat|�dS(s�Write a log message, if there is a log file.

    Even though this function is called initlog(), you should always
    use log(); log is a variable that is set either to initlog
    (initially), to dolog (once the log file has been opened), or to
    nolog (when logging is disabled).

    The first argument is a format string; the remaining arguments (if
    any) are arguments to the % operator, so e.g.
        log("%s: %s", "a", "b")
    will write "a: b" to the log file, followed by a newline.

    If the global logfp is not None, it should be a file object to
    which log data is written.

    If the global logfp is None, the global logfile may be a string
    giving a filename to open, in append mode.  This file should be
    world writable!!!  If the file can't be opened, logging is
    silently disabled (since there is no safe place where we could
    send an error message).

    taN(tlogfiletlogfptopentIOErrortnologtlogtdolog(tallargs((s/usr/lib64/python2.7/cgi.pytinitlogGs

	cGstj||d�dS(s=Write a log message to the log file.  See initlog() for docs.s
N(Rtwrite(tfmttargs((s/usr/lib64/python2.7/cgi.pyR jscGsdS(s9Dummy function, assigned to log when logging is disabled.N((R!((s/usr/lib64/python2.7/cgi.pyRnsic	Cs�|dkrtj}nd|kr1d|d<n|ddkr3t|d�\}}|dkrpt||�S|dkr�t|d�}tr�|tkr�td�n|j|�}nd	}d
|kr�|r�|d}n||d
}n4tj	dr&|r|d}n|tj	d}n||d
<nFd
|krL|d
}n-tj	dritj	d}nd	}||d
<t
j|||d
|�S(soParse a query in the environment or from a file (default stdin)

        Arguments, all optional:

        fp              : file pointer; default: sys.stdin

        environ         : environment dictionary; default: os.environ

        keep_blank_values: flag indicating whether blank values in
            percent-encoded forms should be treated as blank strings.
            A true value indicates that blanks should be retained as
            blank strings.  The default false value indicates that
            blank values are to be ignored and treated as if they were
            not included.

        strict_parsing: flag indicating what to do with parsing errors.
            If false (the default), errors are silently ignored.
            If true, errors raise a ValueError exception.

        separator: str. The symbol to use for separating the query arguments.
    tREQUEST_METHODtGETtPOSTtCONTENT_TYPEsmultipart/form-datas!application/x-www-form-urlencodedtCONTENT_LENGTHsMaximum content length exceededRtQUERY_STRINGt&it	separatorN(tNonetsyststdinRRtinttmaxlent
ValueErrortreadtargvturlparseR
(	tfptenvirontkeep_blank_valueststrict_parsingR-tctypetpdicttclengthtqs((s/usr/lib64/python2.7/cgi.pyR|s<








cCs)tdtd�tj|||d|�S(s)Parse a query given as a string argument.s9cgi.parse_qs is deprecated, use urlparse.parse_qs insteadiR-(RtPendingDeprecationWarningR6R
(R>R9R:R-((s/usr/lib64/python2.7/cgi.pyR
�s
cCs,tdtd�tj||||d|�S(s)Parse a query given as a string argument.s;cgi.parse_qsl is deprecated, use urlparse.parse_qsl insteadiR-(RR?R6R(R>R9R:tmax_num_fieldsR-((s/usr/lib64/python2.7/cgi.pyR�s
cCs�d}d|kr|d}nt|�s>td|f�nd|}d|d}i}d}x'||kr�d}d}|rtj|�}	|	jd�}
|
r�yt|
�}Wq�tk
r�q�Xn|dkr
tr�|tkr�td�n|j|�}qd}ng}xb|j	�}|s8|}Pn|d	 dkrm|j
�}|||fkrmPqmn|j|�qW|dkr�qen|dkr|r|d}|d
dkr�|d
 }n|ddkr�|d }n||d<dj|�}qn|	d
}|sqent
|�\}
}|
dkr?qend|kre|d}nqe||kr{||j|�qe|g||<qeW|S(s�Parse multipart input.

    Arguments:
    fp   : input file
    pdict: dictionary containing other parameters of content-type header

    Returns a dictionary just like parse_qs(): keys are the field names, each
    value is a list of values for that field.  This is easy to use but not
    much good if you are expecting megabytes to be uploaded -- in that case,
    use the FieldStorage class instead which is much more flexible.  Note
    that content-type is the raw, unparsed contents of the content-type
    header.

    XXX This does not parse nested multipart parts -- use FieldStorage for
    that.

    XXX This should really be subsumed by FieldStorage altogether -- no
    point in having two implementations of the same parsing algorithm.
    Also, FieldStorage protects itself better against certain DoS attacks
    by limiting the size of the data read in one chunk.  The API here
    does not support that kind of protection.  This also affects parse()
    since it can call parse_multipart().

    Rtboundarys&Invalid boundary in multipart form: %rs--i����scontent-lengthisMaximum content length exceededii����s
s
scontent-dispositions	form-datatnameN(tvalid_boundaryR3R.t	mimetoolstMessaget	getheaderR1R2R4treadlinetstriptappendtjoinR(R7R<RAtnextparttlastparttpartdictt
terminatortbytestdatatheadersR=tlinestlinetkeytparamsRB((s/usr/lib64/python2.7/cgi.pyR�sz



	





ccs�x�|d dkr�|d}|jd�}xR|dkr�|jdd|�|jdd|�dr�|jd|d�}q/W|dkr�t|�}n|| }|j�V||}qWdS(Nit;it"s\"i(tfindtcounttlenRH(tstendtf((s/usr/lib64/python2.7/cgi.pyt_parseparam's
;
cCs�td|�}|j�}i}x�|D]�}|jd�}|dkr)|| j�j�}||dj�}t|�dkr�|d|dko�dknr�|dd!}|jdd	�jd
d�}n|||<q)q)W||fS(sfParse a Content-type like header.

    Return the main content-type and a dictionary of options.

    RVt=iiii����RWs\\s\s\"(R^tnextRXRHtlowerRZtreplace(RStpartsRTR<tptiRBtvalue((s/usr/lib64/python2.7/cgi.pyR3s
6
!cBsPeZdZdZdZdZdZiZdZ	iZ
iZd�Zd�Z
RS(s=Like FieldStorage, for use when no file uploads are possible.cCs||_||_dS(s&Constructor from field name and value.N(RBRf(tselfRBRf((s/usr/lib64/python2.7/cgi.pyt__init__Ys	cCsd|j|jfS(s Return printable representation.sMiniFieldStorage(%r, %r)(RBRf(Rg((s/usr/lib64/python2.7/cgi.pyt__repr___sN(t__name__t
__module__t__doc__R.tfilenametlistttypetfilettype_optionstdispositiontdisposition_optionsRQRhRi(((s/usr/lib64/python2.7/cgi.pyRKs	c	Bs
eZdZdddejddddd�Zd�Zd�Zd�Z	d�Z
dd�Zdd	�Zd
�Z
d�Zd�Zd
�Zd�Zd�Zd�ZdZd�Zd�ZdZd�Zd�Zd�Zd�Zd�Zd�Zdd�ZRS(s�Store a sequence of fields, reading multipart/form-data.

    This class provides naming, typing, files stored on disk, and
    more.  At the top level, it is accessible like a dictionary, whose
    keys are the field names.  (Note: None can occur as a field name.)
    The items are either a Python list (if there's multiple values) or
    another FieldStorage or MiniFieldStorage object.  If it's a single
    object, it has the following attributes:

    name: the field name, if specified; otherwise None

    filename: the filename, if specified; otherwise None; this is the
        client side filename, *not* the file name on which it is
        stored (that's a temporary file you don't deal with)

    value: the value as a *string*; for file uploads, this
        transparently reads the file every time you request the value

    file: the file(-like) object from which you can read the data;
        None if the data is stored a simple string

    type: the content-type, or None if not specified

    type_options: dictionary of options specified on the content-type
        line

    disposition: content-disposition, or None if not specified

    disposition_options: dictionary of corresponding options

    headers: a dictionary(-like) object (sometimes rfc822.Message or a
        subclass thereof) containing *all* headers

    The class is subclassable, mostly for the purpose of overriding
    the make_file() method, which is called internally to come up with
    a file open for reading and writing.  This makes it possible to
    override the default choice of storing all files in a temporary
    directory and unlinking them as soon as they have been opened.

    Ric	Csqd}	||_||_||_||_d|krI|dj�}	nd|_|	dksj|	dkr�d|kr�|d}
n#tjdr�tjd}
nd}
t	|
�}|dkr�idd6}q�n|dkrUi}|	d	kr�d|d<nd
|kr|d
|d<nd|kr5|d|_nd|krU|d|d<qUn|patj
|_||_||_
di}}d
|jkr�t|jd
�\}}n||_||_d|_d|kr�|d|_nd|_d|kr
|d|_nd|jkr8t|jd�\}
}n2|j
sM|	d	kr]di}
}n
di}
}|
|_||_d|_d|kr�|d|_nd}d|jkryt|jd�}Wntk
r�nXtr|tkrtd�qn||_d|_|_d|_|
dkr=|j�n0|
d dkrc|j|||�n
|j�dS(s�Constructor.  Read multipart/* until last part.

        Arguments, all optional:

        fp              : file pointer; default: sys.stdin
            (not used when the request method is GET)

        headers         : header dictionary-like object; default:
            taken from environ as per CGI spec

        outerboundary   : terminating multipart boundary
            (for internal use only)

        environ         : environment dictionary; default: os.environ

        keep_blank_values: flag indicating whether blank values in
            percent-encoded forms should be treated as blank strings.
            A true value indicates that blanks should be retained as
            blank strings.  The default false value indicates that
            blank values are to be ignored and treated as if they were
            not included.

        strict_parsing: flag indicating what to do with parsing errors.
            If false (the default), errors are silently ignored.
            If true, errors raise a ValueError exception.

        max_num_fields: int. If set, then __init__ throws a ValueError
            if there are more than n fields read by parse_qsl().

        R'R&tHEADR+iRs!application/x-www-form-urlencodedscontent-typeR(R)R*scontent-lengthscontent-dispositionRBRms
text/plainRAi����sMaximum content length exceededii
s
multipart/N( R9R:R@R-tupperR.t
qs_on_postR/R5RR0R7RQt
outerboundaryRRrRsRBRmRoRqt
innerboundaryR1R3R2tlengthRnRptdonetread_urlencodedt
read_multitread_single(RgR7RQRwR8R9R:R@R-tmethodR>tcdispR<R;tclen((s/usr/lib64/python2.7/cgi.pyRh�s�!					


		
				
			
		
cCsd|j|j|jfS(s"Return a printable representation.sFieldStorage(%r, %r, %r)(RBRmRf(Rg((s/usr/lib64/python2.7/cgi.pyRi	scCst|j��S(N(titertkeys(Rg((s/usr/lib64/python2.7/cgi.pyt__iter__scCsx|dkrt|�n|jrS|jjd�|jj�}|jjd�n!|jdk	rn|j}nd}|S(NRfi(tAttributeErrorRptseekR4RnR.(RgRBRf((s/usr/lib64/python2.7/cgi.pyt__getattr__s	cCs�|jdkrtd�ng}x0|jD]%}|j|kr+|j|�q+q+W|sft|�nt|�dkr�|dS|SdS(sDictionary style indexing.s
not indexableiiN(RnR.t	TypeErrorRBRItKeyErrorRZ(RgRTtfoundtitem((s/usr/lib64/python2.7/cgi.pyt__getitem__scCsS||krK||}t|�tg�krAttd�|�S|jSn|SdS(s8Dictionary style get() method, including 'value' lookup.RfN(RotmapRRf(RgRTtdefaultRf((s/usr/lib64/python2.7/cgi.pytgetvalue,s

cCsK||krC||}t|�tg�kr9|djS|jSn|SdS(s! Return the first value received.iN(RoRf(RgRTR�Rf((s/usr/lib64/python2.7/cgi.pytgetfirst7s

cCsV||krN||}t|�tg�krAttd�|�S|jgSngSdS(s  Return list of received values.RfN(RoR�RRf(RgRTRf((s/usr/lib64/python2.7/cgi.pytgetlistBs

cCs8|jdkrtd�nttd�|jD���S(sDictionary style keys() method.s
not indexablecss|]}|jVqdS(N(RB(t.0R�((s/usr/lib64/python2.7/cgi.pys	<genexpr>QsN(RnR.R�tset(Rg((s/usr/lib64/python2.7/cgi.pyR�Mscs8|jdkrtd�nt�fd�|jD��S(s"Dictionary style has_key() method.s
not indexablec3s|]}|j�kVqdS(N(RB(R�R�(RT(s/usr/lib64/python2.7/cgi.pys	<genexpr>WsN(RnR.R�tany(RgRT((RTs/usr/lib64/python2.7/cgi.pythas_keySscs8|jdkrtd�nt�fd�|jD��S(s%Dictionary style __contains__ method.s
not indexablec3s|]}|j�kVqdS(N(RB(R�R�(RT(s/usr/lib64/python2.7/cgi.pys	<genexpr>]sN(RnR.R�R�(RgRT((RTs/usr/lib64/python2.7/cgi.pyt__contains__YscCst|j��S(s Dictionary style len(x) support.(RZR�(Rg((s/usr/lib64/python2.7/cgi.pyt__len___scCs
t|j�S(N(tboolRn(Rg((s/usr/lib64/python2.7/cgi.pyt__nonzero__cscCs�|jj|j�}|jr2|d|j7}ntj||j|j|j|j	�}g|D]\}}t
||�^q`|_|j�dS(s+Internal: read data in query string format.R,N(
R7R4RyRvR6RR9R:R@R-RRnt
skip_lines(RgR>tqueryRTRf((s/usr/lib64/python2.7/cgi.pyR{fs	+c
Cs�|j}t|�s(td|f�ng|_|jr�tj|j|j|j|j	|j
�}|jjd�|D��d}n|j	}|dk	r�|t
|j�8}n|jp�|j}||ji|||||�}	x�|	js�tj|j�}
||j|
|||||d|j
�}	|dk	r�|d8}|	jrb|t
|	j�8}n|dkr�td��q�n|jj|	�q�W|j�dS(s/Internal: read a part that is itself multipart.s&Invalid boundary in multipart form: %rcss$|]\}}t||�VqdS(N(R(R�RTRf((s/usr/lib64/python2.7/cgi.pys	<genexpr>sR-iisMax number of fields exceededN(RxRCR3RnRvR6RR9R:R@R-textendR.RZtFieldStorageClasst	__class__R7Rztrfc822RERIR�(RgR8R9R:tibR�R�R@tklasstpartRQ((s/usr/lib64/python2.7/cgi.pyR|ssD								
	cCsD|jdkr&|j�|j�n
|j�|jjd�dS(sInternal: read an atomic part.iN(Rytread_binaryR�t
read_linesRpR�(Rg((s/usr/lib64/python2.7/cgi.pyR}�s



iicCs�|jd�|_|j}|dkr�xd|dkr�|jjt||j��}|sgd|_Pn|jj|�|t	|�}q*WndS(sInternal: read binary data.tbii����N(
t	make_fileRpRyR7R4tmintbufsizeRzR#RZ(RgttodoRP((s/usr/lib64/python2.7/cgi.pyR��s		cCs7t�|_|_|jr)|j�n
|j�dS(s0Internal: read lines until EOF or outerboundary.N(RRpt_FieldStorage__fileRwtread_lines_to_outerboundarytread_lines_to_eof(Rg((s/usr/lib64/python2.7/cgi.pyR��s	
cCs||jdk	rh|jj�t|�dkrh|jd�|_|jj|jj��d|_qhn|jj|�dS(Ni�R(R�R.ttellRZR�RpR#R�(RgRS((s/usr/lib64/python2.7/cgi.pyt__write�scCs=x6|jjd�}|s(d|_Pn|j|�qWdS(sInternal: read lines until EOF.iii����Ni(R7RGRzt_FieldStorage__write(RgRS((s/usr/lib64/python2.7/cgi.pyR��s	cCs^d|j}|d}d}t}x4|jjd�}|sKd|_Pn|dkrj||}d}n|d dkr�|r�|j�}||kr�Pn||kr�d|_Pq�n|}|dd	kr�d	}|d }t}n^|dd
krd
}|d }t}n5|ddkr9d}|d }t}nd}t}|j||�q&WdS(
s)Internal: read lines until outerboundary.s--Riii����s
ii����s
s
Ni(RwtTrueR7RGRzRHtFalseR�(RgR`tlasttdelimtlast_line_lfendRStstrippedlinetodelim((s/usr/lib64/python2.7/cgi.pyR��sF

	
		
	
	
	cCs�|js|jrdSd|j}|d}t}x�|jjd�}|s\d|_Pn|d dkr�|r�|j�}||kr�Pn||kr�d|_Pq�n|jd�}q7WdS(	s5Internal: skip lines until outer boundary if defined.Ns--iii����is
i(RwRzR�R7RGRHtendswith(RgR`R�R�RSR�((s/usr/lib64/python2.7/cgi.pyR��s$

		cCsddl}|jd�S(s�Overridable: return a readable & writable file.

        The file will be used as follows:
        - data is written to it
        - seek(0)
        - data is read from it

        The 'binary' argument is unused -- the file is always opened
        in binary mode.

        This version opens a temporary file for reading and writing,
        and immediately deletes (unlinks) it.  The trick (on Unix!) is
        that the file can still be used, but it can't be opened by
        another process, and it will automatically be deleted when it
        is closed or when the current process terminates.

        If you want a more permanent file, you derive a class which
        overrides this method.  If you want a visible temporary file
        that is nevertheless automatically deleted when the script
        terminates, try defining a __del__ method in a derived class
        which unlinks the temporary files you have created.

        i����Nsw+b(ttempfilet
TemporaryFile(RgtbinaryR�((s/usr/lib64/python2.7/cgi.pyR�sNi (RjRkRlR.tosR8RhRiR�R�R�R�R�R�R�R�R�R�R�R{R�R|R}R�R�R�R�R�R�R�R�(((s/usr/lib64/python2.7/cgi.pyRds8)	x			
									,			
					)	cBs&eZdZejdddd�ZRS(sxForm content as dictionary with a list of values per field.

    form = FormContentDict()

    form[key] -> [value, value, ...]
    key in form -> Boolean
    form.keys() -> [key, key, ...]
    form.values() -> [[val, val, ...], [val, val, ...], ...]
    form.items() ->  [(key, [val, val, ...]), (key, [val, val, ...]), ...]
    form.dict == {key: [val, val, ...], ...}

    ic	Cs<td|d|d|d|�|_|_|d|_dS(NR8R9R:R-R+(RtdictRPtquery_string(RgR8R9R:R-((s/usr/lib64/python2.7/cgi.pyRh;s
N(RjRkRlR�R8R.Rh(((s/usr/lib64/python2.7/cgi.pyR.scBs2eZdZd�Zd�Zd�Zd�ZRS(s�Form content as dictionary expecting a single value per field.

    If you only expect a single value for each field, then form[key]
    will return that single value.  It will raise an IndexError if
    that expectation is not true.  If you expect a field to have
    possible multiple values, than you can use form.getlist(key) to
    get all of the values.  values() and items() are a compromise:
    they return single strings where there is a single value, and
    lists of strings otherwise.

    cCs4t|j|�dkr%td�n|j|dS(Nisexpecting a single valuei(RZR�t
IndexError(RgRT((s/usr/lib64/python2.7/cgi.pyR�OscCs|j|S(N(R�(RgRT((s/usr/lib64/python2.7/cgi.pyR�SscCsWg}xJ|jj�D]9}t|�dkrB|j|d�q|j|�qW|S(Nii(R�tvaluesRZRI(RgtresultRf((s/usr/lib64/python2.7/cgi.pyR�UscCsig}x\|jj�D]K\}}t|�dkrN|j||df�q|j||f�qW|S(Nii(R�titemsRZRI(RgR�RTRf((s/usr/lib64/python2.7/cgi.pyR�\s(RjRkRlR�R�R�R�(((s/usr/lib64/python2.7/cgi.pyR	Cs
			cBs)eZdZd�Zd�Zd�ZRS(s7This class is present for backwards compatibility only.cCsstj||�}|ddkriyt|�SWqitk
reyt|�SWqftk
raqfXqiXn|j�S(Nis
0123456789+-.(R	R�R1R3tfloatRH(RgRTtv((s/usr/lib64/python2.7/cgi.pyR�gs

cCs^g}xQ|j�D]C}y|j||�Wqtk
rU|j|j|�qXqW|S(N(R�RIR�R�(RgR�RT((s/usr/lib64/python2.7/cgi.pyR�os
cCsjg}x]|j�D]O}y|j|||f�Wqtk
ra|j||j|f�qXqW|S(N(R�RIR�R�(RgR�RT((s/usr/lib64/python2.7/cgi.pyR�ws
"(RjRkRlR�R�R�(((s/usr/lib64/python2.7/cgi.pyR
es		cBsDeZdZd�Zd�Zd�Zd�Zd�Zd�ZRS(s7This class is present for backwards compatibility only.cCs"||jkr|j|SdSdS(N(R�R.(RgRT((s/usr/lib64/python2.7/cgi.pyR��scCsF||jkr>t|j|�|kr7|j||SdSndSdS(N(R�RZR.(RgRTtlocation((s/usr/lib64/python2.7/cgi.pyt
indexed_value�s
cCs&||jkr|j|dSdSdS(Ni(R�R.(RgRT((s/usr/lib64/python2.7/cgi.pyRf�scCst|j|�S(N(RZR�(RgRT((s/usr/lib64/python2.7/cgi.pyRy�scCs,||jkr$|j|dj�SdSdS(Ni(R�RHR.(RgRT((s/usr/lib64/python2.7/cgi.pytstripped�scCs|jS(N(R�(Rg((s/usr/lib64/python2.7/cgi.pytpars�s(	RjRkRlR�R�RfRyR�R�(((s/usr/lib64/python2.7/cgi.pyR�s					cCs�dGHHtjt_yWt�}t�t�t|�t|�t�d�}|d�}dGH|�Wnt	�nXdGHda
y/t�}t�t�t|�t|�Wnt	�nXdS(s�Robust test CGI script, usable as main program.

    Write minimal HTTP headers and dump all information provided to
    the script in HTML form.

    sContent-type: text/htmlcRsddUdS(Ns,testing print_exception() -- <I>italics?</I>((((s/usr/lib64/python2.7/cgi.pyR]�scSs|�dS(N((R]((s/usr/lib64/python2.7/cgi.pytg�ss9<H3>What follows is a test, not an actual exception:</H3>s*<H1>Second try with a small maxlen...</H1>i2N(R/tstdouttstderrRRRRRRRR2(R8tformR]R�((s/usr/lib64/python2.7/cgi.pyttest�s4	

		
cCs�|dkr$tj�\}}}nddl}HdGH|j||�|j||�}dtdj|d ��t|d�fGH~dS(Ni����s+<H3>Traceback (most recent call last):</H3>s<PRE>%s<B>%s</B></PRE>R(R.R/texc_infot	tracebackt	format_tbtformat_exception_onlyRRJ(RoRfttbtlimitR�Rn((s/usr/lib64/python2.7/cgi.pyR�scCs]|j�}|j�HdGHdGHx/|D]'}dGt|�GdGt||�GHq(WdGHHdS(s#Dump the shell environment as HTML.s<H3>Shell Environment:</H3>s<DL>s<DT>s<DD>s</DL>N(R�tsortR(R8R�RT((s/usr/lib64/python2.7/cgi.pyR�s

%cCs�|j�}|j�HdGH|s*dGHndGHx^|D]V}dt|�dG||}dttt|���dGHdtt|��GHq6Wd	GHHd
S(s$Dump the contents of a form as HTML.s<H3>Form Contents:</H3>s<P>No form fields.s<DL>s<DT>t:s<i>s</i>s<DD>s</DL>N(R�R�RtreprRo(R�R�RTRf((s/usr/lib64/python2.7/cgi.pyR�s


cCsTHdGHytj�}Wn+tjk
rC}dGtt|��GHnXt|�GHHdS(s#Dump the current directory as HTML.s#<H3>Current Working Directory:</H3>s	os.error:N(R�tgetcwdterrorRtstr(tpwdtmsg((s/usr/lib64/python2.7/cgi.pyR�scCsHdGHHtjGHHdS(Ns <H3>Command Line Arguments:</H3>(R/R5(((s/usr/lib64/python2.7/cgi.pyR�s
cCs	dGHdS(s9Dump a list of environment variables used by CGI as HTML.s�
<H3>These environment variables could have been set:</H3>
<UL>
<LI>AUTH_TYPE
<LI>CONTENT_LENGTH
<LI>CONTENT_TYPE
<LI>DATE_GMT
<LI>DATE_LOCAL
<LI>DOCUMENT_NAME
<LI>DOCUMENT_ROOT
<LI>DOCUMENT_URI
<LI>GATEWAY_INTERFACE
<LI>LAST_MODIFIED
<LI>PATH
<LI>PATH_INFO
<LI>PATH_TRANSLATED
<LI>QUERY_STRING
<LI>REMOTE_ADDR
<LI>REMOTE_HOST
<LI>REMOTE_IDENT
<LI>REMOTE_USER
<LI>REQUEST_METHOD
<LI>SCRIPT_NAME
<LI>SERVER_NAME
<LI>SERVER_PORT
<LI>SERVER_PROTOCOL
<LI>SERVER_ROOT
<LI>SERVER_SOFTWARE
</UL>
In addition, HTTP headers sent by the server may be passed in the
environment as well.  Here are some common variable names:
<UL>
<LI>HTTP_ACCEPT
<LI>HTTP_CONNECTION
<LI>HTTP_HOST
<LI>HTTP_PRAGMA
<LI>HTTP_REFERER
<LI>HTTP_USER_AGENT
</UL>
N((((s/usr/lib64/python2.7/cgi.pyRs)cCsU|jdd�}|jdd�}|jdd�}|rQ|jdd�}n|S(	s�Replace special characters "&", "<" and ">" to HTML-safe sequences.
    If the optional flag quote is true, the quotation mark character (")
    is also translated.R,s&amp;t<s&lt;t>s&gt;RWs&quot;(Rb(R[tquote((s/usr/lib64/python2.7/cgi.pyR/ss^[ -~]{0,200}[!-~]$cCsddl}|j||�S(Ni����(tretmatch(R[t_vb_patternR�((s/usr/lib64/python2.7/cgi.pyRC:st__main__(3Rlt__version__toperatorRR/R�tUserDictR6twarningsRRRtpy3kwarningtDeprecationWarningRDR�t	cStringIORtImportErrort__all__RR.RR"R RRR2R8RR
RRR^RRRRR	R
RR�RRRRRRRRCRj(((s/usr/lib64/python2.7/cgi.pyt<module>sr
			

					#		:	a		��"'				/

Zerion Mini Shell 1.0