403Webshell
Server IP : 74.208.236.52  /  Your IP : 216.73.217.98
Web Server : Apache
System : Linux infong527 4.4.400-icpu-115 #2 SMP Mon Jul 6 08:15:05 UTC 2026 x86_64
User : u44043973 ( 5404757)
PHP Version : 8.4.24
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /lib/python3/dist-packages/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib/python3/dist-packages/__pycache__/cgi.cpython-313.pyc
�

���gD����SrSrSSKJrJrJr SSKJr SSKrSSK	r	SSK
rSSKJ
r
 SSKJr SSKrSSKrSSKrSSKr/SQrS	qSqS
rSrSrS
r\qSqS\	R:SSS4SjrS SjrSr Sr!"SS5r""SS5r#\	R:4Sjr$S!Sjr%\	R:4Sjr&Sr'Sr(Sr)Sr*Sr+\,S:Xa\$"5 gg)"a�Support module for CGI (Common Gateway Interface) scripts.

This module defines a number of utilities for use by CGI scripts
written in Python.

The global variable maxlen can be set to an integer indicating the maximum size
of a POST request. POST requests larger than this size will result in a
ValueError being raised during parsing. The default value of this variable is 0,
meaning the request size is unlimited.
z2.6�)�StringIO�BytesIO�
TextIOWrapper)�MappingN)�
FeedParser)�Message)�MiniFieldStorage�FieldStorage�parse�parse_multipart�parse_header�test�print_exception�
print_environ�
print_form�print_directory�print_arguments�print_environ_usage�c���[R"S[SS9 [(a[(d[[SSS9q[(d[qO[q[U6 g![a N-f=f)aDWrite 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).

z7cgi.log() is deprecated as of 3.10. Use logging instead�)�
stacklevel�a�locale)�encodingN)
�warnings�warn�DeprecationWarning�logfile�logfp�open�OSError�nolog�log�dolog��allargss �%/usr/lib/python3/dist-packages/cgi.py�initlogr)>s`��0
�M�M�K�$��4��w�u�u�	���#��9�E��5�������M��
�	��	�s�A"�"
A/�.A/c�8�[RX-S-5 g)z=Write a log message to the log file.  See initlog() for docs.�
N)r �write)�fmt�argss  r(r%r%cs��	�K�K���4�� �c��g)z9Dummy function, assigned to log when logging is disabled.N�r&s r(r#r#gs��r/c�V�Sq[(a[R5 Sq[qg)zClose the log file.rN)rr �closer)r$r1r/r(�closelogr4ks!���G��u�
���
���
�Cr/�&c�,�Uc[Rn[US5(a
URnOSn[	U[
5(aURnSU;aSUS'USS:Xa�[US5upgUS:Xa
[XUS	9$US
:XaO[US5n[(aU[:�a[S5eURU5RU5n	OS
n	SU;aU	(aU	S-n	X�S-n	O:[RSS(a"U	(aU	S-n	U	[RS-n	X�S'O>SU;aUSn	O2[RSS(a[RSn	OS
n	X�S'[R R#X�UXTS9$)aParse a query in the environment or from a file (default stdin)

Arguments, all optional:

fp              : file pointer; default: sys.stdin.buffer

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.
    Defaults to &.
Nrzlatin-1�REQUEST_METHOD�GET�POST�CONTENT_TYPEzmultipart/form-data)�	separator�!application/x-www-form-urlencoded�CONTENT_LENGTH�Maximum content length exceededr�QUERY_STRINGr5�)rr;)�sys�stdin�hasattrr�
isinstancer�bufferr
r�int�maxlen�
ValueError�read�decode�argv�urllibr�parse_qs)
�fp�environ�keep_blank_values�strict_parsingr;r�ctype�pdict�clength�qss
          r(rr~s���0
�z�
�Y�Y���r�*����;�;�����"�m�$�$�
�Y�Y���w�&�$)�� �!��� �F�*�#�G�N�$;�<����)�)�"�2�	�B�B�
�9�
9��'�"2�3�4�G��v�'�F�*� �!B�C�C�����!�(�(��2�B��B��W�$���S��2��n�-�-�B�
�X�X�a�b�\���S��2��c�h�h�q�k�!�B�"$���	�7�	"�
�^�
$���8�8�A�B�<����!��B��B�"$����<�<� � ���*2�!�I�Ir/c	��USRS5nSRU5n[5nURU5 USUS'[XX#SS0US9nUV	s0sHo�UR
U	5_M sn	$![a N<f=fs sn	f)	auParse multipart input.

Arguments:
fp   : input file
pdict: dictionary containing other parameters of content-type header
encoding, errors: request encoding and error handler, passed to
    FieldStorage

Returns a dictionary just like parse_qs(): keys are the field names, each
value is a list of values for that field. For non-file fields, the value
is a list of strings.
�boundary�asciiz multipart/form-data; boundary={}zCONTENT-LENGTHzContent-Lengthr7r9)�headersr�errorsrOr;)rJ�formatr�set_type�KeyErrorr
�getlist)
rNrSrrZr;rWrRrY�fs�ks
          r(rr�s����Z� �'�'��0�H�.�5�5�h�?�E��i�G����U��
�$)�*:�$;�� �!�
�b�H�!�6�*�i�
A�B�&(�)�b��r�z�z�!�}��b�)�)��	�
��
��*s�A:�B
�:
B�Bc#�# �USSS:Xa�USSnURS5nUS:�a{URSSU5URSSU5-
S-(aLURSUS-5nUS:�a1URSSU5URSSU5-
S-(aMLUS:a[U5nUSUnUR5v� XSnUSSS:XaM�gg7f)Nr@�;r�"�\"r)�find�count�len�strip)�s�end�fs   r(�_parseparamrl�s����
�B�Q�%�3�,�
�a�b�E���f�f�S�k���A�g�1�7�7�3��3�/�!�'�'�%��C�2H�H�A�M��&�&��c�A�g�&�C��A�g�1�7�7�3��3�/�!�'�'�%��C�2H�H�A�M�M���7��a�&�C�
�d�s�G���g�g�i��
�d�G���B�Q�%�3�,�s�BC�#5C�Cc��[SU-5nUR5n0nUH�nURS5nUS:�dMUSUR5R	5nXES-SR5n[U5S:�a=USUSs=:XaS:Xa*O O'USSnUR
S	S
5R
SS5nXsU'M� X#4$)z^Parse a Content-type like header.

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

rb�=rNr@r���rcz\\�\rd)rl�__next__rerh�lowerrg�replace)�line�parts�keyrS�p�i�name�values        r(r
r
�s���
��d�
�#�E�
�.�.�
�C��E�
��
�F�F�3�K����6��R�a�5�;�;�=�&�&�(�D���c�d�G�M�M�O�E��5�z�Q��5��8�u�R�y�#?�C�#?��a�����
�
�f�d�3�;�;�E�3�G���$�K���:�r/c�D�\rSrSrSrSrSrSrSr0r	Sr
0r0rSr
SrSrg)r	iz=Like FieldStorage, for use when no file uploads are possible.Nc��XlX lg)z&Constructor from field name and value.N�ryrz��selfryrzs   r(�__init__�MiniFieldStorage.__init__s���	��
r/c�@�SUR<SUR<S3$)z Return printable representation.zMiniFieldStorage(�, �)r}�rs r(�__repr__�MiniFieldStorage.__repr__s��-1�Y�Y��
�
�C�Cr/r})�__name__�
__module__�__qualname__�__firstlineno__�__doc__�filename�list�type�file�type_options�disposition�disposition_optionsrYr�r��__static_attributes__r1r/r(r	r	s;��G��H��D��D��D��L��K����G��Dr/r	c���\rSrSrSrSSS\RSSSSSSS4S	jrS
rSr	Sr
S
rSrSr
SrS$SjrS$SjrSrSrSrSrSrSrSrSrSrSrSrSrSrSrS rS!r S"r!S#r"g)%r
iaYStore 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
    and returns *bytes*

file: the file(-like) object from which you can read the data *as
    bytes* ; 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 email.message.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.

Nr/r�utf-8rsr5c��SnXPlX`lX�lX�lSU;aUSR	5nSUlUS:XdUS:XaqSU;aUSn
O.[RSS(a[RSn
OSn
U
R[R"5S5n
[U
5nUcS	S
0nUc:0nUS:XaS
US	'SU;aUSUS	'SU;a
USUlS
U;aUS
US'O&[U[[45(d[S5eX lUc [R"R$UlOZ[U[(5(aUR$UlO3[+US5(a[+US5(d[S5eXlX�lX�l[U[05(d![S[3U5R4-5eX0lSUlXplS0p�SUR ;a[=UR S5up�X�lX�l SUl!SU;a
USUl!SUl"SU;a
USUl"URDSLUl#S	UR ;a[=UR S	5unnO UR6(dUS:waS0nnOS
0nnUUlX�l$SU;a/USRUR,UR.5Ul%OSUl%SnSUR ;a9[MUR S5n[P(aU[P:�a[OS5eUUl)UR:c
US:�aUUlS=Ul*Ul+SUl,US
:XaUR[5 gUSSS:XaUR]XEU5 gUR_5 g![Na N�f=f)a,Constructor.  Read multipart/* until last part.

Arguments, all optional:

fp              : file pointer; default: sys.stdin.buffer
    (not used when the request method is GET)
    Can be :
    1. a TextIOWrapper object
    2. an object whose read() and readline() methods return bytes

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.

limit : used internally to read parts of multipart/form-data forms,
    to exit from the reading loop when reached. It is the difference
    between the form content-length and the number of bytes already
    read

encoding, errors : the encoding and error handler used to decode the
    binary stream to strings. Must be the same as the charset defined
    for the page sending the form (content-type : meta http-equiv or
    header)

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

r8r7N�HEADr?r@r�surrogateescapezcontent-typer<r9r:r=�content-lengthz?headers must be mapping or an instance of email.message.MessagerI�readlinezfp must be file pointerz#outerboundary must be bytes, not %srzcontent-dispositionryr�z
text/plainrWr/ror>�
z
multipart/)0rPrQ�max_num_fieldsr;�upper�
qs_on_postrArK�encoder�getpreferredencodingrrDrr�	TypeErrorrYrBrErNrrCrrZ�bytesr�r��
outerboundary�
bytes_read�limitr
r�r�ryr��_binary_filer��
innerboundaryrFrHrG�lengthr�r��done�read_urlencoded�
read_multi�read_single)rrNrYr�rOrPrQr�rrZr�r;�methodrU�cdisprSrR�clens                  r(r��FieldStorage.__init__Gs���^��!2��,��,��"���w�&��-�.�4�4�6�F�����U�?�f��.���(��^�,�����!�"���X�X�a�[�������6�6�6�8�:K�L�B����B���)�>�@���?��G����*M���'���(�*1�.�*A���'���(�")�.�"9����7�*�,3�4D�,E��(�)���w��'�(:�;�;��!8�9�9���
�:��i�i�&�&�D�G�
��M�
*�
*��i�i�D�G��B��'�'�G�B�
�,C�,C�� 9�:�:��G� �
����-��/�/��A�"�=�1�:�:�;�<�
<�*������
��2�u� �D�L�L�0�'����5J�(K�L�L�E� ��#(� ���	��U�?��f�
�D�I���
����!�*�-�D�M� �M�M��5����T�\�\�)�'����^�(D�E�L�E�5�
�
�
�6�V�#3�'��5�E�5�>��5�E���	�!�����!&�z�!2�!9�!9�$�-�-�:>�+�+�"G�D��"%�D�����t�|�|�+�
��4�<�<�(8�9�:���v�$��-� �!B�C�C�����:�:��$�!�)��D�J� $�$��	�D�I���	��7�7�� � �"�
�3�B�Z�<�
'��O�O�G��G�������
��
�s�O�
O�Oc�Z�URR5 g![a gf=f�N)r�r3�AttributeErrorr�s r(�__del__�FieldStorage.__del__�s'��	��I�I�O�O����	��	�s��
*�*c��U$r�r1r�s r(�	__enter__�FieldStorage.__enter__�s���r/c�8�URR5 gr�)r�r3)rr.s  r(�__exit__�FieldStorage.__exit__�s���	�	���r/c�\�SUR<SUR<SUR<S3$)z"Return a printable representation.z
FieldStorage(r�r�)ryr�rzr�s r(r��FieldStorage.__repr__�s!���	�	�4�=�=�$�*�*�6�	6r/c�4�[UR55$r�)�iter�keysr�s r(�__iter__�FieldStorage.__iter__�s���D�I�I�K� � r/c�(�US:wa[U5eUR(aRURRS5 URR5nURRS5 U$URbURnU$SnU$)Nrzr)r�r��seekrIr�r~s   r(�__getattr__�FieldStorage.__getattr__sz���7�?� ��&�&��9�9��I�I�N�N�1���I�I�N�N�$�E��I�I�N�N�1��
��	�Y�Y�
"��I�I�E����E��r/c���URc[S5e/nURH&nURU:XdMURU5 M( U(d[	U5e[U5S:XaUS$U$)zDictionary style indexing.�
not indexabler@r)r�r�ry�appendr]rg)rrv�found�items    r(�__getitem__�FieldStorage.__getitem__
sg���9�9���O�,�,����I�I�D��y�y�C�����d�!3����3�-���u�:��?���8�O��Lr/c��X;aAXn[U[5(aUVs/sHoDRPM sn$UR$U$s snf)z8Dictionary style get() method, including 'value' lookup.�rDr�rz)rrv�defaultrz�xs     r(�getvalue�FieldStorage.getvaluesF���;��I�E��%��&�&�).�/��A����/�/��{�{�"��N��	0s�A	c�x�X;a4Xn[U[5(aUSR$UR$U$)z Return the first value received.rr�)rrvr�rzs    r(�getfirst�FieldStorage.getfirst&s8���;��I�E��%��&�&��Q�x�~�~�%��{�{�"��Nr/c��X;aBXn[U[5(aUVs/sHo3RPM sn$UR/$/$s snf)zReturn list of received values.r�)rrvrzr�s    r(r^�FieldStorage.getlist1sH���;��I�E��%��&�&�).�/��A����/�/����}�$��I��	0s�A
c�|�URc[S5e[[SUR555$)zDictionary style keys() method.r�c3�8# �UHoRv� M g7fr��ry)�.0r�s  r(�	<genexpr>�$FieldStorage.keys.<locals>.<genexpr>@s���8�i�d�	�	�i�s�)r�r��setr�s r(r��FieldStorage.keys<s1���9�9���O�,�,��C�8�d�i�i�8�8�9�9r/c�r^�URc[S5e[U4SjUR55$)z%Dictionary style __contains__ method.r�c3�@># �UHoRT:Hv� M g7fr�r�)r�r�rvs  �r(r��,FieldStorage.__contains__.<locals>.<genexpr>Fs����:�	��9�9��#�	�s�)r�r��any)rrvs `r(�__contains__�FieldStorage.__contains__Bs-����9�9���O�,�,��:��	�	�:�:�:r/c�4�[UR55$)z Dictionary style len(x) support.)rgr�r�s r(�__len__�FieldStorage.__len__Hs���4�9�9�;��r/c�\�URc[S5e[UR5$)NzCannot be converted to bool.)r�r��boolr�s r(�__bool__�FieldStorage.__bool__Ls&���9�9���:�;�;��D�I�I��r/c
��URRUR5n[U[5(d/[UR<S[
U5R<35eURURUR5nUR(aUSUR--
n[RRXRUR URURUR"UR$S9nUVVs/sHup4['X45PM snnUlUR+5 gs snnf)z+Internal: read data in query string format.� should return bytes, got r5�rrZr�r;N)rNrIr�rDr�rHr�r�rJrrZr�rLr�	parse_qslrPrQr�r;r	r��
skip_lines)rrU�queryrvrzs     r(r��FieldStorage.read_urlencodedQs���
�W�W�\�\�$�+�+�
&���"�e�$�$�� $����b��):�):�<�=�
=�
�Y�Y�t�}�}�d�k�k�
2���?�?��#����'�'�B����&�&��&�&��(;�(;��]�]�4�;�;��.�.�$�.�.�'�J��EJ�J�E�j�c�%�c�1�E�J��	������Ks�Ec
���URn[U5(d[SU<35e/UlUR(a�[
RRURURURURURURURS9nURRSU55 UR=(d UR nUR"R%5n['U[(5(d/[UR"<S[+U5R,<35eU=R.[1U5-
slUR35SUR-:waiU(abUR"R%5nU=R.[1U5-
slUR35SUR-:wa	U(aMbURnUbU[1UR5-n[55n	Sn
UR"R%5nX�-
n
UR35(dOM6U
(dGOU=R.[1U
5-
slU	R7U
R9URUR55 U	R;5nSU;aUS	UR<cSOUR<UR.-
n
U"UR"X�XX=URURX�R5nUb?US	-nUR(aU[1UR5-nUS
:a[S5eU=R.UR.-
slURR?U5 UR@(d$UR.URBs=:�aS
:�aO OOGM�URE5 g)z/Internal: read a part that is itself multipart.z$Invalid boundary in multipart form: r�c3�<# �UHup[X5v� M g7fr�)r	)r�rvrzs   r(r��*FieldStorage.read_multi.<locals>.<genexpr>ns���R�E�j�c�-�c�9�9�E�s�r��--Nr/r�r@rzMax number of fields exceeded)#r��valid_boundaryrHr�r�rLrr�rPrQrrZr�r;�extend�FieldStorageClass�	__class__rNr�rDr�r�r�r�rgrhr�feedrJr3r�r�r�r�r�)rrOrPrQ�ibr��klass�
first_liner��parser�hdr_text�datarYr��parts               r(r��FieldStorage.read_multics��
�
�
���b�!�!���M�N�N���	��?�?��L�L�*�*�����!7�!7��9L�9L����t�{�{�#�2�2�d�n�n�+�N�E�
�I�I���R�E�R�R��&�&�8�$�.�.���W�W�%�%�'�
��*�e�,�,�� $����j�)9�)B�)B�D�E�
E����3�z�?�*�����!�e�d�.@�.@�&@�A�����)�)�+�J��O�O�s�:��.�O����!�e�d�.@�.@�&@�A��
�
�,�,���%��c�$�)�)�n�,�N���\�F��H���w�w�'�'�)��� ���z�z�|�|��	�
���O�O�s�8�}�,�O��K�K�����
�
�t�{�{�C�D��l�l�n�G� �7�*��,�-� �J�J�.�D��Z�Z�$�/�/�1�
�����'�w�'�������^�^�^�U�D��)��!�#���9�9�"�c�$�)�)�n�4�N�!�A�%�$�%D�E�E��O�O�t���.�O��I�I���T�"��y�y�D�O�O�t�{�{�>�Q�>��G�H	
���r/c��URS:�a!UR5 UR5 OUR5 URRS5 g)zInternal: read an atomic part.rN)r��read_binaryr��
read_linesr�r�r�s r(r��FieldStorage.read_single�s>���;�;�!�������O�O���O�O���	�	���q�r/i c��UR5UlURnUS:�a�US:�a�URR	[XR55n[U[5(d/[UR<S[U5R<35eU=R[U5-
slU(dSUlgURRU5 U[U5-
nUS:�aM�ggg)zInternal: read binary data.rr�roN)�	make_filer�r�rNrI�min�bufsizerDr�rHr�r�r�rgr�r,)r�todors   r(r�FieldStorage.read_binary�s����N�N�$��	��{�{���1�9���(��w�w�|�|�C��l�l�$;�<��!�$��.�.�$�(,����d��1D�1D�&F�G�G����3�t�9�,��� "�D�I���	�	����%��c�$�i�'����(�r/c���UR(a[5=UlUlO[	5=UlUlUR
(aUR
5 gUR5 g)z0Internal: read lines until EOF or outerboundary.N)r�rr��_FieldStorage__filerr��read_lines_to_outerboundary�read_lines_to_eofr�s r(r	�FieldStorage.read_lines�sL�����&-�i�/�D�I���&.�j�0�D�I�������,�,�.��"�"�$r/c���URb{URR5[U5-S:�aQUR5UlURR5nURR
U5 SUlUR(aURR
U5 gURR
URURUR55 g)z line is always bytes, not stringNi�)r�tellrgrr�r�r,r�rJrrZ)rrtrs   r(�__write�FieldStorage.__write�s����;�;�"��{�{���!�C��I�-��4� �N�N�,��	��{�{�+�+�-���	�	����%�"�������I�I�O�O�D�!�
�I�I�O�O�D�K�K��
�
�t�{�{�C�Dr/c��URRS5nU=R[U5-
slU(dSUlgURU5 M[)zInternal: read lines until EOF.�roN)rNr�r�rgr��_FieldStorage__write)rrts  r(r�FieldStorage.read_lines_to_eof�sI����7�7�#�#�E�*�D��O�O�s�4�y�(�O����	���L�L���
r/c���SUR-nUS-nSnSnSnURbSURs=::aU::ag URRS5nU=R[U5-
slU[U5-
nU(dSUlgUS	:XaX6-nSnURS5(a*U(a#UR5nXq:XagXr:XaSUlgUnURS
5(a
S
nUSSnSnODURS5(a
SnUSSnSnO$URS	5(a
S	nUSSnS
nOSnS
nURX�-5 GME)z�Internal: read lines until outerboundary.
Data is read as bytes: boundaries and line ends must be converted
to bytes for comparisons.
r�r/Trr@Nrro�
s
����
F)r�r�rNr�r�rgr��
startswith�rstrip�endswithr)	r�
next_boundary�
last_boundary�delim�last_line_lfend�_readrt�strippedline�odelims	         r(r�(FieldStorage.read_lines_to_outerboundary�sm��
�� 2� 2�2�
�%��-�
���������z�z�%�!�t�z�z�*B�U�*B��+C��7�7�#�#�E�*�D��O�O�s�4�y�(�O��S��Y��E����	����~��|�������u�%�%�/�#�{�{�}���0���0� !�D�I���F��}�}�W�%�%����C�R�y��"&�����u�%�%����C�R�y��"&�����u�%�%����C�R�y��"'����"'���L�L���'�Mr/c��UR(aUR(agSUR-nUS-nSnURRS5nU=R[U5-
slU(dSUlgUR
S5(a*U(a#UR5nXQ:XagXR:XaSUlgUR
S5nM�)z5Internal: skip lines until outer boundary if defined.Nr�Trror@r!)r�r�rNr�r�rgr$rh)rr%r&r(rtr*s      r(r��FieldStorage.skip_liness����!�!�T�Y�Y���� 2� 2�2�
�%��-�
�����7�7�#�#�E�*�D��O�O�s�4�y�(�O����	���}�}�U�#�#��#�z�z�|���0���0� !�D�I��"�m�m�E�2�O�r/c��UR(a[R"S5$[R"SURSS9$)a'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 file is opened in binary mode for files, in text mode
for other fields

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.

zwb+zw+r+)r�newline)r��tempfile�
TemporaryFilerr�s r(r�FieldStorage.make_file0s<��0����)�)�%�0�0��)�)�$����$�8�
8r/)�__filer�r�r�r�r�rrZr�r�rNrYr�rPr�r�r�r�ryr�r�r;rQr�r�r�)#r�r�r�r�r��osrOr�r�r�r�r�r�r�r�r�r�r^r�r�r�r�r�r�r�r�rrr	rrrr�rr�r1r/r(r
r
s���(�R��C����q���g�i� $��c�J���6�
!���	�	�	�:�;� ��
� ��C�J��G�(�"	%�
E��0(�d3�,8r/r
c���[S5 [5 [R[l[	5n[5 [
5 [U5 [U5 [5 SnU4Sjn[S5 U"5 [S5 Sq[	5n[5 [
5 [U5 [U5 g! [5 NQ=f! [5 g=f)z�Robust test CGI script, usable as main program.

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

zContent-type: text/htmlc��[S5 g)Nz,testing print_exception() -- <I>italics?</I>)�execr1r/r(rk�test.<locals>.fcs���?�@r/c��U"5 gr�r1)rks r(�g�test.<locals>.ges��
�Cr/z9<H3>What follows is a test, not an actual exception:</H3>z*<H1>Second try with a small maxlen...</H1>�2N)�printrA�stdout�stderrr
rrrrrrrG)rO�formrkr;s    r(rrRs���
�
#�$�	�G����C�J���~�������4���g����	A��	�
�I�J�	��
�
6�7��F���~�������4���g����������s�AC�4C�C�C+c
�V�Uc[R"5upnSSKn[5 [S5 UR	X#5URX5-n[S[R"SRUSS55<S[R"US5<S35 Ag)Nrz+<H3>Traceback (most recent call last):</H3>z<PRE>rroz<B>z
</B></PRE>)	rA�exc_info�	tracebackr>�	format_tb�format_exception_only�html�escape�join)r�rz�tbr�rDr�s      r(rrys����|��,�,�.���R��	�G�	�
7�8����r�)��*�*�4�7�8�D�	����B�G�G�D��"�I�&�'����D��H��
��	r/c
�"�[UR55n[5 [S5 [S5 UH;n[S[R"U5S[R"X55 M= [S5 [5 g)z#Dump the shell environment as HTML.z<H3>Shell Environment:</H3>�<DL>�<DT>�<DD>�</DL>N)�sortedr�r>rGrH)rOr�rvs   r(rr�s_���'�,�,�.�!�D�	�G�	�
'�(�	�&�M���
�f�d�k�k�#�&�����G�L�0I�J��	�'�N�	�Gr/c���[UR55n[5 [S5 U(d[S5 [S5 UH�n[S[R"U5-S-SS9 Xn[S[R"[[
U555-S	-5 [S
[R"[U55-5 M� [S5 [5 g)
z$Dump the contents of a form as HTML.z<H3>Form Contents:</H3>z<P>No form fields.rLrM�:� )rjz<i>z</i>rNrON)rPr�r>rGrH�reprr�)rAr�rvrzs    r(rr�s����$�)�)�+��D�	�G�	�
#�$��
�"�#�	�&�M���
�f�t�{�{�3�'�'�#�-�3�7��	��
�e�d�k�k�$�t�E�{�"3�4�4�v�=�>�
�f�t�{�{�4��;�/�/�0�	�

�'�N�	�Gr/c	�,�[5 [S5 [R"5n[[R"U55 [5 g![
a3n[S[R"[
U555 SnANCSnAff=f)z#Dump the current directory as HTML.z#<H3>Current Working Directory:</H3>zOSError:N)r>r5�getcwdrGrHr"�str)�pwd�msgs  r(rr�sd��	�G�	�
/�0� ��i�i�k��	�d�k�k�#���	�G��	�1�
�j�$�+�+�c�#�h�/�0�0��1�s�A�
B� )B�Bc��[5 [S5 [5 [[R5 [5 g)Nz <H3>Command Line Arguments:</H3>)r>rArKr1r/r(rr�s%��	�G�	�
,�-�	�G�	�#�(�(�O�	�Gr/c��[S5 g)z9Dump a list of environment variables used by CGI as HTML.a�
<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)r>r1r/r(rr�s��	�'�'r/c�`�SSKn[U[5(aSnOSnURX 5$)Nrs^[ -~]{0,200}[!-~]$z^[ -~]{0,200}[!-~]$)�rerDr��match)rir]�_vb_patterns   r(r�r��s+��
��!�U���,��+��
�8�8�K�#�#r/�__main__)r�rsr5)NNNN)-r��__version__�iorrr�collections.abcrrAr5�urllib.parserL�email.parserr�
email.messagerrGrr1r�__all__rr r)r%r#r4r$rGrOrrrlr
r	r
rrrrrrrr�r�r1r/r(�<module>rhs���	�*��0�/�#�
�	��#�!��
���"��
����#�J!�	����
��
�2�:�:���c�CI�L*�6
��0D�D�2p8�p8�l���%�N��*�*�	�� 
��)�^$��z���F�r/

Youez - 2016 - github.com/yon3zu
LinuXploit