0x1949 Team - FAZEMRX - MANAGER
Edit File: expect.cpython-310.pyc
o ��!^6 � @ sL d dl Z ddlmZmZ G dd� de�ZG dd� de�ZG dd � d e�ZdS ) � N� )�EOF�TIMEOUTc @ sT e Zd Zddd�Zdd� Zdd� Zdd � Zddd�Zdd d�Zdd� Z ddd�Z d S )�Expecter���c C s@ || _ || _|dkr |j}|| _d | _t|d�r|j| _d S d S )Nr �longest_string)�spawn�searcher�searchwindowsize�lookback�hasattrr )�selfr r r � r �0/usr/lib/python3/dist-packages/pexpect/expect.py�__init__ s �zExpecter.__init__c C s | j }| j}|t|�krt|�}|�||| j�}|dkr^|�� |_|j�||jd � � |j � � dt|�|j � |_|�� |_ |j �||jd � � ||j|j� |_ |j|_||_|S | jsd| jr�| jpi| j}|j�� |kr�|�� |_|j�|| d � � d S d S d S �Nr )r r �len�searchr �buffer_type�_buffer�write�end�_before�getvalue�start�before�after�match�match_indexr �tell)r �window�freshlenr r �index�maintainr r r � do_search s0 � �zExpecter.do_searchc C s� | j }|j�� }|j�� }|}||kr[| js'|�� |_|j�� }|j�|� nN|| jk rI|�� |_|j�t d|| j �� |j� � }|j�|� n,|j�t d|| j �� |j� � }n| jrp|j�t d|| j �� |j� � }n|j�� }| �||�S r )r r r r r r r r �seek�max�readr$ )r r � before_len�buf_lenr! r r r r � existing_data* s. � zExpecter.existing_datac C s | j }t|�}|j�|� | js:| jr0|j�� }|j�|� |j�t d|| j �� |j� � }nL|j�|� |j}nBt|�| jksF|j�� s`|| j d � }|�� |_|j�|| j d � � n|j�|� |j�� }|j�t d|| j �� |j� � }| � ||�S r )r r r r r r r r r% r&