403Webshell
Server IP : 121.121.20.254  /  Your IP : 216.73.217.51
Web Server : Microsoft-IIS/10.0
System : Windows NT WEB-SERVER 10.0 build 20348 (Windows Server 2022) AMD64
User : IUSR ( 0)
PHP Version : 8.3.28
Disable Function : NONE
MySQL : ON  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  C:/Python313/Lib/test/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : C:/Python313/Lib/test/__pycache__/test_pty.cpython-313.pyc
�

��ixB����SSKrSSKJrJrJrJrJrJr SSKJ	r	 \	"S5 \(d\(d\(d\(a\R"S5eSSKrSSKrSSK
r
SSKrSSKrSSKrSSKrSSKrSSKrSSKrSrSr\"\S5=(a	 \"\S	5r\(aS
rOSrSrS
rSrSr"SS\R<5r"SS\R<5r Sr!\"S:Xa\RF"5 gg)�N)�
is_android�is_apple_mobile�
is_emscripten�is_wasi�
reap_children�verbose)�
import_module�termiosz%pty is not available on this platform�I wish to buy a fish license.
�For my pet fish, Eric.
�
TIOCGWINSZ�
TIOCSWINSZc��[U5 g�N)�print��msgs �"C:\Python313\\Lib\test\test_pty.py�debugrs	��
�c�
�c��gr�rs rrr!s��rc��URS5(aURSS5$URS5(aURSS5$U$)Ns

�
�
)�endswith�replace)�datas r�normalize_outputr/sI���}�}�Y����|�|�I�u�-�-��}�}�W����|�|�G�U�+�+��Krc�N�[R"USSS9nUR5$)z8Read one line.  May block forever if no newline is read.�rbF)�mode�closefd)�io�FileIO�readline)�fd�readers  r�	_readliner)Cs!��
�Y�Y�r��e�
4�F��?�?��rc��[R"[R5 [R
"U5$![Ra U$f=fr)�tty�	tcgetattr�pty�STDIN_FILENO�unittest�expectedFailure�error)�funs r�expectedFailureIfStdinIsTTYr3HsE��
��
�
�c�&�&�'��'�'��,�,���9�9�
���J�
�s�9<�A�Ac	��[R"X5nU[U5:wa[SUS[U5SUS35eg)Nzshort write: os.write(z, z bytes) wrote z bytes)�os�write�len�	Exception)r'r�writtens   r�	write_allr:RsQ���h�h�r� �G��#�d�)���0���B�s�4�y�k�B!�!(�	��1�2�	2�rc�L�\rSrSrSr\S5r\S5rSr	Sr
SrSrg	)
�PtyTest�\c���[R"[RUR5nUR[R[RU5 SUl[
(ad[R"[R5UlUR[R[RUR5 gg![Ra gf=fr)�signal�SIGHUP�
handle_sighup�
addCleanup�	stdin_dim�_HAVE_WINSZr+�tcgetwinsizer-r.�tcsetwinsizer1)�self�
old_sighups  r�setUp�
PtyTest.setUp]s����]�]�6�=�=�$�2D�2D�E�
�����
�
�v�}�}�j�A�����;�
�!$�!1�!1�#�2B�2B�!C������� 0� 0�#�2B�2B� $���0���
�9�9�
��
�s�2A"C�C-�,C-c��grr)�signum�frames  rrA�PtyTest.handle_sighupks��rc���[R"[R5nSnUR(a�[S5 [SUR35 URSS-URSS-4n[SU35 [R"[RU5 [R"[R5nURX#S5 [S
5 [R"XS5upVn[SU<S
U<SU<35 UR'[(R*U5 UR'[(R*U5 UR-[(R."U5S5 U(a'UR[R"U5US5 U(a'UR[R"U5US5 [(R0"U5n[(R2"US5 [(R4"US5n	URSU	5 [(R2"XX5 [S5 [;U[<5 [?U5n	URS[AU	55 [S5 [;U[BSS5 [;U[BSS5 [?U5n
URS[AU
55 g![Ra [S5 SnGN�f=f![a2n[R[5RSUS	9 SnAGNfSnAff=f![ a [R"5upVSnGNmf=f![a ["R$"S5ef=f![a*nUR6[6R8:waeSnAGN�SnAff=f![(R2"XX5 f=f)Nz&tty.tcgetattr(pty.STDIN_FILENO) failedz%Setting pty.STDIN_FILENO window size.zoriginal size: (row, col) = r�ztarget size: (row, col) = z&pty.STDIN_FILENO window size unchangedz+Failed to set pty.STDIN_FILENO window size.)�exc_info�Calling pty.openpty()TzGot master_fd=z, slave_fd=z
, slave_name=z,Pseudo-terminals (seemingly) not functional.zslave_fd is not a ttyz%openpty() failed to set slave termiosz)openpty() failed to set slave window sizeF�rzWriting to slave_fdrzWriting chunked output�r)"r+r,r-r.r1rrCrFrE�assertEqual�OSError�logging�	getLogger�__name__�warning�openpty�	TypeErrorr/�SkipTestrBr5�close�
assertTrue�isatty�get_blocking�set_blocking�read�errno�EAGAINr:�
TEST_STRING_1r)r�
TEST_STRING_2)rGr"�new_dim�
target_dim�e�	master_fd�slave_fd�
slave_name�blocking�s1�s2s           r�test_openpty�PtyTest.test_openptyosJ��	��=�=��!1�!1�2�D����>�>�
��=�>��4�T�^�^�4D�E�F�"�n�n�Q�/�!�3�T�^�^�A�5F��5J�K�
��2�:�,�?�@�� � ��!1�!1�:�>��*�*�3�+;�+;�<��� � ��!I�K�	T��)�*�
"�25�+�+�d�>B�3D�/�	�Z�

�O���L�x�k��J�=�A�B�	
������)�,�������(�+�����	�	�(�+�-D�E�����S�]�]�8�4�d�D�
F�����S�-�-�h�7��H�
J��?�?�9�-��
	1��O�O�I�u�-�
��W�W�Y��-��� � ��b�)�
�O�O�I�0�
�#�$��(�M�*�
�y�
!�����;�)�"�-�	/�	�&�'��(�M�"�1�-�.��(�M�!�"�-�.�
�y�
!�����4�6F�r�6J�K��a�y�y�	��:�;��D�	��,�
��!�!�(�+�3�3�A�A�4����	
���
"�&)�k�k�m�#�	�!�
�
"���	T��#�#�$R�S�S�	T��4�
��7�7�e�l�l�*��+��
��

�O�O�I�0�s��$K1�B0L�+N�7M�N�O�)N&�1!L�L�
M�#'M�M�#M?�;N�>M?�?N�!N#�&
O�0O�O�O�O�O5c��[S5 [R"5upUR[R
U5 U[R:Xa�[R"S5(d![S5 [R"S5 [S5 [R"5 [S5 [R"S5 [R"S5 g[SU-5 [R"US
5nU(dO9[RR[!UR#SS5SS95 MY[R$"US5up[R&"U5n[SXU4-5 US:XaUR)S5 gUS:XaUR)S5 gUS:XaUR)S5 gUS:waUR)S5 gg![a [S5 GN7[a [S	5 GNN [S
5 [R"S5 GNs=f![a GMf=f)Nzcalling pty.fork()rPzChild's fd 1 is not a tty?!�zIn child, calling os.setsid()zos.setsid() succeeded! (bad!)�zGood: OSError was raised.zNo setsid() available?zAn unexpected error was raised.�z!Waiting for child (%d) to finish.�Prr�ascii)�encodingrz+Child (%d) exited with code %d (status %d).z3Child raised an unexpected exception in os.setsid()z1pty.fork() failed to make child a session leader.z8Child spawned by pty.fork() did not have a tty as stdoutz&pty.fork() failed for unknown reasons.)rr-�forkrBr5r^�CHILDr`�_exit�setsidrV�AttributeErrorrc�sys�stdoutr6�strr�waitpid�waitstatus_to_exitcode�fail)rG�pidrkr�status�ress      r�	test_fork�PtyTest.test_fork�s���
�"�#�������������)�,��#�)�)���9�9�Q�<�<��3�4������
�1�2�
��	�	��"�5�6�������H�H�Q�K��5��;�<����7�7�9�b�1�D����
�
� � ��T�\�\�'�5�%A�.5�"7�8�� �J�J�s�A�.�M�S��+�+�F�3�C��?�3�V�BT�T�U��a�x��	�	�O�P�����	�	�M�N�����	�	�T�U�����	�	�B�C���q�
��1�2��!�
��.�/��
�
�7�8�������(����s*�G4�<I�4I�I�#"I�
I�Ic�|�[S5 [R"5up[SUSUS35 UR[R
U5 [S5 [R
"U5 [S5 [R"US5nURUS5 g![a SnN!f=f)	NrRzGot master_fd 'z
', slave_fd '�'zClosing slave_fdzReading from master_fdrPr)	rr-r[rBr5r^rcrVrU)rGrkrlrs    r�test_master_read�PtyTest.test_master_reads���
�%�&�!�k�k�m��	�
��	�{�-��z��C�D�������)�,�
� �!�
�����
�&�'�	��7�7�9�a�(�D�	
����s�#���	��D�	�s�B,�,B;�:B;c���[R"5upU[R:Xa=[R"[R
SS/5 [R"S5 [5n[R"US5=nS:wa0URU5 [R"US5=nS:waM0[R"US5upURUS5 UR[!U5S5 [R""U5 g![a)nUR[R:waeSnAN�SnAff=f![R""U5 f=f)Nz-czprint("hi there")rrSrs
hi there
)r-rzr{�spawnr�
executabler5r|�	bytearrayrc�extendrVrd�EIOr�rU�bytesr^)rGr�r'�bufrrjr�s       r�test_spawn_doesnt_hang�PtyTest.test_spawn_doesnt_hang*s
���(�(�*����#�)�)���I�I�s�~�~�t�-@�A�B��H�H�Q�K�
	��+�C�
�!�w�w�r�4�0�0�t�S�8��J�J�t�$� "�w�w�r�4�0�0�t�S�8��J�J�s�A�.�M�S����V�Q�'����U�3�Z��9��H�H�R�L���
��7�7�e�i�i�'��(��
��
�H�H�R�L�s8�*
E�5AD�AE�
E�)E
�E�
E�E�E-)rCN)
rY�
__module__�__qualname__�__firstlineno__rI�staticmethodrAr3rqr�r�r��__static_attributes__rrrr<r<\sF����
��
�!�SL�!�SL�jHD�d$�&rr<c�N�\rSrSrSrSrSrSrSrSr	Sr
S	rS
rSr
Srg
)�
SmallPtyTestsiAz)These tests don't spawn children or hang.c���[RUl[RUl[R
Ul[RUl[RUl
[RUl[RUl[RUl[R"Ul[R&Ul/Ul/Ul/Ul/UlSUlgr)r-r.�orig_stdin_fileno�
STDOUT_FILENO�orig_stdout_filenor^�orig_pty_close�_copy�orig_pty__copyrz�
orig_pty_fork�select�orig_pty_select�setraw�orig_pty_setrawr,�orig_pty_tcgetattr�	tcsetattr�orig_pty_tcsetattrr��orig_pty_waitpid�fds�files�select_input�
select_output�tcsetattr_mode_setting)rGs rrI�SmallPtyTests.setUpDs���!$�!1�!1���"%�"3�"3���!�i�i���!�i�i��� �X�X���"�z�z���"�z�z���"%�-�-���"%�-�-��� #����������
�������&*��#rc��UR[lUR[lUR
[lUR[lUR[l
UR[lUR[lUR[lUR"[lUR&[lUR*HnUR
5 M UR.Hn[0R"U5 M g![,a MPf=f![,a M=f=fr)r�r-r.r�r�r�r^r�r�r�rzr�r�r�r�r�r,r�r�r�r�r�rVr�r5)rG�filer's   r�tearDown�SmallPtyTests.tearDownUs����1�1��� �3�3����'�'��	��'�'��	��%�%����)�)��
��)�)��
��/�/��
��/�/��
��+�+����J�J�D�
��
�
���
�(�(�B�
���������
��
��
�
��
�s$�#D"�D3�"
D0�/D0�3
E�Ec�f�[R"5nURRU5 U$r)r5�piper�r�)rG�pipe_fdss  r�_pipe�SmallPtyTests._pipeks"���7�7�9��������!��rc�f�[R"5nURRU5 U$r)�socket�
socketpairr�r�)rGr�s  r�_socketpair�SmallPtyTests._socketpairps(���&�&�(�
��
�
���*�%��rc��URXU4URRS55 URRS5$)Nr)rUr��popr�)rG�rfds�wfds�xfdss    r�_mock_select�SmallPtyTests._mock_selectus?�����$�d�+�T�->�->�-B�-B�1�-E�F��!�!�%�%�a�(�(rc�^�U4SjnU$)Nc�>�TS4$)N�r)r�s�r�	mock_fork�0SmallPtyTests._make_mock_fork.<locals>.mock_fork{s
�����9�rr)rGr�r�s ` r�_make_mock_fork�SmallPtyTests._make_mock_forkzs���	��rc��X0lgr)r�)rG�fileno�optr"s    r�_mock_tcsetattr�SmallPtyTests._mock_tcsetattrs��&*�#rc�:�UR5upU[lUR5up4U[lUR	5nUVs/sHofR5PM nn[
USS5 [
US5 UR[lURRX7S///45 URRX7S///45 URRX7S/X'S//45 URR/X'S//45 URRX7S///45 UR[5 [R"US5 SSS5 [R"XS///S5SnURXS/U5 UR[ R""US5S5 UR[ R""USS5S5 gs snf!,(df   N�=f)z6Test the normal data case on both master_fd and stdin.rPsfrom masters
from stdinrN�)r�r-r�r.r�r�r:r�r�r��appendr��assertRaises�
IndexErrorr�rUr5rc)	rG�read_from_stdout_fd�mock_stdout_fd�
mock_stdin_fd�write_to_stdin_fdr��s�mastersr�s	         r�test__copy_to_each� SmallPtyTests.test__copy_to_each�s���.2�j�j�l�+��*���+/�:�:�<�(�
�(����%�%�'�
�'1�2�z�!�8�8�:�z��2�	�'�!�*�n�-��#�]�3��&�&��
���� � �=�!�*�"=�r�2�!F�G����!�!�M�1�:�#>��B�"G�H���� � �=�!�*�"=��XY�PZ�?[�]_�!`�a����!�!�2���
�'C�R�"H�I���� � �=�!�*�"=�r�2�!F�G�
�
�
�z�
*��I�I�g�a�j�!�+��}�}�1�1�:�>��B��J�1�M�����-�q�z�:�D�A�������!4�b�9�>�J����������R�0�-�@��+3�+�
*�s�H�H�
Hc�^^�URS5[l[5mU4Sj[lS[lS[l[5mU4Sj[lUR[l	S[l
UR[R"/5TS5 URURTS5 g	)
zCTest that spawn resets the tty mode no when _copy returns normally.rPc�>�ST/$rr)�_1�_2�status_sentinels  �r�<lambda>�DSmallPtyTests.test__restore_tty_mode_normal_return.<locals>.<lambda>�s
���d�O�%<rc��grr��_s rr�r��s��drc��grr)r�r��_3s   rr�r��s��trc�>�T$rr)r'�
mode_sentinels �rr�r��s���=rc��grrr�s rr�r��s��trz4pty.waitpid process status not returned by pty.spawnz1pty.tcsetattr not called with original mode valueN)r�r-rz�objectr�r^r�r,r�r�r�rUr�r�)rGr�r�s @@r�$test__restore_tty_mode_normal_return�2SmallPtyTests.test__restore_tty_mode_normal_return�s����
�'�'��*��� �(��<���"��	�+��	���
�0��
��,�,��
�#��
�������2���9o�p�����4�4�m�Ex�yr)r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�N)rYr�r�r��__doc__rIr�r�r�r�r�r�r�r�r�rrrr�r�As4��3�+�"�,�
�
)�
�
+�A�<zrr�c��[5 gr)rrrr�tearDownModuler��s���Or�__main__)$r/�test.supportrrrrrr�test.support.import_helperr	r]rdr5r-r+rr�r?r�r$�warningsrfrg�hasattrrDrrr)r3r:�TestCaser<r�r�rY�mainrrr�<module>r�s������5��i��
��M�W�
�
�
�C�
D�D��	�
�
�
�
�
�
�	��2�
�+�
��c�<�(�G�W�S�,�-G��
��
��(�
�2�c�h���c�Jrz�H�%�%�rz�j��z���M�M�O�r

Youez - 2016 - github.com/yon3zu
LinuXploit