netcat web server code example
Example 1: netcat server
nc -l -p 1234
Example 2: nc http server
while true; do
echo -e "HTTP/1.1 200 OK\n\n $(date)" | nc -l -p 1500 -q 1
done
nc -l -p 1234
while true; do
echo -e "HTTP/1.1 200 OK\n\n $(date)" | nc -l -p 1500 -q 1
done