403Webshell
Server IP : 178.105.222.151  /  Your IP : 216.73.216.38
Web Server : nginx/1.28.3
System : Linux MNK 7.0.0-15-generic #15-Ubuntu SMP PREEMPT_DYNAMIC Wed Apr 22 16:06:43 UTC 2026 x86_64
User : www-data ( 33)
PHP Version : 8.5.4
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /lib/python3/dist-packages/serial/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib/python3/dist-packages/serial/__pycache__/serialutil.cpython-314.pyc
+
&�a_%U�
�T�^RIHt^RIt^RIt]]]
RtRt]!^.4t
]!^.4t]!^
.4t]!^
.4tRwttttt^R^utttRwtttt]R]R	]R
]R]R/t!R
R]4t!RR]4t !RR]4t!!RR]4t"!RR]PF4t$]%R8XEd<^RI&t&]$!4t']&PPPSRPU]'PV44]&PPPSRPU]'PX44]&PPPSRPU]'PZ44]&PPPSRPU]'P\44]&PPPSRPU]'P^44]&PPPSRPU]'44R#R# ]]3d!RR]4tEL�i;i ]]3d]	tEL�i;i ]]3d]	3t
ELi;i) �)�absolute_importNc��]tRt^tRtR#)�
memoryview�N)�__name__�
__module__�__qualname__�__firstlineno__�__static_attributes__r��3/usr/lib/python3/dist-packages/serial/serialutil.pyrrs��rrc#�"�\V\4'dVP4p^pWV^,pV^,
pV'dVx�K#R#5i)z=Iterate over bytes, returning bytes instead of ints (python3)N)�
isinstancer�tobytes)�b�i�as&  r
�	iterbytesr(sF����!�Z� � �
�I�I�K��	�A�
�
��A��J��	�Q�����G��s�AAc�H�\V\4'dV#\V\4'd\V4#\V\4'dVP	4#\V\
4'd\
RPV44h\\V44#)z"convert a sequence to a bytes typez?unicode strings are not supported, please encode to bytes: {!r})r�bytes�	bytearrayrr�unicode�	TypeError�format)�seqs&r
�to_bytesr8sz���#�u����
�	�C��	#�	#��S�z��	�C��	$�	$��{�{�}��	�C��	!�	!��Y�`�`�ad�e�f�f��Y�s�^�$�$rg�?�None�Even�Odd�Mark�Spacec��]tRt^\tRtRtR#)�SerialExceptionz.Base class for serial port related exceptions.rN�rrr	r
�__doc__rrrr
r#r#\s��8rr#c��]tRt^`tRtRtR#)�SerialTimeoutExceptionz Write timeouts give an exceptionrNr$rrr
r'r'`s��*rr'c�6aa�]tRt^dtoRtV3RltRtVtV;t#)�PortNotOpenErrorzPort is not openc�.<�\\V`R4R#)z)Attempting to use a port that is not openN)�superr)�__init__)�self�	__class__s&�r
r,�PortNotOpenError.__init__fs���
���.�/Z�[rr)	rrr	r
r%r,r�__classdictcell__�
__classcell__)r.�
__classdict__s@@r
r)r)ds�����\�\rr)c�a�]tRt^jtoRt]!]R4'd]PtM]PtRt	Rt
RtRtRt
VtR#)	�Timeouta&Abstraction for timeout operations. Using time.monotonic() if available
or time.time() in all other cases.

The class can also be initialized with 0 or None, in order to support
non-blocking and fully blocking I/O operations. The attributes
is_non_blocking and is_infinite are set accordingly.
�	monotonicc��VRJVnV^8HVnWnVeVP4V,VnR#RVnR#)z(Initialize a timeout with given durationN)�is_infinite�is_non_blocking�duration�TIME�target_time�r-r9s&&r
r,�Timeout.__init__sA��$��,��� (�A�
��� �
���#�y�y�{�X�5�D��#�D�rc�T�VPRJ;'dVP4^8*#)z4Return a boolean, telling if the timeout has expiredN)r;�	time_left�r-s&r
�expired�Timeout.expired�s'�����t�+�E�E����0@�A�0E�Erc�0�VP'd^#VP'dR#VPVP4,
pWP8�d3VP4VP,VnVP#\^V4#)z:Return how many seconds are left until the timeout expiresN)r8r7r;r:r9�max)r-�deltas& r
r?�Timeout.time_left�sm�������
�
�
�
���$�$�t�y�y�{�2�E��}�}�$�#'�9�9�;����#>�� ��}�}�$��1�e�}�$rc�J�WnVP4V,VnR#)zJRestart a timeout, only supported if a timeout was already set up
before.
N)r9r:r;r<s&&r
�restart�Timeout.restart�s��
!�
��9�9�;��1��r)r9r7r8r;N)rrr	r
r%�hasattr�timer5r:r,rAr?rHrr0�r2s@r
r4r4jsI������t�[�!�!�
�~�~��
�y�y��$�F�
%�2�2rr4c��a�]tRt^�toRtRFt]]]]	3t
]]]
]]3t]]]3tRR]	]]RRRRRRR3Rlt]R4t]P0R4t]R4t]P0R	4t]R
4t]P0R4t]R4t]P0R
4t]R4t]P0R4t]R4t]P0R4t]R4t]P0R4t]R4t]P0R4t]R4t ] P0R4t ]R4t!]!P0R4t!]R4t"]"P0R4t"]R4t#]#P0RGRl4t#]R4t$]$P0R4t$]R 4t%]%P0R!4t%]R"4t&]&P0R#4t&]R$4t']'P0R%4t'RHt(R&t)R't*R(t+R)t,R*t-R+t.R,t/R-t0R.t1RIR/lt2R0t3R1t4R2t5RIR3lt6RJR4lt7RJR5lt8R6t9R7t:R8t;R9t<R:t=]R;4t>]>P0R<4t>]R=4t?]?P0R>4t?R?t@R@tARAtBRBtC]DR3RCltERDtFREtGVtHR#)K�
SerialBasez\Serial port base class. Provides __init__ function and properties to
get/set port settings.
�%NFc
��RVnRVnRVnRVnRVnRVnRVnRVnRVnRVn	RVn
RVnRVnRVn
RVnRVnRVnRVnRVnWnW nW0nW@nWPnW`nW�nWpnW�nW�nW�nW�nRV
9dV
P?R4VnRV
9dV
P?R4VnV
'd\ARPCV
44hVeVPE4R#R#)z�Initialize comm port object. If a "port" is given, then the port will be
opened immediately. Otherwise a Serial port object in closed state
is returned.
FNT�writeTimeout�interCharTimeoutz"unexpected keyword arguments: {!r})#�is_open�portstr�name�_port�	_baudrate�	_bytesize�_parity�	_stopbits�_timeout�_write_timeout�_xonxoff�_rtscts�_dsrdtr�_inter_byte_timeout�_rs485_mode�
_rts_state�
_dtr_state�_break_state�
_exclusive�port�baudrate�bytesize�parity�stopbits�timeout�
write_timeout�xonxoff�rtscts�dsrdtr�inter_byte_timeout�	exclusive�pop�
ValueErrorr�open)r-rfrgrhrirjrkrmrnrlrorprq�kwargss&&&&&&&&&&&&&,r
r,�SerialBase.__init__�s0��(��������	���
���������������
�"�����
�������#'�� ����������!�������	� �
� �
��� �
���*��������"4��"���V�#�!'���N�!;�D����'�&,�j�j�1C�&D�D�#���A�H�H��P�Q�Q����I�I�K�rc��VP#)zcGet the current port setting. The value that was passed on init or using
setPort() is passed back.
)rVr@s&r
rf�SerialBase.port�s���z�z�rc�6�Ve:\V\4'g$\RP\	V444hVP
pV'dVP
4WnWnVPVn	V'dVP4R#R#)zChange the port.
        Nz'"port" must be None or a string, not {})r�
basestringrsr�typerS�closerTrVrUrt)r-rf�was_opens&& r
rfrxsm��
��J�t�Z�$@�$@��F�M�M�d�SW�j�Y�Z�Z��<�<����J�J�L����
��L�L��	���I�I�K�rc��VP#)z"Get the current baud rate setting.)rWr@s&r
rg�SerialBase.baudrate����~�~�rc��\V4pV^8d\RPV44hW nVP'dVP4R#R# \d\RPT44hi;i)z�Change baud rate. It raises a ValueError if the port is open and the
baud rate is not possible. If the port is closed, then the value is
accepted and the exception is raised when the port is opened.
zNot a valid baudrate: {!r}N)�intrsrrWrS�_reconfigure_portr)r-rgrs&& r
rgrsy��		)��H�
�A��1�u� �!=�!D�!D�X�!N�O�O��N��|�|�|��&�&�(���
�	L��9�@�@��J�K�K�	L�s�A�&Bc��VP#)z"Get the current byte size setting.)rXr@s&r
rh�SerialBase.bytesize-r�rc��WP9d\RPV44hWnVP'dVP4R#R#)zChange byte size.zNot a valid byte size: {!r}N)�	BYTESIZESrsrrXrSr�)r-rhs&&r
rhr�2sD���>�>�)��:�A�A�(�K�L�L�!���<�<�<��"�"�$�rc��VP#)z)Get the current exclusive access setting.)rer@s&r
rq�SerialBase.exclusive;s�����rc�Z�WnVP'dVP4R#R#)z$Change the exclusive access setting.N)rerSr�)r-rqs&&r
rqr�@s#��$���<�<�<��"�"�$�rc��VP#)zGet the current parity setting.)rYr@s&r
ri�SerialBase.parityG����|�|�rc��WP9d\RPV44hWnVP'dVP4R#R#)zChange parity setting.zNot a valid parity: {!r}N)�PARITIESrsrrYrSr�)r-ris&&r
rir�LsD�����&��7�>�>�v�F�G�G����<�<�<��"�"�$�rc��VP#)z"Get the current stop bits setting.)rZr@s&r
rj�SerialBase.stopbitsUr�rc��WP9d\RPV44hWnVP'dVP4R#R#)zChange stop bits size.zNot a valid stop bit size: {!r}N)�STOPBITSrsrrZrSr�)r-rjs&&r
rjr�ZsD���=�=�(��>�E�E�h�O�P�P�!���<�<�<��"�"�$�rc��VP#�z Get the current timeout setting.)r[r@s&r
rk�SerialBase.timeoutc����}�}�rc�
�Ve,V^,T^8d\RPT44hWnVP'dVP4R#R# \d\RPT44hi;i�zChange timeout setting.N�Not a valid timeout: {!r})rrsrr[rSr��r-rks&&r
rkr�hs�����
N��!����{� �!<�!C�!C�G�!L�M�M��
��<�<�<��"�"�$����
N� �!<�!C�!C�G�!L�M�M�
N�s�	A�&Bc��VP#r�)r\r@s&r
rl�SerialBase.write_timeoutvs���"�"�"rc�
�Ve,V^8d\RPV44hV^,WnVP'dVP4R#R# \d\RPT44hi;ir�)rsrrr\rSr�r�s&&r
rlr�{s�������{� �!<�!C�!C�G�!L�M�M�
N��!��&���<�<�<��"�"�$���	�
N� �!<�!C�!C�G�!L�M�M�
N���	A�&Bc��VP#)z0Get the current inter-character timeout setting.)r`r@s&r
rp�SerialBase.inter_byte_timeout�s���'�'�'rc�
�Ve,V^8d\RPV44hV^,WnVP'dVP4R#R# \d\RPT44hi;i)z"Change inter-byte timeout setting.Nr�)rsrrr`rSr�)r-�
ic_timeouts&&r
rpr��s����!��A�~� �!<�!C�!C�J�!O�P�P�
Q��Q��$.� ��<�<�<��"�"�$���	�
Q� �!<�!C�!C�J�!O�P�P�
Q�r�c��VP#)z!Get the current XON/XOFF setting.)r]r@s&r
rm�SerialBase.xonxoff�r�rc�Z�WnVP'dVP4R#R#)zChange XON/XOFF setting.N)r]rSr�)r-rms&&r
rmr��s#�� �
��<�<�<��"�"�$�rc��VP#)z-Get the current RTS/CTS flow control setting.)r^r@s&r
rn�SerialBase.rtscts�r�rc�Z�WnVP'dVP4R#R#)z$Change RTS/CTS flow control setting.N)r^rSr�)r-rns&&r
rnr��s#�����<�<�<��"�"�$�rc��VP#)z-Get the current DSR/DTR flow control setting.)r_r@s&r
ro�SerialBase.dsrdtr�r�rc��VfVPVnMWnVP'dVP4R#R#)z#Change DsrDtr flow control setting.N)r^r_rSr�)r-ros&&r
ror��s5���>��<�<�D�L�"�L��<�<�<��"�"�$�rc��VP#�N)rbr@s&r
�rts�SerialBase.rts�������rc�Z�WnVP'dVP4R#R#r�)rbrS�_update_rts_state�r-�values&&r
r�r���!�����<�<�<��"�"�$�rc��VP#r�)rcr@s&r
�dtr�SerialBase.dtr�r�rc�Z�WnVP'dVP4R#R#r�)rcrS�_update_dtr_stater�s&&r
r�r��r�rc��VP#r�)rdr@s&r
�break_condition�SerialBase.break_condition�s��� � � rc�Z�WnVP'dVP4R#R#r�)rdrS�_update_break_stater�s&&r
r�r��s"��!���<�<�<��$�$�&�rc��VP#)z�Enable RS485 mode and apply new settings, set to None to disable.
See serial.rs485.RS485Settings for more info about the value.
)rar@s&r
�
rs485_mode�SerialBase.rs485_mode�s�����rc�Z�WnVP'dVP4R#R#r�)rarSr�)r-�rs485_settingss&&r
r�r��s"��)���<�<�<��"�"�$�rc�z�\VPUu.uFq\VRV,43NK	up4#uupi)zJGet current port settings as a dictionary. For use with
apply_settings().
�_)�dict�_SAVED_SETTINGS�getattr)r-�keys& r
�get_settings�SerialBase.get_settings�s7��
��@T�@T�U�@T��7�4��s��3�4�@T�U�V�V��Us�8c��VPF=pW!9gKW,\VRV,48wgK+\WW,4K?	R#)z�Apply stored settings from a dictionary returned from
get_settings(). It's allowed to delete keys from the dictionary. These
values will simply left unchanged.
r�N)r�r��setattr)r-�dr�s&& r
�apply_settings�SerialBase.apply_settingss9���'�'�C��x�A�F�g�d�C�#�I�&>�>���1�6�*�(rc�d�RPVPP\V4VR7#)zAString representation of the current port settings and its state.z�{name}<id=0x{id:x}, open={p.is_open}>(port={p.portstr!r}, baudrate={p.baudrate!r}, bytesize={p.bytesize!r}, parity={p.parity!r}, stopbits={p.stopbits!r}, timeout={p.timeout!r}, xonxoff={p.xonxoff!r}, rtscts={p.rtscts!r}, dsrdtr={p.dsrdtr!r}))rU�id�p)rr.rr�r@s&r
�__repr__�SerialBase.__repr__s6��;�<B�6����/�/�B�t�H��<B�<F�	Frc��R#�Trr@s&r
�readable�SerialBase.readable���rc��R#r�rr@s&r
�writable�SerialBase.writabler�rc��R#)Frr@s&r
�seekable�SerialBase.seekable!s��rc��VP\V44p\V4pW!RV%V# \dBp^RIp\	YP4'gThTPRT4TRT%Rp?T#Rp?ii;i)Nr)�read�lenr�arrayr)r-r�data�n�errr�s&&    r
�readinto�SerialBase.readinto$sv���y�y��Q�� ����I��	+��b�q�E�����	+���a���-�-��	��K�K��T�*�A�b�q�E����	+�s�-�A9�6A4�4A9c�f�VPe#VP'gVP4V#r�)rVrSrtr@s&r
�	__enter__�SerialBase.__enter__3s"���:�:�!�$�,�,�,��I�I�K��rc�&�VP4R#r�)r|)r-�argsrus&*,r
�__exit__�SerialBase.__exit__8s���
�
�rc��VP'g\4hRVn\P!V4RVnR#)zISend break condition. Timed, returns to idle state after given
duration.
TFN)rSr)r�rK�sleepr<s&&r
�
send_break�SerialBase.send_break=s2��
�|�|�|�"�$�$�#����
�
�8��$��rc�&�VP4R#r�)�reset_input_bufferr@s&r
�
flushInput�SerialBase.flushInputKs�����!rc�&�VP4R#r�)�reset_output_bufferr@s&r
�flushOutput�SerialBase.flushOutputNs��� � �"rc��VP#r�)�
in_waitingr@s&r
�	inWaiting�SerialBase.inWaitingQs�����rc�(�VPV4R#r�)r�r<s&&r
�	sendBreak�SerialBase.sendBreakTs������!rc��WnR#r�)r�r�s&&r
�setRTS�SerialBase.setRTSW����rc��WnR#r�)r�r�s&&r
�setDTR�SerialBase.setDTRZr	rc��VP#r�)�ctsr@s&r
�getCTS�SerialBase.getCTS]����x�x�rc��VP#r�)�dsrr@s&r
�getDSR�SerialBase.getDSR`rrc��VP#r�)�rir@s&r
�getRI�SerialBase.getRIc����w�w�rc��VP#r�)�cdr@s&r
�getCD�SerialBase.getCDfrrc��WnR#r�)rf)r-rfs&&r
�setPort�SerialBase.setPortis���	rc��VP#r��rlr@s&r
rQ�SerialBase.writeTimeoutls���!�!�!rc��WnR#r�r#r�s&&r
rQr$ps��$�rc��VP#r��rpr@s&r
rR�SerialBase.interCharTimeoutts���&�&�&rc��WnR#r�r')r-rRs&&r
rRr(xs��"2�rc�"�VP4#r�)r�r@s&r
�getSettingsDict�SerialBase.getSettingsDict|s��� � �"�"rc�(�VPV4R#r�)r�)r-r�s&&r
�applySettingsDict�SerialBase.applySettingsDicts�����A�rc��VP#r�)rSr@s&r
�isOpen�SerialBase.isOpen�s���|�|�rc�8�VPVP4#)zDRead all bytes currently available in the buffer of the OS.
        )r�rr@s&r
�read_all�SerialBase.read_all�s���y�y����)�)rc�&�\V4p\4p\VP4pVP	^4pV'd*WF,
pWC)RV8XdM0Ve\V4V8�dMMMVP4'gK\\
V4#)zyRead until an expected sequence is found ('
' by default), the size
        is exceeded or until timeout occurs.
        N)r�rr4r[r�rAr)r-�expected�size�lenterm�linerk�cs&&&    r
�
read_until�SerialBase.read_until�s��
�h�-���{���$�-�-�(����	�	�!��A���	����	�?�h�.���#��D�	�T�(9������� � ���T�{�rc/�P"�VP!V/VBpV'gR#Vx�K#5i)z[Read lines, implemented as generator. It will raise StopIteration on
timeout (empty read).
N)r<)r-r�rur:s&*, r
�iread_until�SerialBase.iread_until�s(���
��?�?�D�3�F�3�D����J�s�&�&)"rWrdrXr_rcrer`rYrVrarbr^rZr[r\r]rgr�rhror�rqrprSrUrirfrTr�rnrjrkrlrm)�2�K�n����i,iXi�ii`	i�rOiKi�i�i�i�ii �i�ii@Bi�i`�i��i�%&i��-i�g5i	=r�)
rgrhrirjrmrornrkrlrp)g�?)�)Irrr	r
r%�	BAUDRATES�FIVEBITS�SIXBITS�	SEVENBITS�	EIGHTBITSr��PARITY_NONE�PARITY_EVEN�
PARITY_ODD�PARITY_MARK�PARITY_SPACEr��STOPBITS_ONE�STOPBITS_ONE_POINT_FIVE�STOPBITS_TWOr�r,�propertyrf�setterrgrhrqrirjrkrlrprmrnror�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rrrrrrrrr rQrRr+r.r1r4�LFr<r?rr0rLs@r
rNrN�s-�����,�I��7�I�y�9�I��[�*�k�<�P�H��5�|�D�H���#�#�&����#��$(��@�T����
�[�[�
��
������_�_�)��)�"�����_�_�%��%��������%��%������]�]�%��%������_�_�%��%�����
�^�^�%��%��#��#����%��%��(��(����%��%�����
�^�^�%��%������]�]�%��%������]�]�	%��	%�����	�Z�Z�%��%�
����	�Z�Z�%��%�
�!��!����'��'�� �� ����%��%�-�O�W�+�F����
��
�
	%�"�#��"���������"��"����%��%��'��'����3��3�#���*�#%�4��,	�	rrN�__main__zport name:  {}
zbaud rates: {}
zbyte sizes: {}
zparities:   {}
zstop bits:  {}
z{}
)�N�E�O�M�S)����)0�
__future__r�iorKr�	NameError�AttributeError�objectr�strrzrr�XON�XOFF�CRrWrMrNrOrPrQrRrSrTrIrJrKrL�PARITY_NAMES�IOErrorr#r'r)r4�	RawIOBaserNr�sys�s�stdout�writerrUrHr�r�r�rrr
�<module>rrs2��'�	��
������� %� ��t�n�����~��
�r�d�^��
�r�d�^��CZ�?��[�*�k�<�78�#�q�3��%�|�*6�'��'�9�i����������'���9�g�9�+�_�+�\��\�82�f�82�vH����H�X�z�����A��J�J���'�.�.�q�v�v�6�7��J�J���'�.�.�q�{�{�;�<��J�J���'�.�.�q�{�{�;�<��J�J���'�.�.�q�z�z�:�;��J�J���'�.�.�q�z�z�:�;��J�J���V�]�]�1�%�&���w	�>�"�
�
�V�
�
��	�>�"���G���
	�>�"����J��s3�G*�H�H�*H�H�H�H�H'�&H'

Youez - 2016 - github.com/yon3zu
LinuXploit