title: How to convert a hex address from a char buffer to be written to memory
body: <p>So i got this function here, which is called from the main function:</p>
  
  <pre><code>void overflow(char *arg)
  {
      char buf[1369];
  
      strcpy (buf, arg);
  
      printf ("Thank you for contacting customer service. You are so important to us that we wrote a program to serve you.\n");
      printf ("Please hold for %u minutes while I drop your call\n", (int)strlen(buf));
  
      return;
  } 
  </code></pre>
  
  <p>The string <code>*arg</code> comes out of <code>argv[1]</code>.</p>
  
  <p>And when i do something like:</p>
  
  <pre><code>
  ./overflow1 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa29390408
  </code></pre>
  
  <p>the stack looks like this:</p>
  
  <pre><code>
  0xffffce80: 0x07    0x00    0x00    0x61    0x61    0x61    0x61    0x61
  0xffffce88: 0x61    0x61    0x61    0x61    0x61    0x61    0x61    0x61
  0xffffce90: 0x61    0x61    0x61    0x61    0x61    0x61    0x61    0x61
  0xffffce98: 0x61    0x61    0x61    0x61    0x61    0x61    0x61    0x61
  0xffffcea0: 0x61    0x61    0x61    0x61    0x61    0x61    0x61    0x61
  0xffffcea8: 0x61    0x61    0x61    0x61    0x61    0x61    0x61    0x61
  0xffffceb0: 0x61    0x61    0x61    0x61    0x61    0x61    0x61    0x61
  0xffffceb8: 0x61    0x61    0x61    0x61    0x61    0x61    0x61    0x61
  0xffffcec0: 0x61    0x61    0x32    0x39    0x33    0x39    0x30    0x34
  0xffffcec8: 0x30    0x38
  </code></pre>
  
  <p>So how do i get:</p>
  
  <p><code>0x32   0x39    0x33    0x39    0x30    0x34    0x30    0x38</code> </p>
  
  <p>to be:</p>
  
  <p><code>29 39 04 08</code>
  ?</p>
  
  <p>I do realise that this needs to be converted from actual hex values to alphanumeric values, for example <code>08</code>, but every string tool on the web gives me no result, because <code>08</code> is not a ascii/alphanumeric value.</p>