如何将JE改为JNE

时间:2017-12-03 05:36:45

标签: assembly gdb reverse-engineering

我正在使用gdb 我有这个:

0x00000000004006d0 <+106>:  callq  0x400540 <strcmp@plt>
0x00000000004006d5 <+111>:  test   %eax,%eax
0x00000000004006d7 <+113>:  je     0x400725 <main+191>
0x00000000004006d9 <+115>:  mov    $0x4007c8,%esi
0x00000000004006de <+120>:  mov    $0x400858,%edi
0x00000000004006e3 <+125>:  callq  0x400560 <fopen@plt>
0x00000000004006e8 <+130>:  mov    %rax,-0x10(%rbp)
0x00000000004006ec <+134>:  mov    -0x10(%rbp),%rdx
0x00000000004006f0 <+138>:  lea    -0x60(%rbp),%rax
0x00000000004006f4 <+142>:  mov    $0x40,%esi
设置{unsigned char *} 0x00000000004006d7 = 0x75后

它变成了这个:

0x00000000004006d0 <+106>:  callq  0x400540 <strcmp@plt>
0x00000000004006d5 <+111>:  test   %eax,%eax
0x00000000004006d7 <+113>:  jne    0x4006d9 <main+115>
0x00000000004006d9 <+115>:  add    %al,(%rax)
0x00000000004006db <+117>:  add    %al,(%rax)
0x00000000004006dd <+119>:  add    %al,(%rax)
0x00000000004006df <+121>:  pop    %rax
0x00000000004006e0 <+122>:  or     %al,0x0(%rax)
0x00000000004006e3 <+125>:  callq  0x400560 <fopen@plt>
0x00000000004006e8 <+130>:  mov    %rax,-0x10(%rbp)
0x00000000004006ec <+134>:  mov    -0x10(%rbp),%rdx
0x00000000004006f0 <+138>:  lea    -0x60(%rbp),%rax
0x00000000004006f4 <+142>:  mov    $0x40,%esi

我做错了什么?

0 个答案:

没有答案