Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

echo'ing hex values

Sometimes we need to send hex values to a remote system to test out an edge case. The echo command can help... just use the -e command line option.

Try piping echo into your connection. In this case, we're connected using netcat.

echo -e "\xde\xad\xbe\xef" | nc <host> <port>

Want to suppress the newline? Use -n

echo -e -n "\xde\xad\xbe\xef\x03\x34\x43\x0d\x0a" | nc <host> <port>