开发者

How to escape hex values in netcat

I want to send the following via netcat:

99||0x00

(4 ASCII characters and a zero)

How is this开发者_C百科 done? I'm using Windows XP.

Thank you.


# echo -ne "99||\x00" | nc <host> <port>


Put the bytes into a file with binary editor and pipe it to netcat. Windows shell too supports input from file redirection via

netcat (options) < (file)

Alternatively, you may be able to input it with keyboard directly via Alt-000, but I doubt it.


Depending on your Unix flavor you can try one of these

echo '99||#' | tr '#' '\000' | netcat <host> <port>

echo -e '99||\000' | netcat <host> <port>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜