0x1949 Team - FAZEMRX - MANAGER
Edit File: utils.cpython-310.pyc
o ��!^� � @ s� d dl Z d dlZd dlZd dlZd dlZd dlZze W n ey( ejZY nw ej d dkr4e fZnee fZdd� Z d dd�Zdd� Zd d d �Zd dd�ZdS )� N� c C sh t j�| �}t j�|�sdS t �|�j}tj�d�r-t � � dkr-t |tjtjB tj B @ �S t �|t j�S )z�Checks that path is an executable regular file, or a symlink towards one. This is roughly ``os.path isfile(path) and os.access(path, os.X_OK)``. F�sunosr )�os�path�realpath�isfile�stat�st_mode�sys�platform� startswith�getuid�bool�S_IXUSR�S_IXGRP�S_IXOTH�access�X_OK)r �fpath�mode� r �//usr/lib/python3/dist-packages/pexpect/utils.py�is_executable_file s ��r c C sv t j�| �dkrt| �r| S |du rt j}|�d�}|st j}|�t j�}|D ]}t j� || �}t|�r8| S q'dS )z�This takes a given filename; tries to find it in the environment path; then checks if it is executable. This returns the full path to the filename if found and executable. Otherwise this returns None.� N�PATH) r r �dirnamer �environ�get�defpath�split�pathsep�join)�filename�env�p�pathlistr �ffr r r �which0 s �r'