I want to check if it is necessary to test on every single possible ssl,tls which my testsslserver has listed. The purpose is to find out as many http response as possible. And on top of that, I want to check if HTTP response code other then 200 is it valid or not:
echo "---HTTP 1.0 ----"
printf "GET / HTTP/1.0\r\n\r\n" | nc -v $1 $2
echo "Last Run:GET / HTTP/1.0\r\n\r\n"
printf "OPTIONS / HTTP/1.0\r\n\r\n" | nc -v $1 $2
echo "Last Run:OPTIONS / HTTP/1.0\r\n\r\n"
echo "---HTTP 1.1 ----"
printf "GET / HTTP/1.1\r\nHost: $1:$2\r\nConnection: close\r\n\r\n" | nc -v $1 $2
echo "Last Run:GET / HTTP/1.1\r\nHost: $1:$2\r\nConnection: close\r\n\r\n"
#if the request is:"GET / HTTP/1.1\r\nHost: host:port\r\n\r\n" then the response contains header as well as body, and the connection will not close even after the response.
printf "OPTIONS / HTTP/1.1\r\nHost: $1:$2\r\nConnection: close\r\n\r\n" | nc -v $1 $2
echo "Last Run:OPTIONS / HTTP/1.1\r\nHost: $1:$2\r\nConnection: close\r\n\r\n"