Artificial truth

archives | latest | homepage | atom/rss/twitter

The more you see, the less you believe.

Feed binary stdin from inside gdb
Tue 28 May 2013 — download

Maybe you ever wanted to do something like

python -c "print '\x41'*36" | binary

from inside GDB ?

Here are some solutions:

r < <(python -c "print '\x41'*36" | binary)
r <<< $(python -c "print '\x41'*36")

And, as a bonus for the < <() trick:

19:24 <%noname> diff <(cmd1) <(cmd2)
19:24 <%noname> it diffs outputs of cmd1 and cmd2