title: How to type ASCII code "00" and "01" in linux bash?
body: <p>I have program which looks like this:</p>
  
  <pre><code>/* buf_overflow.c */
  #include &lt;stdio.h&gt;
  int main(){
      char buf[4];
      char exploit_buf[4];
      fgets(buf, 4, stdin);
      gets(exploit_buf);
      printf("exploit_buf: %s\n", exploit_buf);
      return 0;
  }
  </code></pre>
  
  <p>I'm going to use the vulnerability of "gets" function to buffer-overflow some other variables. The value that I want to write to "exploit_buf" is "AAAAAAAA\x01\x00\x00\x00", but i don't know how to send ASCII codes "01" and "00" into exploit_buf. </p>
  
  <p>I know that using this command "printf "AAAAAAAA\x01\x00\x00\x00"" can type the characters that I want, but I don't know how to send them into exploit_buf. I also know that Alt+(number keys on the right of the keyboard) can generate characters from the ASCII code I typed, but this doesn't work in my program either. </p>
  
  <p>The main problem is "how can I skip the first function "fgets()" and type arbitrary ASCII code in "gets()"".</p>
  
  <p>Anyone knows how to type arbitrary ASCII code in the command line of linux?</p>