/usr/lib/python3/dist-packages/twisted/runner/__pycache__
Edit: /usr/lib/python3/dist-packages/twisted/runner/__pycache__/inetdtap.cpython-310.pyc (2817B)
o
b
@ s d Z ddlZddlZddlZddlmZmZ ddlm Z ddl
mZmZ ddl
mZmZ ejejdZG dd d ejZd
d ZdS )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)internetservice)
ServerFactory)logusage)inetd inetdconf)tcpudpc @ s@ e Zd ZdZg dg dgZg dgZejdedidZ dS ) 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
)rpcrz/etc/rpcz$DEPRECATED. RPC procedure table file)filefz/etc/inetd.confzService configuration file)
nointernalizDon't run internal servicesr z*.conf)
optActionsN)
__name__
__module____qualname____doc__
optParametersoptFlagsr Completions
CompleteFilescompData r r 9/usr/lib/python3/dist-packages/twisted/runner/inetdtap.pyr s
r c C s t }t }t| d
}|| W d n1 sw Y |jD ]}|j}|jdr7t
d q&||jfdvrJt
d|j|jf q&zt|j
|_
W n' tyy zt|j
d |_
W n tyv t
d|j
Y Y q&w