title: Input a command result in a command line program
body: <p>I got a command line program ./a.out which asks me to input something as shown below:</p>
  
  <pre><code>$ ./a.out
  Adress is 0x8048508
  Please input a choice:
  </code></pre>
  
  <p>And I want to input</p>
  
  <pre><code>python -c 'print "A"*56 + "BBBB" + "\x08\x85\x04\x08"'
  </code></pre>
  
  <p>Despite from using pip(cannot use here cuz the address is dynamic).
  How can I do it?</p>
  
  <p>Many thanks for any thoughts or ideas.</p>