netcat does not works in heredoc style -
i trying make request 1 of apache based web server using netcat. surprisingly following 2 formats work expected. style suggested on netcat manpage:
$printf "get / http/1.0\r\n\r\n" | nc 104.131.x.x 80 and
$echo -e "get / http/1.0\r\n\r\n" | nc 104.131.x.x 80 but, below 2 style such heredoc convention or line line command not work , responds 400 bad request.
$nc 104.131.x.x 80 <<eof > / http/1.0 > > > eof and
$nc 104.131.x.x 80 / http/1.0\r\n\r\n any idea, why similar header information acts differently?
Comments
Post a Comment