Simple * nix tool to listen for HTTP requests and log request data

What is a simple, easy-to-use * nix tool that will listen for requests on a given port and register the request header and body?

+4
source share
1 answer

What about netcat?

sudo nc -l 80 

Update : this is what I see when I submit a request through a browser.

 [~]$ sudo nc -l 80 Password: GET / HTTP/1.1 Host: localhost User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_2) AppleWebKit/534.52.7 (KHTML, like Gecko) Version/5.1.2 Safari/534.52.7 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 Accept-Language: en-us Accept-Encoding: gzip, deflate Connection: keep-alive 
+9
source

Source: https://habr.com/ru/post/1386413/


All Articles