netcat -k -l 10080 | grep –line-buffered “GET /” | cut -b6- | sed “s/HTTP.*//”
It works fine if I feed it a log file but when given the real thing it won’t output.
So I tried to add -u to set but it still won’t work
If fed:
GET /test message :) HTTP/1.1
Host: 127.0.0.1
Accept-Encoding: identity
Connection: close
Content-type: application/x-www-form-urlencoded
Accept: text/plain
It’s supposed to output: test message :)
When sent through cat it works fine. But when it gets the real thing from netcat it won’t work.
Thanks in advance
New contributor
Neonit is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.