I want to pass arguments manually on the Windows command line consisting of hex values of the byte e.g. "\x41\x42\x43\x44" - a sequence of 4 bytes on the cmd.exe command line to a program.

How do I do this? Cannot seem to find an escape sequence for using byte values in hex.

  • 1
    The expected format of the arguments is up to the specific program they're being passed to, it's not just something you can do in general. If your program is expecting this format, what's happening when you try to use it? Which escape sequences have you tried already (^`, \`?)? May 30, 2014 at 11:48
  • I am writing a command line based Buffer Overflow which requires me to send hex bytes which cannot be typed e.g. 0x00 etc. There should be a generic way of doing this May 30, 2014 at 11:50

1 Answer 1


I'm not fully sure what it is you're trying to accomplish, and you have avoided requests for clarification, so I'll try and answer it as it stands, in a general way:

You can't do what you're trying to do.

Command-line parameters are (always) of a string/character type, and it's up to the program they're being fed into to define the expected format and type of the accepted argument.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.