8
5
In my usual gnome-terminal I do a
netcat -u somewhere 1234
to start sending UDP packets to somewhere. I need to transmit the following 5 bytes, written in hexadecimal: "01 00 af 0f e1". Now how do I type a escape sequence into my terminal that causes it to send these exact 5 bytes to stdin of netcat?
Update: Just to clarify. I know several ways of actually inputting the bytes I want to the program. That is not the question. The question is what sequence of keystrokes do I type into my terminal, after the program is launched, to input a hexadecimal character that is not otherwise represented on my keyboard. (Such as 0x00, 0x01, or 0x0f.)
I am starting to think it is simply not possible, however I would be a bit surprised if that is the conclusion.
I will probably end up using a solution like this, but I really thought there was a way to escape input in the terminal so that I may type the hexadecimal representation of a character and the terminal will translate it before sending it as input to the program.
I like the idea of creating files with the content in the filename, it is exactly very short strings I have to transmit, thanks. – Bjarke Freund-Hansen – 2009-08-07T07:11:45.800