Machine code transfer into assembly code

时间:2023-01-14 03:16:05
#include <stdio.h>
const char shell[]="\x0f\x01\xf8\xe8\5\0\0\0\x0f\x01\xf8\x48\xcf";
int main(){ }

$ gcc -o disassembly disassembly.c

$ objdump -D disassembly | less

$ /shell

08048410 <shell>:
 8048410:       0f 01 f8                swapgs 
 8048413:       e8 05 00 00 00          call   804841d <shell+0xd>
 8048418:       0f 01 f8                swapgs 
 804841b:       48                      dec    %eax
 804841c:       cf                      iret   
     ...     

或用 http://www.onlinedisassembler.com/odaweb/

輸入 0F01F8E8050000000F01F848CF 不要有空白不然出不來啊!!!