Hacked By AnonymousFox
�
�Q�f�0 � �
� d Z ddlZddlZddlZddlZddlZddlZddlZddlZddl Z ddl
Z
ddlZddlm
Z ej ed�� d� Zg Zd� Zd� Zd � Zd
� Zd� Zdd�Zdd
�Z G d� d� Z e� j4 Zdd�Zy)a� More comprehensive traceback formatting for Python scripts.
To enable this module, do:
import cgitb; cgitb.enable()
at the top of your script. The optional arguments to enable() are:
display - if true, tracebacks are displayed in the web browser
logdir - if set, tracebacks are written to files in this directory
context - number of lines of source code to show for each stack frame
format - 'text' or 'html' controls the output format
By default, tracebacks are displayed but not saved, the context is 5 lines
and the output format is 'html' (for backwards compatibility with the
original use of this module)
Alternatively, if you have caught an exception and want cgitb to display it
for you, call cgitb.handler(). The optional argument to handler() is a
3-item tuple (etype, evalue, etb) just like the value of sys.exc_info().
The default handler displays output as HTML.
� N)�escape)� �
)�removec � � y)zAReturn a string that resets the CGI and browser to a known state.a' <!--: spam
Content-Type: text/html
<body bgcolor="#f0f0f8"><font color="#f0f0f8" size="-5"> -->
<body bgcolor="#f0f0f8"><font color="#f0f0f8" size="-5"> --> -->
</font> </font> </font> </script> </object> </blockquote> </pre>
</table> </table> </table> </table> </table> </font> </font> </font>� r � �,/opt/alt/python312/lib64/python3.12/cgitb.py�resetr ( s � �Hr c � � | rd| z dz S y)Nz<small>z</small>� r ��texts r
�smallr 3 s � ���4��*�,�,�r c � � | rd| z dz S y)Nz<strong>z </strong>r
r r s r
�strongr 9 s � ���D� �;�.�.�r c � � | rd| z dz S y)Nz<font color="#909090">z</font>r
r r s r
�greyr ? s � ��'�$�.��:�:�r c � � | |v rd|| fS | |j v rd|j | fS d|j v rL|j d }t |t � r| |v rd|| fS dt
fS t || � rdt || � fS dt
fS )z9Find the value for a given name in the given environment.�local�global�__builtins__�builtinN)� f_globals�
isinstance�dict�hasattr�getattr� __UNDEF__)�name�frame�locals�builtinss r
�lookupr$ E s� � ��v�~���t��$�$��u���������.�.�.�����(��?�?�>�2���h��%��x�� �(�4�.�0�0� ��?�� �x��&� �'�(�D�"9�9�9���?�r c �� � g dddt f\ }}}}}t j | � D ]� \ }} }
}}|t j k( r |S |t j k( rm| t
j vr[|dk( r1|t urct || t � }|j || z ||f� n:t | ||� \ }
}|j | |
|f� n| dk( r||dz z
}|}nd\ }}| }�� |S )zEScan one logical line of Python and look up values of variables used.Nr
�.)Nr
)
r �tokenize�generate_tokens�NEWLINE�NAME�keyword�kwlistr �appendr$ )�readerr! r"