I was wondering if there was a way to read bytes (like this: \x00\x01\x02
) from the command line in C.
For example:
#include <stdio.h>
int main(int argc, char *argv[]) {
printf("%s", argv[1]);
return 0;
}
user@UbuntuServer: ~/Code# gcc Program.c -o Program
user@UbuntuServer: ~/Code# ./Program "\x48\x69"
Hiuser@UbuntuServer: ~/Code# ./Program "\x48\x69\x0a"
Hi
user@UbuntuServer: ~/Code#
Thanks!