Well, basically I have a server-client connection and want to send a packet trough console input stream. I want to type in hex what to send, so if I wanted to send a hello world to the server I'd write:
But how can I fill a memory location with 0x48 when I type "48", instead of 0x34 (4) and 0x38 (8)?Code:48656C6C6F20576F726C64 <- this into the console H e l l o W o r l d <- instead of that
And also, a bit offtopic, it's long time ago I programmed with sockets (in windows), when I use winsocks send(socket, buf, length, flag), will zero bytes within <length> bytes also be sent or will the packet truncated if it finds a zero termination?
Edit: Main problem is, that I am unable to format many following hex-numbers with scanf, I want to send variable packet sizes.