I'm doing exercise net0 on https://exploit-exercises.com/protostar/. The content of the exercise is to send requested number as a little endian 32bit int to the server. I came up with the following command lines.
mkfifo /tmp/pipe
cat /tmp/pipe | netcat 127.0.0.1 2999 |tee -a /tmp/log | cut -d ' ' -f 3 | xargs -I{} python -c "import struct; print struct.pack('I',int({}))" > /tmp/pipe
The second command line doesn't finish, and I found cat /tmp/pipe
blocking on read (not on open) when use strace
to debug.