shell bypass 403
o
`b�* � @ s d Z ddlZddlZddlZG dd� d�Zdd� Zdd� Zd d
� Zdd� Zej d
d� �Z
dd� Zdd� Zdd� Z
dd� Zdd� Zdd� Zdd� Zdd� Zdd � Zd!d"� Zd#d$� Zd%d&� Zd'd(� Zd)d*� Zd+d,� Zd-d.� Zed/kr�dd0lmZ e� ejd1 Ze � e � dS dS )2z�This script contains the actual auditing tests.
It should not be imported directly, but should be run by the test_audit
module with arguments identifying each test.
� Nc @ sJ e Zd ZdZdefdd�Zdd� Zdd� Zd d
� Ze dd� �Z
d
d� ZdS )�TestHookz�Used in standard hook tests to collect any logged events.
Should be used in a with block to ensure that it has no impact
after the test completes.
Nc C s |pd| _ || _g | _d| _d S )N� F)�raise_on_events�exc_type�seen�closed)�selfr r r r �9/usr/local/python-3.10/lib/python3.10/test/audit-tests.py�__init__ s
zTestHook.__init__c G s t �| � | S �N)�sys�addaudithook�r �ar r r � __enter__ s
zTestHook.__enter__c G s | � � d S r )�closer r r r �__exit__ s zTestHook.__exit__c C s
d| _ d S )NT)r �r r r r r ! s
zTestHook.closec C s dd� | j D �S )Nc S s g | ]}|d �qS )r r ��.0�ir r r �
<listcomp>&