3 ms·
/dev/tcp is ugly hack in bash, not something provided by kernel. nc is arguably the more canonical way of doing networking in shell.
by zokier 7y ago
/dev/tcp is ugly hack in bash, not something provided by kernel. nc is arguably the more canonical way of doing networking in shell.
- anthk 7y agoIf you have nc you just need to reimplement echo.c and the task is over, as you can fetch busybox in several ways. Heck, a simple while loop over stdin would be enough. From the K&R book: #include <stdio.h> int main(){ int c; while((c =getchar()) != EOF){ putchar(c); } } Or just run nc from a < redirect, but, the shell could restrict that maybe.