C printf formatting: what is "." and "|" mean in this context?

I am taking a security course and it is difficult for me to understand 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 function pointer is found.

I thought that . was just an indicator of the accuracy of the output, so I don’t know what this means in this context, since there are indicators of accuracy?

In addition, I do not understand what | , and I cannot find it in the C documentation.

+6
source share
2 answers

The characters here have no special meaning, since they are outside the format specifier, they are simply displayed literally. Please note, however, that you did not specify all the arguments that printf expects, so instead 5 values ​​that are on the stack will be printed.

+6
source

In this line. and | characters are simply displayed. Dots acted as delimiters for hex strings, and pipes highlighted a string.

Points are considered indicators of precession if they appear after the% sign and before the format specifier, for example %4.2f .

+2
source

All Articles