我必须找到正确的输入,以分散实验室的这一阶段。我是组装的新手,所以仍然很难。
我到这为止了。如果我做对了,输入的将是2个数字,第一个可能是0。我被困在从那里去的地方。
(gdb)x / s 0x40278d
0x40278d:“%d%d”
(gdb)x / d $ rsp + 0xc
0x7fffffffe344:0
(gdb)disas
这是下面的完整代码。
断点6,在phase_3()中为0x0000000000400f47
(gdb)disas
函数phase_3的汇编代码转储:
=> 0x0000000000400f47 <+0>:子$ 0x18,%rsp
0x0000000000400f4b <+4>:lea 0x8(%rsp),%rcx
0x0000000000400f50 <+9>:lea 0xc(%rsp),%rdx
0x0000000000400f55 <+14>:mov $ 0x40278d,%esi
0x0000000000400f5a <+19>:mov $ 0x0,%eax
0x0000000000400f5f <+24>:callq 0x400c10 <__ isoc99_sscanf @ plt>
0x0000000000400f64 <+29>:cmp $ 0x1,%eax
0x0000000000400f67 <+32>:jg 0x400f6e
0x0000000000400f69 <+34>:callq 0x401514
0x0000000000400f6e <+39>:cmpl $ 0x7,0xc(%rsp)
0x0000000000400f73 <+44>:ja 0x400fb1
0x0000000000400f75 <+46>:mov 0xc(%rsp),%eax
0x0000000000400f79 <+50>:jmpq * 0x4024c0(,%rax,8)
0x0000000000400f80 <+57>:mov $ 0x123,%eax
0x0000000000400f85 <+62>:jmp 0x400fc2
0x0000000000400f87 <+64>:mov $ 0x195,%eax
0x0000000000400f8c <+69>:jmp 0x400fc2
0x0000000000400f8e <+71>:mov $ 0xa7,%eax
0x0000000000400f93 <+76>:jmp 0x400fc2
0x0000000000400f95 <+78>:mov $ 0xa1,%eax
0x0000000000400f9a <+83>:jmp 0x400fc2
0x0000000000400f9c <+85>:mov $ 0x16d,%eax
0x0000000000400fa1 <+90>:跳0x400fc2
0x0000000000400fa3 <+92>:mov $ 0x313,%eax
0x0000000000400fa8 <+97>:jmp 0x400fc2
0x0000000000400faa <+99>:mov $ 0x132,%eax
0x0000000000400faf <+104>:jmp 0x400fc2
0x0000000000400fb1 <+106>:callq 0x401514
0x0000000000400fb6 <+111>:mov $ 0x0,%eax
0x0000000000400fbb <+116>:跳0x400fc2
0x0000000000400fbd <+118>:mov $ 0x1c0,%eax
0x0000000000400fc2 <+123>:cmp 0x8(%rsp),%eax
0x0000000000400fc6 <+127>:je 0x400fcd
0x0000000000400fc8 <+129>:callq 0x401514
0x0000000000400fcd <+134>:添加$ 0x18,%rsp
0x0000000000400fd1 <+138>:retq
汇编程序转储结束。