Hacked By AnonymousFox
a
R�f@/ � @ s� d Z ddlZddlZddlZddlZddlZddlZddlZddlZddl Z ddl
Z
dd� Zg Zdd� Z
dd� Zd d
� Zdd� Zd
d� Zddd�Zddd�ZG dd� d�Ze� jZddd�ZdS )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.
� Nc C s dS )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 r r �*/opt/alt/python39/lib64/python3.9/cgitb.py�reset# s r c C s | rd| d S dS d S )Nz<small>z</small>� r ��textr r r �small. s r c C s | rd| d S dS d S )Nz<strong>z </strong>r r r r r r �strong4 s r c C s | rd| d S dS d S )Nz<font color="#909090">z</font>r r r r r r �grey: s r
c C s� | |v rd|| fS | |j v r,d|j | fS d|j v r~|j d }t|�ti �u rf| |v r~d|| fS nt|| �r~dt|| �fS dtfS )z9Find the value for a given name in the given environment.�local�global�__builtins__�builtinN)� f_globals�type�hasattr�getattr� __UNDEF__)�name�frame�locals�builtinsr r r �lookup@ s
r c C s� g dddt f\}}}}}t�| �D ]�\}} }
}}|tjkr> q�|tjkr�| tjvr�|dkr�|t ur�t|| t �}|�|| ||f� q�t | ||�\}
}|�| |
|f� n"| dkr�||d 7 }|}nd\}}| }q"|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 �varsZ lasttoken�parent�prefix�valueZttype�token�start�end�line�wherer r r �scanvarsP s r+ � c "