OwlCyberSecurity - MANAGER
Edit File: cgi.pyc
� zfc�����������@���s���d��Z��d�Z�d�d�l�m�Z�d�d�l�Z�d�d�l�Z�d�d�l�Z�d�d�l�Z�d�d�l�m �Z �m �Z �m�Z�e �����I�e�j�r��e �d�d�e ���e �d�d�e ���n��d�d�l�Z�d�d�l�Z�Wd�QXy�d�d �l�m�Z�Wn!�e�k �r��d�d �l�m�Z�n�Xd �d�d�d �d�d�d�d�d�d�d�d�d�d�d�d�d�d�g�Z�d�Z�e�a�d����Z�d����Z�d����Z�e�a�d �a�e�e�j�d �d �e�d!���Z�d �d �e�d"���Z�d �d �e�e�d#���Z�d$����Z �d%����Z!�d&����Z"�d �f��d'�������YZ#�d�f��d(�������YZ$�d�e�j�f�d)�������YZ%�d �e%�f�d*�������YZ&�d�e&�f�d+�������YZ'�d�e%�f�d,�������YZ(�e�j�d-���Z)�e�e�e�e�d.���Z*�e�j�d/���Z+�d0����Z,�d1����Z-�d2����Z.�d3����Z/�e�d4���Z0�d5�d6���Z1�e2�d7�k�r�e)����n��d�S(8���s����Support module for CGI (Common Gateway Interface) scripts. This module defines a number of utilities for use by CGI scripts written in Python. s���2.6i����(���t ���attrgetterN(���t���filterwarningst���catch_warningst���warnt���ignores���.*mimetools has been removeds���.*rfc822 has been removed(���t���StringIOt���MiniFieldStoraget���FieldStoraget���FormContentDictt���SvFormContentDictt���InterpFormContentDictt���FormContentt���parset���parse_qst ���parse_qslt���parse_multipartt���parse_headert���print_exceptiont ���print_environt ���print_formt���print_directoryt���print_argumentst���print_environ_usaget���escapet����c����������G���sZ���t��r7�t�r7�y�t�t��d���a�Wq7�t�k �r3�q7�Xn��t�sF�t�a�n�t�a�t�|�����d�S(���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). t���aN(���t���logfilet���logfpt���opent���IOErrort���nologt���logt���dolog(���t���allargs(����(����s���/usr/lib64/python2.7/cgi.pyt���initlogG���s���� c���������G���s���t��j�|��|�d���d�S(���s=���Write a log message to the log file. See initlog() for docs.s��� N(���R���t���write(���t���fmtt���args(����(����s���/usr/lib64/python2.7/cgi.pyR ���j���s����c����������G���s���d�S(���s9���Dummy function, assigned to log when logging is disabled.N(����(���R!���(����(����s���/usr/lib64/python2.7/cgi.pyR���n���s����i����c��� ������C���s���|��d�k�r�t�j�}��n��d�|�k�r1�d�|�d�<n��|�d�d�k�r3t�|�d���\�}�}�|�d�k�rp�t�|��|���S|�d�k�r��t�|�d���}�t�r��|�t�k�r��t�d���n��|��j�|���}�n�d �}�d �|�k�r��|�r��|�d�}�n��|�|�d �}�n4�t�j �d�r&|�r|�d�}�n��|�t�j �d�}�n��|�|�d �<nF�d �|�k�rL|�d �}�n-�t�j �d�rit�j �d�}�n�d �}�|�|�d �<t �j�|�|�|�d �|��S(���so��Parse 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. t���REQUEST_METHODt���GETt���POSTt���CONTENT_TYPEs���multipart/form-datas!���application/x-www-form-urlencodedt���CONTENT_LENGTHs���Maximum content length exceededR���t���QUERY_STRINGt���&i���t ���separatorN(���t���Nonet���syst���stdinR���R���t���intt���maxlent ���ValueErrort���readt���argvt���urlparseR ���( ���t���fpt���environt���keep_blank_valuest���strict_parsingR-���t���ctypet���pdictt���clengtht���qs(����(����s���/usr/lib64/python2.7/cgi.pyR���|���s<���� � � c���������C���s)���t��d�t�d���t�j�|��|�|�d�|��S(���s)���Parse a query given as a string argument.s9���cgi.parse_qs is deprecated, use urlparse.parse_qs insteadi���R-���(���R���t���PendingDeprecationWarningR6���R ���(���R>���R9���R:���R-���(����(����s���/usr/lib64/python2.7/cgi.pyR �������s���� c���������C���s,���t��d�t�d���t�j�|��|�|�|�d�|��S(���s)���Parse a query given as a string argument.s;���cgi.parse_qsl is deprecated, use urlparse.parse_qsl insteadi���R-���(���R���R?���R6���R���(���R>���R9���R:���t���max_num_fieldsR-���(����(����s���/usr/lib64/python2.7/cgi.pyR�������s���� c���������C���s���d�}�d�|�k�r�|�d�}�n��t��|���s>�t�d�|�f���n��d�|�}�d�|�d�}�i��}�d�}�x'|�|�k�r�d�}�d�}�|�rt�j�|����} �| �j�d���} �| �r��y�t�| ���}�Wq��t�k �r��q��Xn��|�d�k�r t�r��|�t�k�r��t�d���n��|��j�|���}�qd�}�n��g��}�xb�|��j ����}�|�s8|�}�Pn��|�d � d�k�rm|�j ����}�|�|�|�f�k�rmPqmn��|�j�|���qW|�d�k�r�qe�n��|�d�k��r|�r|�d�}�|�d �d�k�r�|�d � }�n�|�d�d�k�r�|�d� }�n��|�|�d�<d�j�|���}�qn��| �d �}�|�sqe�n��t �|���\�} �}�| �d�k�r?qe�n��d�|�k�re�|�d�}�n�qe�|�|�k�r{|�|�j�|���qe�|�g�|�|�<qe�W|�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(). R���t���boundarys&���Invalid boundary in multipart form: %rs���--i����s���content-lengthi����s���Maximum content length exceededi���i����s��� s��� s���content-dispositions ���form-datat���nameN(���t���valid_boundaryR3���R.���t ���mimetoolst���Messaget ���getheaderR1���R2���R4���t���readlinet���stript���appendt���joinR���(���R7���R<���RA���t���nextpartt���lastpartt���partdictt ���terminatort���bytest���datat���headersR=���t���linest���linet���keyt���paramsRB���(����(����s���/usr/lib64/python2.7/cgi.pyR�������sz���� c���������c���s����x��|��d� d�k�r��|��d�}��|��j��d���}�xR�|�d�k�r��|��j�d�d�|���|��j�d�d�|���d�r��|��j��d�|�d���}�q/�W|�d�k��r��t�|����}�n��|��|� }�|�j����V|��|�}��q�Wd��S(���Ni���t���;i����t���"s���\"i���(���t���findt���countt���lenRH���(���t���st���endt���f(����(����s���/usr/lib64/python2.7/cgi.pyt���_parseparam'��s���� ; c���������C���s����t��d�|����}�|�j����}�i��}�x��|�D]��}�|�j�d���}�|�d�k�r)�|�|� j����j����}�|�|�d�j����}�t�|���d�k�r��|�d�|�d�k�o��d�k�n�r��|�d�d�!}�|�j�d�d ���j�d �d���}�n��|�|�|�<q)�q)�W|�|�f�S(���sf���Parse a Content-type like header. Return the main content-type and a dictionary of options. RV���t���=i����i���i���i����RW���s���\\s���\s���\"(���R^���t���nextRX���RH���t���lowerRZ���t���replace(���RS���t���partsRT���R<���t���pt���iRB���t���value(����(����s���/usr/lib64/python2.7/cgi.pyR���3��s���� 6 !c�����������B���sP���e��Z�d��Z�d�Z�d�Z�d�Z�d�Z�i��Z�d�Z �i��Z �i��Z�d����Z�d����Z �RS(���s=���Like FieldStorage, for use when no file uploads are possible.c���������C���s���|�|��_��|�|��_�d�S(���s&���Constructor from field name and value.N(���RB���Rf���(���t���selfRB���Rf���(����(����s���/usr/lib64/python2.7/cgi.pyt���__init__Y��s���� c���������C���s���d�|��j��|��j�f�S(���s ���Return printable representation.s���MiniFieldStorage(%r, %r)(���RB���Rf���(���Rg���(����(����s���/usr/lib64/python2.7/cgi.pyt���__repr___��s����N(���t���__name__t ���__module__t���__doc__R.���t���filenamet���listt���typet���filet���type_optionst���dispositiont���disposition_optionsRQ���Rh���Ri���(����(����(����s���/usr/lib64/python2.7/cgi.pyR���K��s��� c�������� ���B���s ��e��Z�d��Z�d�d�d�e�j�d�d�d�d�d���Z�d����Z�d����Z�d����Z �d����Z �d�d���Z�d�d ���Z�d ����Z �d����Z�d����Z�d ����Z�d����Z�d����Z�d����Z�d�Z�d����Z�d����Z�d�Z�d����Z�d����Z�d����Z�d����Z�d����Z�d����Z�d�d���Z�RS(���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. R���i����c ���������C���sq��d�} �|�|��_��|�|��_�|�|��_�|�|��_�d�|�k�rI�|�d�j����} �n��d�|��_�| �d�k�sj�| �d�k�r��d�|�k�r��|�d�} �n#�t�j�d�r��t�j�d�} �n�d�} �t �| ���}�|�d�k�r��i�d�d�6}�q��n��|�d�k�rUi��}�| �d �k�r��d�|�d�<n��d �|�k�r|�d �|�d�<n��d�|�k�r5|�d�|��_�n��d�|�k�rU|�d�|�d�<qUn��|�pat�j �|��_�|�|��_�|�|��_ �d�i��}�}�d �|��j�k�r�t�|��j�d ���\�}�}�n��|�|��_�|�|��_�d�|��_�d�|�k�r�|�d�|��_�n��d�|��_�d�|�k�r |�d�|��_�n��d�|��j�k�r8t�|��j�d���\�} �}�n2�|��j �sM| �d �k�r]d�i��} �}�n �d�i��} �}�| �|��_�|�|��_�d�|��_�d�|�k�r�|�d�|��_�n��d�}�d�|��j�k�ry�t�|��j�d���}�Wn�t�k �r�n�Xt�r|�t�k�rt�d���qn��|�|��_�d�|��_�|��_�d�|��_�| �d�k�r=|��j����n0�| �d� d�k�rc|��j�|�|�|���n �|��j����d�S(���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&���t���HEADR+���i���R���s!���application/x-www-form-urlencodeds���content-typeR(���R)���R*���s���content-lengths���content-dispositionRB���Rm���s ���text/plainRA���i����s���Maximum content length exceededi����i ���s ���multipart/N( ���R9���R:���R@���R-���t���upperR.���t ���qs_on_postR/���R5���R���R0���R7���RQ���t ���outerboundaryR���Rr���Rs���RB���Rm���Ro���Rq���t ���innerboundaryR1���R3���R2���t���lengthRn���Rp���t���donet���read_urlencodedt ���read_multit���read_single(���Rg���R7���RQ���Rw���R8���R9���R:���R@���R-���t���methodR>���t���cdispR<���R;���t���clen(����(����s���/usr/lib64/python2.7/cgi.pyRh������s�����! c���������C���s���d�|��j��|��j�|��j�f�S(���s"���Return a printable representation.s���FieldStorage(%r, %r, %r)(���RB���Rm���Rf���(���Rg���(����(����s���/usr/lib64/python2.7/cgi.pyRi��� ��s����c���������C���s���t��|��j������S(���N(���t���itert���keys(���Rg���(����(����s���/usr/lib64/python2.7/cgi.pyt���__iter__��s����c���������C���sx���|�d�k�r�t��|���n��|��j�rS�|��j�j�d���|��j�j����}�|��j�j�d���n!�|��j�d��k �rn�|��j�}�n�d��}�|�S(���NRf���i����(���t���AttributeErrorRp���t���seekR4���Rn���R.���(���Rg���RB���Rf���(����(����s���/usr/lib64/python2.7/cgi.pyt���__getattr__��s���� c���������C���s����|��j��d�k�r�t�d���n��g��}�x0�|��j��D]%�}�|�j�|�k�r+�|�j�|���q+�q+�W|�sf�t�|���n��t�|���d�k�r��|�d�S|�Sd�S(���s���Dictionary style indexing.s ���not indexablei���i����N(���Rn���R.���t ���TypeErrorRB���RI���t���KeyErrorRZ���(���Rg���RT���t���foundt���item(����(����s���/usr/lib64/python2.7/cgi.pyt���__getitem__��s�����c���������C���sS���|�|��k�rK�|��|�}�t��|���t��g����k�rA�t�t�d���|���S|�j�Sn�|�Sd�S(���s8���Dictionary style get() method, including 'value' lookup.Rf���N(���Ro���t���mapR����Rf���(���Rg���RT���t���defaultRf���(����(����s���/usr/lib64/python2.7/cgi.pyt���getvalue,��s���� c���������C���sK���|�|��k�rC�|��|�}�t��|���t��g����k�r9�|�d�j�S|�j�Sn�|�Sd�S(���s!��� Return the first value received.i����N(���Ro���Rf���(���Rg���RT���R����Rf���(����(����s���/usr/lib64/python2.7/cgi.pyt���getfirst7��s���� c���������C���sV���|�|��k�rN�|��|�}�t��|���t��g����k�rA�t�t�d���|���S|�j�g�Sn�g��Sd�S(���s ��� Return list of received values.Rf���N(���Ro���R����R����Rf���(���Rg���RT���Rf���(����(����s���/usr/lib64/python2.7/cgi.pyt���getlistB��s���� c���������C���s8���|��j��d�k�r�t�d���n��t��t�d����|��j��D������S(���s���Dictionary style keys() method.s ���not indexablec���������s���s���|��]�}�|�j��Vq�d��S(���N(���RB���(���t���.0R����(����(����s���/usr/lib64/python2.7/cgi.pys ���<genexpr>Q��s����N(���Rn���R.���R����t���set(���Rg���(����(����s���/usr/lib64/python2.7/cgi.pyR����M��s����c������������s8���|��j��d�k�r�t�d���n��t����f�d����|��j��D����S(���s"���Dictionary style has_key() method.s ���not indexablec���������3���s���|��]�}�|�j�����k�Vq�d��S(���N(���RB���(���R����R����(���RT���(����s���/usr/lib64/python2.7/cgi.pys ���<genexpr>W��s����N(���Rn���R.���R����t���any(���Rg���RT���(����(���RT���s���/usr/lib64/python2.7/cgi.pyt���has_keyS��s����c������������s8���|��j��d�k�r�t�d���n��t����f�d����|��j��D����S(���s%���Dictionary style __contains__ method.s ���not indexablec���������3���s���|��]�}�|�j�����k�Vq�d��S(���N(���RB���(���R����R����(���RT���(����s���/usr/lib64/python2.7/cgi.pys ���<genexpr>]��s����N(���Rn���R.���R����R����(���Rg���RT���(����(���RT���s���/usr/lib64/python2.7/cgi.pyt���__contains__Y��s����c���������C���s���t��|��j������S(���s ���Dictionary style len(x) support.(���RZ���R����(���Rg���(����(����s���/usr/lib64/python2.7/cgi.pyt���__len___��s����c���������C���s ���t��|��j���S(���N(���t���boolRn���(���Rg���(����(����s���/usr/lib64/python2.7/cgi.pyt���__nonzero__c��s����c���������C���s����|��j��j�|��j���}�|��j�r2�|�d�|��j�7}�n��t�j�|�|��j�|��j�|��j�|��j ���}�g��|�D]�\�}�}�t �|�|���^�q`�|��_�|��j����d�S(���s+���Internal: read data in query string format.R,���N( ���R7���R4���Ry���Rv���R6���R���R9���R:���R@���R-���R���Rn���t ���skip_lines(���Rg���R>���t���queryRT���Rf���(����(����s���/usr/lib64/python2.7/cgi.pyR{���f��s���� +c������ ���C���s���|��j��}�t�|���s(�t�d�|�f���n��g��|��_�|��j�r��t�j�|��j�|��j�|��j�|��j �|��j ���}�|��j�j�d����|�D����d�}�n��|��j �}�|�d�k �r��|�t �|��j���8}�n��|��j�p��|��j�}�|�|��j�i��|�|�|�|�|���} �x��| �j�s�t�j�|��j���} �|�|��j�| �|�|�|�|�|�d�|��j ��} �|�d�k �r�|�d�8}�| �j�rb|�t �| �j���8}�n��|�d�k��r�t�d�����q�n��|��j�j�| ���q��W|��j����d�S(���s/���Internal: read a part that is itself multipart.s&���Invalid boundary in multipart form: %rc���������s���s$���|��]�\�}�}�t��|�|���Vq�d��S(���N(���R���(���R����RT���Rf���(����(����s���/usr/lib64/python2.7/cgi.pys ���<genexpr>��s���R-���i���i����s���Max number of fields exceededN(���Rx���RC���R3���Rn���Rv���R6���R���R9���R:���R@���R-���t���extendR.���RZ���t���FieldStorageClasst ���__class__R7���Rz���t���rfc822RE���RI���R����(���Rg���R8���R9���R:���t���ibR����R����R@���t���klasst���partRQ���(����(����s���/usr/lib64/python2.7/cgi.pyR|���s��sD���� c���������C���sD���|��j��d�k�r&�|��j����|��j����n �|��j����|��j�j�d���d�S(���s���Internal: read an atomic part.i����N(���Ry���t���read_binaryR����t ���read_linesRp���R����(���Rg���(����(����s���/usr/lib64/python2.7/cgi.pyR}������s ���� i���i���c���������C���s����|��j��d���|��_�|��j�}�|�d�k�r��xd�|�d�k�r��|��j�j�t�|�|��j�����}�|�sg�d�|��_�Pn��|��j�j�|���|�t �|���}�q*�Wn��d�S(���s���Internal: read binary data.t���bi����i����N( ���t ���make_fileRp���Ry���R7���R4���t���mint���bufsizeRz���R#���RZ���(���Rg���t���todoRP���(����(����s���/usr/lib64/python2.7/cgi.pyR�������s���� c���������C���s7���t�����|��_�|��_�|��j�r)�|��j����n �|��j����d�S(���s0���Internal: read lines until EOF or outerboundary.N(���R���Rp���t���_FieldStorage__fileRw���t���read_lines_to_outerboundaryt���read_lines_to_eof(���Rg���(����(����s���/usr/lib64/python2.7/cgi.pyR�������s���� c���������C���s|���|��j��d��k �rh�|��j��j����t�|���d�k�rh�|��j�d���|��_�|��j�j�|��j��j������d��|��_��qh�n��|��j�j�|���d��S(���Ni���R���(���R����R.���t���tellRZ���R����Rp���R#���R����(���Rg���RS���(����(����s���/usr/lib64/python2.7/cgi.pyt���__write���s����c���������C���s=���x6�|��j��j�d���}�|�s(�d�|��_�Pn��|��j�|���q�Wd�S(���s���Internal: read lines until EOF.i���i���i����Ni���(���R7���RG���Rz���t���_FieldStorage__write(���Rg���RS���(����(����s���/usr/lib64/python2.7/cgi.pyR�������s���� c���������C���s^��d�|��j��}�|�d�}�d�}�t�}�x4|��j�j�d���}�|�sK�d�|��_�Pn��|�d�k�rj�|�|�}�d�}�n��|�d� d�k�r��|�r��|�j����}�|�|�k�r��Pn��|�|�k�r��d�|��_�Pq��n��|�}�|�d�d �k�r��d �}�|�d� }�t�}�n^�|�d�d �k�rd �}�|�d� }�t�}�n5�|�d�d�k�r9d�}�|�d� }�t�}�n�d�}�t�}�|��j�|�|���q&�Wd�S( ���s)���Internal: read lines until outerboundary.s���--R���i���i���i����s��� i���i����s��� s��� Ni���(���Rw���t���TrueR7���RG���Rz���RH���t���FalseR����(���Rg���R`���t���lastt���delimt���last_line_lfendRS���t���strippedlinet���odelim(����(����s���/usr/lib64/python2.7/cgi.pyR�������sF���� c���������C���s����|��j��s�|��j�r�d�Sd�|��j��}�|�d�}�t�}�x��|��j�j�d���}�|�s\�d�|��_�Pn��|�d� d�k�r��|�r��|�j����}�|�|�k�r��Pn��|�|�k�r��d�|��_�Pq��n��|�j�d���}�q7�Wd�S( ���s5���Internal: skip lines until outer boundary if defined.Ns���--i���i���i����i���s��� i���(���Rw���Rz���R����R7���RG���RH���t���endswith(���Rg���R`���R����R����RS���R����(����(����s���/usr/lib64/python2.7/cgi.pyR�������s$���� c���������C���s���d�d�l��}�|�j�d���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����Ns���w+b(���t���tempfilet ���TemporaryFile(���Rg���t���binaryR����(����(����s���/usr/lib64/python2.7/cgi.pyR������s����Ni� ��(���Rj���Rk���Rl���R.���t���osR8���Rh���Ri���R����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.pyR���d��s8���) x , ) c�����������B���s&���e��Z�d��Z�e�j�d�d�d�d���Z�RS(���sx��Form 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, ...], ...} i����c������ ���C���s<���t��d�|�d�|�d�|�d�|���|��_�|��_�|�d�|��_�d��S(���NR8���R9���R:���R-���R+���(���R���t���dictRP���t���query_string(���Rg���R8���R9���R:���R-���(����(����s���/usr/lib64/python2.7/cgi.pyRh���;��s ����N(���Rj���Rk���Rl���R����R8���R.���Rh���(����(����(����s���/usr/lib64/python2.7/cgi.pyR���.��s���c�����������B���s2���e��Z�d��Z�d����Z�d����Z�d����Z�d����Z�RS(���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. c���������C���s4���t��|��j�|���d�k�r%�t�d���n��|��j�|�d�S(���Ni���s���expecting a single valuei����(���RZ���R����t ���IndexError(���Rg���RT���(����(����s���/usr/lib64/python2.7/cgi.pyR����O��s����c���������C���s���|��j��|�S(���N(���R����(���Rg���RT���(����(����s���/usr/lib64/python2.7/cgi.pyR����S��s����c���������C���sW���g��}�xJ�|��j��j����D]9�}�t�|���d�k�rB�|�j�|�d���q�|�j�|���q�W|�S(���Ni���i����(���R����t���valuesRZ���RI���(���Rg���t���resultRf���(����(����s���/usr/lib64/python2.7/cgi.pyR����U��s����c���������C���si���g��}�x\�|��j��j����D]K�\�}�}�t�|���d�k�rN�|�j�|�|�d�f���q�|�j�|�|�f���q�W|�S(���Ni���i����(���R����t���itemsRZ���RI���(���Rg���R����RT���Rf���(����(����s���/usr/lib64/python2.7/cgi.pyR����\��s����(���Rj���Rk���Rl���R����R����R����R����(����(����(����s���/usr/lib64/python2.7/cgi.pyR ���C��s ��� c�����������B���s)���e��Z�d��Z�d����Z�d����Z�d����Z�RS(���s7���This class is present for backwards compatibility only.c���������C���ss���t��j�|��|���}�|�d�d�k�ri�y�t�|���SWqi�t�k �re�y�t�|���SWqf�t�k �ra�qf�Xqi�Xn��|�j����S(���Ni����s ���0123456789+-.(���R ���R����R1���R3���t���floatRH���(���Rg���RT���t���v(����(����s���/usr/lib64/python2.7/cgi.pyR����g��s����� � �c���������C���s^���g��}�xQ�|��j�����D]C�}�y�|�j�|��|���Wq�t�k �rU�|�j�|��j�|���q�Xq�W|�S(���N(���R����RI���R����R����(���Rg���R����RT���(����(����s���/usr/lib64/python2.7/cgi.pyR����o��s���� c���������C���sj���g��}�x]�|��j�����D]O�}�y�|�j�|�|��|�f���Wq�t�k �ra�|�j�|�|��j�|�f���q�Xq�W|�S(���N(���R����RI���R����R����(���Rg���R����RT���(����(����s���/usr/lib64/python2.7/cgi.pyR����w��s���� "(���Rj���Rk���Rl���R����R����R����(����(����(����s���/usr/lib64/python2.7/cgi.pyR ���e��s��� c�����������B���sD���e��Z�d��Z�d����Z�d����Z�d����Z�d����Z�d����Z�d����Z�RS(���s7���This class is present for backwards compatibility only.c���������C���s"���|�|��j��k�r�|��j��|�Sd��Sd��S(���N(���R����R.���(���Rg���RT���(����(����s���/usr/lib64/python2.7/cgi.pyR�������s�����c���������C���sF���|�|��j��k�r>�t�|��j��|���|�k�r7�|��j��|�|�Sd��Sn�d��Sd��S(���N(���R����RZ���R.���(���Rg���RT���t���location(����(����s���/usr/lib64/python2.7/cgi.pyt ���indexed_value���s ����c���������C���s&���|�|��j��k�r�|��j��|�d�Sd��Sd��S(���Ni����(���R����R.���(���Rg���RT���(����(����s���/usr/lib64/python2.7/cgi.pyRf������s�����c���������C���s���t��|��j�|���S(���N(���RZ���R����(���Rg���RT���(����(����s���/usr/lib64/python2.7/cgi.pyRy������s����c���������C���s,���|�|��j��k�r$�|��j��|�d�j����Sd��Sd��S(���Ni����(���R����RH���R.���(���Rg���RT���(����(����s���/usr/lib64/python2.7/cgi.pyt���stripped���s�����c���������C���s���|��j��S(���N(���R����(���Rg���(����(����s���/usr/lib64/python2.7/cgi.pyt���pars���s����( ���Rj���Rk���Rl���R����R����Rf���Ry���R����R����(����(����(����s���/usr/lib64/python2.7/cgi.pyR������s��� c���������C���s����d�GHHt��j�t��_�yW�t����}�t����t����t�|���t�|����t����d����}�|�d���}�d�GH|����Wn�t ����n�Xd�GHd�a �y/�t����}�t����t����t�|���t�|����Wn�t ����n�Xd�S(���s����Robust test CGI script, usable as main program. Write minimal HTTP headers and dump all information provided to the script in HTML form. s���Content-type: text/htmlc�����������R���s���d�d��Ud��S(���Ns,���testing print_exception() -- <I>italics?</I>(����(����(����(����s���/usr/lib64/python2.7/cgi.pyR]������s����c���������S���s���|�����d��S(���N(����(���R]���(����(����s���/usr/lib64/python2.7/cgi.pyt���g���s����s9���<H3>What follows is a test, not an actual exception:</H3>s*���<H1>Second try with a small maxlen...</H1>i2���N(���R/���t���stdoutt���stderrR���R���R���R���R���R���R���R2���(���R8���t���formR]���R����(����(����s���/usr/lib64/python2.7/cgi.pyt���test���s4���� c���������C���s����|��d��k�r$�t�j����\�}��}�}�n��d�d��l�}�Hd�GH|�j�|�|���|�j�|��|���}�d�t�d�j�|�d� ����t�|�d���f�GH~�d��S(���Ni����s+���<H3>Traceback (most recent call last):</H3>s���<PRE>%s<B>%s</B></PRE>R���(���R.���R/���t���exc_infot ���tracebackt ���format_tbt���format_exception_onlyR���RJ���(���Ro���Rf���t���tbt���limitR����Rn���(����(����s���/usr/lib64/python2.7/cgi.pyR������s����c���������C���s]���|��j�����}�|�j����Hd�GHd�GHx/�|�D]'�}�d�Gt�|���Gd�Gt�|��|���GHq(�Wd�GHHd�S(���s#���Dump the shell environment as HTML.s���<H3>Shell Environment:</H3>s���<DL>s���<DT>s���<DD>s���</DL>N(���R����t���sortR���(���R8���R����RT���(����(����s���/usr/lib64/python2.7/cgi.pyR������s���� %c���������C���s����|��j�����}�|�j����Hd�GH|�s*�d�GHn��d�GHx^�|�D]V�}�d�t�|���d�G|��|�}�d�t�t�t�|�������d�GHd�t�t�|�����GHq6�Wd �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����R���t���reprRo���(���R����R����RT���Rf���(����(����s���/usr/lib64/python2.7/cgi.pyR������s���� c����������C���sT���Hd�GHy�t��j����}��Wn+�t��j�k �rC�}�d�Gt�t�|�����GHn�Xt�|����GHHd�S(���s#���Dump the current directory as HTML.s#���<H3>Current Working Directory:</H3>s ���os.error:N(���R����t���getcwdt���errorR���t���str(���t���pwdt���msg(����(����s���/usr/lib64/python2.7/cgi.pyR������s����c�����������C���s���Hd�GHHt��j�GHHd��S(���Ns ���<H3>Command Line Arguments:</H3>(���R/���R5���(����(����(����s���/usr/lib64/python2.7/cgi.pyR������s ����c�����������C���s ���d�GHd�S(���s9���Dump 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.pyR������s����)c���������C���sU���|��j��d�d���}��|��j��d�d���}��|��j��d�d���}��|�rQ�|��j��d�d���}��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���&t���<s���<t���>s���>RW���s���"(���Rb���(���R[���t���quote(����(����s���/usr/lib64/python2.7/cgi.pyR���/��s����s���^[ -~]{0,200}[!-~]$c���������C���s���d�d��l��}�|�j�|�|����S(���Ni����(���t���ret���match(���R[���t���_vb_patternR����(����(����s���/usr/lib64/python2.7/cgi.pyRC���:��s����t���__main__(3���Rl���t���__version__t���operatorR����R/���R����t���UserDictR6���t���warningsR���R���R���t���py3kwarningt���DeprecationWarningRD���R����t ���cStringIOR���t���ImportErrort���__all__R���R.���R���R"���R ���R���R���R2���R8���R���R ���R���R���R^���R���R���R���R���R ���R ���R���R����R���R���R���R���R���R���R���RC���Rj���(����(����(����s���/usr/lib64/python2.7/cgi.pyt���<module>���sr��� # : a ���"' /