New answers tagged

0

There are two things you should consider in this piece of code: The first one is the type of the variable pwStatus, the second one is the value of the strcmp return address. The goal is to overwrite the strcmp return address to make the pwStatus variable to be always true, because of pwStatus variable could only be true or false; So, if the ASCII code of one ...


2

As you have spotted, with %p it works as expected. The explanation at the source of your situation is that %x reads integers (whose size is 4 bytes) out from pointers (whose size is 8 bytes on your architecture). So, you are simply asking printf to read the first 4 bytes of the pointer, neglecting the rest 4. You may change your format to "0x%016lx" to ...


1

Moved from the question to an answer. Stephen was correct. This was very simple to check, I just changed the IV to be the correct length and the ciphertext remained the same. Hence, the extra byte is not used in the algorithm and somebody miscounted. Default IV: /* A 128 bit IV */ unsigned char *iv = (unsigned char *)"...


Top 50 recent answers are included