Link to home
Start Free TrialLog in
Avatar of gudni12345
gudni12345

asked on

Bomb lab phase_5

So I'm working on phase_5 now. As far as I understand, I think this requires a string of 6 chars, and each char has a specific number/value that represents the char.
I think I need fo find a string in the assembly code I decipe it with the values I have found already.
But how can find this six char string.

They are propably in an array  :  0x804a100 <array.2967>  
but I dont find the string or mabay I need to find some numbers and convert them to char wirh ASCII
where should I look for the numbers.?


Dump of assembler code for function phase_5:
   0x08048d4e <+0>:     push   %ebp
   0x08048d4f <+1>:     mov    %esp,%ebp
   0x08048d51 <+3>:     push   %edi
   0x08048d52 <+4>:     push   %esi
   0x08048d53 <+5>:     push   %ebx
   0x08048d54 <+6>:     sub    $0x1c,%esp
   0x08048d57 <+9>:     mov    0x8(%ebp),%ebx
   0x08048d5a <+12>:    mov    %ebx,(%esp)
   0x08048d5d <+15>:    call   0x8048ed0 <string_length>
   0x08048d62 <+20>:    cmp    $0x6,%eax
   0x08048d65 <+23>:    je     0x8048d6c <phase_5+30>
   0x08048d67 <+25>:    call   0x80490e8 <explode_bomb>
   0x08048d6c <+30>:    mov    $0x0,%edx
   0x08048d71 <+35>:    mov    $0x0,%eax
   0x08048d76 <+40>:    mov    $0x804a100,%ecx
   0x08048d7b <+45>:    movsbl (%ebx,%eax,1),%esi
   0x08048d7f <+49>:    and    $0xf,%esi
   0x08048d82 <+52>:    add    (%ecx,%esi,4),%edx
   0x08048d85 <+55>:    add    $0x1,%eax
   0x08048d88 <+58>:    cmp    $0x6,%eax
   0x08048d8b <+61>:    jne    0x8048d7b <phase_5+45>
   0x08048d8d <+63>:    cmp    $0x10,%edx
   0x08048d90 <+66>:    je     0x8048d97 <phase_5+73>
=> 0x08048d92 <+68>:    call   0x80490e8 <explode_bomb>
   0x08048d97 <+73>:    add    $0x1c,%esp
   0x08048d9a <+76>:    pop    %ebx
   0x08048d9b <+77>:    pop    %esi
   0x08048d9c <+78>:    pop    %edi
   0x08048d9d <+79>:    pop    %ebp
   0x08048d9e <+80>:    ret
End of assembler dump.

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of Infinity08
Infinity08
Flag of Belgium image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial