nc
Переадресация stdin/stdout в файл или сетевое соединение
Тип файла: команда
Рус Toybox 0.8.4-android multicall binary: (see toybox --help)
usage: netcat [-46ELUlt] [-u] [-wpq #] [-s addr] {IPADDR PORTNUM|-f FILENAME|COMMAND...}
Forward stdin/stdout to a file or network connection.
-4 Force IPv4
-6 Force IPv6
-E Forward stderr
-L Listen and background each incoming connection (server mode)
-U Use a UNIX domain socket
-W SECONDS timeout for more data on an idle connection
-f Use FILENAME (ala /dev/ttyS0) instead of network
-l Listen for one incoming connection, then exit
-p Local port number
-q Quit SECONDS after EOF on stdin, even if stdout hasn't closed yet
-s Local source address
-t Allocate tty
-u Use UDP
-w SECONDS timeout to establish connection
Use "stty 115200 -F /dev/ttyS0 && stty raw -echo -ctlecho" with
netcat -f to connect to a serial port.
When listening the COMMAND line is executed as a child process to handle
an incoming connection. With no COMMAND -l forwards the connection
to stdin/stdout. If no -p specified, -l prints the port it bound to and
backgrounds itself (returning immediately).
For a quick-and-dirty server, try something like:
netcat -s 127.0.0.1 -p 1234 -tL sh -l[ ToyBox ]