I'm taking a security course and am having trouble understanding this code due to a lack of understanding of the C programming language.
printf ("%08x.%08x.%08x.%08x|%s|");
I was told that this code should move along the stack until a pointer to a function is found.
I thought the .
was just an indicator of precision of output, so I don't know what this means in this context since there are indicators of precision?
Also, I don't understand what the |
means, and I can't find it in the C documentation.
The symbols have no special meaning here since they are outside of a format specifier, they are simply output literally. Note however that you haven't provided all the arguments that printf expects so it will instead print 5 values that happen to be on the stack.
In this string the . and | characters are just outputted. The dots acted as separators for hex strings and the pipes highlighting a string.
The dots are only considered an indicator of precession if they appear after the % sign and before the format specifier, for example %4.2f
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With