break getPassword
Breakpoint 1 at 0x80484a1: file test.c, line 13.
gdb > run
eax:B7FBCDBC ebx:00000000 ecx:BFFFEFC0 edx:BFFFEFE4 eflags:00000286
esi:B7FBB000 edi:B7FBB000 esp:BFFFEF60 ebp:BFFFEF78 eip:080484A1
cs:0073 ds:007B es:007B fs:0000 gs:0033 ss:007B o d I t S z a P c
[007B:BFFFEF60]---------------------------------------------------------[stack]
BFFFEF90 : 01 00 00 00 54 F0 FF BF - 5C F0 FF BF 71 85 04 08 ....T...\...q...
BFFFEF80 : 05 00 00 00 00 00 80 00 - 50 7A E3 B7 9B 85 04 08 ........Pz......
BFFFEF70 : 01 00 00 00 00 40 00 00 - A8 EF FF BF 2C 85 04 08 .....@......,...
BFFFEF60 : FF FF FF FF 2F 00 00 00 - C8 5D E1 B7 58 68 FD B7 ..../....]..Xh..
[007B:B7FBB000]---------------------------------------------------------[ data]
B7FBB000 : B0 1D 1B 00 58 68 FD B7 - 20 00 FF B7 B6 06 E2 B7 ....Xh.. .......
B7FBB010 : C6 06 E2 B7 10 94 EA B7 - E6 06 E2 B7 70 8A E9 B7 ............p...
[0073:080484A1]---------------------------------------------------------[ code]
=> 0x80484a1 <getPassword+6>: sub $0xc,%esp
0x80484a4 <getPassword+9>: push $0x80485d0
0x80484a9 <getPassword+14>: call 0x8048360 <puts@plt>
0x80484ae <getPassword+19>: add $0x10,%esp
0x80484b1 <getPassword+22>: sub $0xc,%esp
0x80484b4 <getPassword+25>: lea -0x16(%ebp),%eax
------------------------------------------------------------------------------
Breakpoint 1, getPassword (x=0x5) at test.c:13
gdb > print main
$1 = {int ()} 0x8048507 <main>
gdb> print /x *buf@80
$2 = {0xff, 0xff, 0x2f, 0x0, 0x0, 0x0, 0xc8, 0x5d, 0xe1, 0xb7, 0x58, 0x68, 0xfd, 0xb7, 0x1, 0x0, 0x0, 0x0, 0x0, 0x40, 0x0, 0x0, 0xa8, 0xef, 0xff, 0xbf, 0x2c, 0x85, 0x4, 0x8, 0x5, 0x0, 0x0, 0x0, 0x0, 0x0, 0x80, 0x0, 0x50, 0x7a, 0xe3, 0xb7, 0x9b, 0x85, 0x4, 0x8, 0x1, 0x0, 0x0, 0x0, 0x54, 0xf0, 0xff, 0xbf, 0x5c, 0xf0, 0xff, 0xbf, 0x71, 0x85, 0x4, 0x8, 0xdc, 0xb3, 0xfb, 0xb7, 0xc0, 0xef, 0xff, 0xbf, 0x0, 0x0, 0x0, 0x0, 0x37, 0x16, 0xe2, 0xb7, 0x0, 0xb0, 0xfb, 0xb7, 0x0, 0xb0, 0xfb, 0xb7, 0x0, 0x0, 0x0, 0x0, 0x37, 0x16, 0xe2, 0xb7, 0x1, 0x0, 0x0, 0x0, 0x54, 0xf0, 0xff, 0xbf, 0x5c, 0xf0, 0xff, 0xbf, 0x0 <repeats 13 times>, 0xb0, 0xfb, 0xb7, 0x4, 0xfc, 0xff, 0xb7, 0x0, 0xf0}
gdb> print goodPassword
$3 = {void()} 0x80484e8
gdb > quit
|