I put netcat -l -p 80
into terminal. Then open http://localhost/ in web browser. Now netcat
shows the header of the request in stdout. All fine.
But if I use netcat
with the -c
option netcat
does not print anymore to stdout.
How can I get netcat -l -p 80 -c uname
to print to stdout?
Maybe via the -o file
option via file descriptor?
After this Redirect process stdin and stdout to netcat and that How to print text while netcat is listening at a port?
I installed sudo apt install ncat
and this solves my problem:
ncat -l -p 80 <<< "hello"
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.