Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
462 views
in Technique[技术] by (71.8m points)

assembly - Understanding bomb lab

Hope you can help me to understand how I can find out the six numbers. Have tried couple set of numbers that I thought was the right ones but guess I′m not understanding it right.

So for the first, this six numbers that I'm looking for, isn′t it numbers that are the outcome or the number that I put in to fit to the code?

Do I have to go through all the code or are there just few lines that I can find out these numbers? Started to think that I'm over thinking it, that it′s much easier to find those numbers then the ways I′m trying.

08048b74 <phase_2>:
 8048b74:       53                      push   %ebx
 8048b75:       83 ec 38                sub    $0x38,%esp
 8048b78:       8d 44 24 18             lea    0x18(%esp),%eax
 8048b7c:       89 44 24 04             mov    %eax,0x4(%esp)
 8048b80:       8b 44 24 40             mov    0x40(%esp),%eax
 8048b84:       89 04 24                mov    %eax,(%esp)
 8048b87:       e8 28 07 00 00          call   80492b4 <read_six_numbers>
 8048b8c:       83 7c 24 18 00          cmpl   $0x0,0x18(%esp)
 8048b91:       79 22                   jns    8048bb5 <phase_2+0x41>
 8048b93:       e8 dd 06 00 00          call   8049275 <explode_bomb>
 8048b98:       eb 1b                   jmp    8048bb5 <phase_2+0x41>
 8048b9a:       89 d8                   mov    %ebx,%eax
 8048b9c:       03 44 9c 14             add    0x14(%esp,%ebx,4),%eax
 8048ba0:       39 44 9c 18             cmp    %eax,0x18(%esp,%ebx,4)
 8048ba4:       74 05                   je     8048bab <phase_2+0x37>
 8048ba6:       e8 ca 06 00 00          call   8049275 <explode_bomb>
 8048bab:       83 c3 01                add    $0x1,%ebx
 8048bae:       83 fb 06                cmp    $0x6,%ebx
 8048bb1:       75 e7                   jne    8048b9a <phase_2+0x26>
 8048bb3:       eb 07                   jmp    8048bbc <phase_2+0x48>
 8048bb5:       bb 01 00 00 00          mov    $0x1,%ebx
 8048bba:       eb de                   jmp    8048b9a <phase_2+0x26>
 8048bbc:       83 c4 38                add    $0x38,%esp
 8048bbf:       5b                      pop    %ebx
 8048bc0:       c3                      ret
See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...