How it works...

In step 1, we run the ltrace tool against the ch08-SalesFigures binary. In step 2, we enter a bogus value for the password. As the program executes, we see the subsequent library calls, including the call to strcmp(). If we look closely, we can see that the strcmp() call contains the value we submitted in the gets() call and compares it to the ASCII version of the hardcoded password. Your output should resemble the following screenshot:

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.221.129.19