I wrote the following C code to set the env variable to \x09. But when I use echo $EGG | hexdump, I see that it sets it to 00. This problem happens only when the first nibble is zero. Any clue what is wrong?
char shellcode[] = "\x09";
main() {
setenv("EGG", shellcode, 1);
system("/bin/bash");
return 0;
}