shell bypass 403
o
`b� � @ s� d dl Z d dlZd dlZd dlZd dlZd dlZd dlZd dlm Z dd� Z
dd� ZG dd� d�ZG d d
� d
e�Z
G dd� de�ZG d
d� d�ZG dd� deej�ZG dd� deej�ZG dd� deej�ZG dd� deej�Zedkrye� dS dS )� N)�findfilec C s t j�t| dd��S )NZ
dtracedata)Zsubdir)�os�path�abspathr )�filename� r �9/usr/local/python-3.10/lib/python3.10/test/test_dtrace.pyr s r c C sl t �dd| �} zdd� | �� D �}|jdd� d� dd� |D �}d �|�W S ttfy5 td
�| ���w )aM Normalize DTrace output for comparison.
DTrace keeps a per-CPU buffer, and when showing the fired probes, buffers
are concatenated. So if the operating system moves our thread around, the
straight result can be "non-causal". So we add timestamps to the probe
firing, sort by that field, then strip it from the outputz\[[0-9]+ refs\]� c S s$ g | ]}|r|� d �s|�d��qS )�#� )�
startswith�split��.0�rowr r r �
<listcomp> s ���z*normalize_trace_output.<locals>.<listcomp>c S s t | d �S )Nr )�int)r r r r �<lambda> s z(normalize_trace_output.<locals>.<lambda>)�keyc S s g | ]}|d �qS )� r r r r r r ! s �
z%tracer produced unparsable output:
{}) �re�sub�
splitlines�sort�join�
IndexError�
ValueError�AssertionError�format)�output�resultr r r �normalize_trace_output s ���r"