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_ioctl.cpython-313.pyc
�

��i�"��:�SSKrSSKrSSKrSSKrSSKrSSKrSSKJr SSKJ	r	J
r
 SSKJr \"S5r
\"S5r"SS\R5r\R""\"\S	5S
5"SS\R55r\S
:Xa\R*"5 gg)�N)�support)�	os_helper�threading_helper)�
import_module�fcntl�termiosc�f�\rSrSr\S5rSrSrSrSSjr	SSjr
SS	jrS
rSr
SrS
rg)�
IoctlTestsTty�
c	���[R"[S5n[SS5nU [RX![R"SS55nSSS5 [R"SW5SnU[R"5[R"S54;a[
R"S5eg![a [
R"S5ef=f!,(df   N�=f)N�	TIOCGPGRP�/dev/tty�rbzUnable to open /dev/tty�irzBNeither the process group nor the session are attached to /dev/tty)r�
get_attributer�open�OSError�unittest�SkipTestr�ioctl�struct�pack�unpack�os�getpgrp�getsid)�clsr
�tty�r�rpgrps     �$C:\Python313\\Lib\test\test_ioctl.py�
setUpClass�IoctlTestsTty.setUpClasss����)�)�'�;�?�	�	?��z�4�(�C�����C�F�K�K��Q�,?�@�A���
�
�c�1�%�a�(�������r�y�y��|�4�4��#�#�%?�@�
@�5��
�	?��#�#�$=�>�>�	?��
�S�s�B?�,C#�?!C �#
C1c�6�[R"5[R"S54n[SS5nSn[RU[RU5nURU[5 [U5RS5SnURXQ5 Sn[RU[RU5nURU[5 [U5RS5SnURXQ5 [RU[R[U55nURU[5 [U5RS5SnURXQ5 SSS5 g!,(df   g=f)Nrrrz        r�        )
rrrrrrrr
�assertIsInstance�bytes�
memoryview�cast�assertIn��self�idsr�bufrr s      r!�test_ioctl_immutable_buf�&IoctlTestsTty.test_ioctl_immutable_bufs-���z�z�|�R�Y�Y�q�\�*��
�*�d�
#�s��C����C��!2�!2�C�8�A��!�!�!�U�+��q�M�&�&�s�+�A�.�E��M�M�%�%��C����C��!2�!2�C�8�A��!�!�!�U�+��q�M�&�&�s�+�A�.�E��M�M�%�%����C��!2�!2�J�s�O�D�A��!�!�!�U�+��q�M�&�&�s�+�A�.�E��M�M�%�%�'$�
#�
#�s�E	F
�

Fc��[R"5[R"S54n[SS5n[	S5n[
R
U[RU5nURUS5 [U5RS5SnURXQ5 SSS5 g!,(df   g=f)Nrrrr%r)
rrrr�	bytearrayrrrr
�assertEqualr(r)r*r+s      r!�test_ioctl_mutable_buf�$IoctlTestsTty.test_ioctl_mutable_buf6s����z�z�|�R�Y�Y�q�\�*��
�*�d�
#�s��F�#�C����C��!2�!2�C�8�A����Q��"��s�O�(�(��-�a�0�E��M�M�%�%�$�
#�
#�s�A1B2�2
Cc���[R"5[R"S54n[SS5n[	S5n[U5n[RU[RUS5nUR[U5U5 URU[
5 [U5RS5SnURXa5 SSS5 g!,(df   g=f)Nrrrr%Fr)rrrrr2r'rrrr
r3r&r(r)r*)r,r-rr.�save_bufrr s       r!�test_ioctl_no_mutate_buf�&IoctlTestsTty.test_ioctl_no_mutate_buf?s����z�z�|�R�Y�Y�q�\�*��
�*�d�
#�s��F�#�C��S�z�H����C��!2�!2�C��?�A����U�3�Z��2��!�!�!�U�+��q�M�&�&�s�+�A�.�E��M�M�%�%�$�
#�
#�s�BC�
C+Nc���[R"S5nURnSnUb7URU/X--5 UR[	U5U-U5 U$URU5 U$)Nri���)�array�itemsize�extendr3�len�append)r,�nbytesr.�intsize�fills     r!�_create_int_buf�IoctlTestsTty._create_int_bufJsm���k�k�#����,�,�������J�J��v��!2�3�4����S��X��/��8��
�
�J�J�t���
�c�b�[R"5[R"S54nURU5n[	SS5n[
R
U[RU5nSSS5 USnURWS5 URXb5 g!,(df   N7=f)Nrrr)rrrrCrrrrr
r3r*)r,r@r-r.rrr s       r!�_check_ioctl_mutate_len�%IoctlTestsTty._check_ioctl_mutate_lenWs����z�z�|�R�Y�Y�q�\�*���"�"�6�*��
�*�d�
#�s����C��!2�!2�C�8�A�$��A�������A���
�
�e�!�	$�
#�s�	&B � 
B.c�:�[R"5[R"S54nURU5n[	U5n[SS5n[RU[RUS5nSSS5 URW[5 UR[U5[U55 UR[	U5U5 [R"SU5Sn[U5RS5SnUR!Xr5 [	U5n[SS5n[RU[RUS5nSSS5 URU[5 UR[U5[U55 URX45 [R"SU5Sn[U5RS5SnUR!Xr5 g!,(df   GN�=f!,(df   N�=f)NrrrFrT)rrrrCr'rrrrr
r&r3r>r;r(r)r*)r,r@r-r.r7rrr s        r!�_check_ioctl_not_mutate_len�)IoctlTestsTty._check_ioctl_not_mutate_len`s����z�z�|�R�Y�Y�q�\�*���"�"�6�*����:��
�*�d�
#�s����C��!2�!2�C��?�A�$����a��'�����Q���X��/�����s��X�.����C��#�A�&���1�
�"�"�3�'��*���
�
�e�!��C�j��
�*�d�
#�s����C��!2�!2�C��>�A�$����a��'�����Q���X��/�����'����C��#�A�&���1�
�"�"�3�'��*���
�
�e�!�#$�
#��$�
#�s�'G:�7'H�:
H	�
Hc�D�UR5 UR5 g�N�rGrJ�r,s r!�test_ioctl_mutate�IoctlTestsTty.test_ioctl_mutatews���$�$�&��(�(�*rEc�H�URS5 URS5 g)N�rNrOs r!�test_ioctl_mutate_1024�$IoctlTestsTty.test_ioctl_mutate_1024{s ��	
�$�$�T�*��(�(��.rEc�h�URS5 UR[URS5 g)Ni)rG�assertRaises�
ValueErrorrJrOs r!�test_ioctl_mutate_2048�$IoctlTestsTty.test_ioctl_mutate_2048�s(���$�$�T�*����*�d�&F�&F��MrE�rM)�__name__�
__module__�__qualname__�__firstlineno__�classmethodr"r/r4r8rCrGrJrPrTrY�__static_attributes__r[rEr!r
r

sD���@��@�&�2&�	&��"�"�.+�/�NrEr
�openptyzneed os.openpty()c�&�\rSrSrSr\R"\"\S5S5S5r	\R"\
RS:HS5\R"\"\S5S	5S
55rSr
\R"\"\S5S
5S5rSrg)�
IoctlTestsPty�c���[R"5uUlUlUR	[R
UR5 UR	[R
UR5 grM)rrb�	master_fd�slave_fd�
addCleanup�closerOs r!�setUp�IoctlTestsPty.setUp�sB��(*�
�
��%����
�������$�-�-�0�������$�.�.�1rE�TCFLSHzrequires termios.TCFLSHc�X�URnURn[RS;n[R
"US5 UR
[R"US5S5 U(a4[RU[R[R5 O3[RU[R[R5 UR
[R"US5S5 U(a4[RU[R[R5 O3[RU[R[R5 [R
"US5 UR
[R"US5S5 g)N)�linux�androidsabcdef�sabscdsABCDEFrS)rhrg�sys�platformr�writer3�readrrrrm�TCOFLUSH�TCIFLUSH)r,�wfd�rfd�inbufs    r!� test_ioctl_clear_input_or_output�.IoctlTestsPty.test_ioctl_clear_input_or_output�s���m�m���n�n����� 4�4��
����i� ��������a��%�0���K�K��W�^�^�W�-=�-=�>�
�K�K��W�^�^�W�-=�-=�>��������a��%�0���K�K��W�^�^�W�-=�-=�>�
�K�K��W�^�^�W�-=�-=�>�
����i� ��������d�+�Y�7rErozonly works on Linux�TCXONCzrequires termios.TCXONCc��^^^^�TRmTRn[R"5m[R"5mUUUU4Sjn[R
"[R"US9/5 TR[R"US5S5 [RT[R[R5 TR5 TR!TR#S5S5 [RT[R[R$5 TR'TR#[(R*5S5 TR[R"US5S	5 SSS5 g!TR5 f=f![RT[R[R$5 f=f!,(df   g=f)
Nc��>�[R"TS5 TRTR[R
55 [R"TS5 TR
5 g)N�abc�def)rrt�
assertTrue�waitr�
SHORT_TIMEOUT�set)r,rx�write_finished�write_suspendeds����r!�writer�BIoctlTestsPty.test_ioctl_suspend_and_resume_output.<locals>.writer�sH����H�H�S�&�!��O�O�O�0�0��1F�1F�G�H��H�H�S�&�!���� rE)�target�r�g�?zoutput was not suspendedzoutput was not resumedrSr�)rhrg�	threading�Eventr�
start_threads�Threadr3rrurrrr}�TCOOFFr��assertFalser��TCOONr�rr�)r,ryr�rxr�r�s`  @@@r!�$test_ioctl_suspend_and_resume_output�2IoctlTestsPty.test_ioctl_suspend_and_resume_output�sS����m�m���n�n��#�/�/�+��"���*��	!�	!��
+�
+�Y�-=�-=�V�-L�,M�
N����R�W�W�S�!�_�f�5�
@�*��K�K��W�^�^�W�^�^�D�#�'�'�)�� � ��!4�!4�S�!9�!;�=����C�������?��O�O�N�/�/��0E�0E�F�4�
6����R�W�W�S�$�/��8�O�
N��$�'�'�)�����C�������?��O�
N�s7�9(G&�#3F�1F.�B	G&�F+�+F.�.5G#�#G&�&
G4c��[RS:a$[Rn[RS-nOL[Rn[R"S[R"S[R55un[R"SSSSS5n[
R
URX#5n[
R
URX5ng)Nrl��r�I�HHHH�P�)r�
TIOCSWINSZrrrrrrg)r,�set_winsz_opcode_maybe_neg�set_winsz_opcode_pos�	our_winsz�	new_winszs     r!�%test_ioctl_signed_unsigned_code_param�3IoctlTestsPty.test_ioctl_signed_unsigned_code_param�s�������!�)0�);�);�&�#*�#5�#5�
�#B� �#*�#5�#5� �*0�-�-���K�K��W�%7�%7�8�+:�'�&��K�K��r�"�Q�q�1�	��K�K����0D�P�	��K�K����0J�V�	rE�FICLONEzneed fcntl.FICLONEc�~�[R"5nUR[5 [RU[RU5 SSS5 UR[5 [RU[RS5 SSS5 g!,(df   NR=f!,(df   g=f)Ns)r�make_bad_fdrWrrrr�)r,�fds  r!�test_bad_fd�IoctlTestsPty.test_bad_fd�ss���
"�
"�
$��
�
�
�w�
'��K�K��E�M�M�2�.�(�
�
�
�w�
'��K�K��E�M�M�<�8�(�
'�(�
'��
'�
'�s�&B�.&B.�
B+�.
B<)rgrhN)r\r]r^r_rkr�
skipUnless�hasattrrr{rrrsr�r�rr�rar[rEr!rdrd�s���2�
�����(�3�5N�O�8�P�8�2�������0�2G�H�
�����(�3�5N�O�9�P�I�9�6W������	�2�4H�I�9�J�9rErd�__main__)r;rrrrr�r�testr�test.supportrr�test.support.import_helperrrr�TestCaser
r�r�rdr\�mainr[rEr!�<module>r�s����	�
�
����4�4��g���
�	�
"��wN�H�%�%�wN�t
���W�R��+�-@�A�R9�H�%�%�R9�B�R9�j�z���M�M�O�rE

Youez - 2016 - github.com/yon3zu
LinuXploit