I'm trying to read files with bash tcp socket,So on one host I do,nc -l 8888 < /etc/passwdAnd on another machine,echo </dev/tcp/127.0.0.1/8888But it didn't read the file as expected, I got an empty line.I know cat < /dev/tcp/xxx/xxxx works, but can I do that without external binaries?EDITSo I tried $() syntax, # echo $(</dev/tcp/127.0.0.1/8888) > filebash: /dev/tcp/127.0.0.1/8888: No such file or directory
Bash reading from /dev/tcp, without external binaries
bash;tcp