代码1
C提交
#include <stdio.h> int main() { __asm { call _ and eax,0x642564 and eax,0x0a64 _: pop edi mov esi,edi add esi,5 __: add ebp,0x0c push ebp sub ebp,4 push ebp push edi call scanf add esp,0xc not eax test eax,eax jz ___ mov eax,dword ptr [ebp] add eax,dword ptr [ebp + 4] push eax push esi call printf add esp,8 sub ebp,8 jmp __ ___: } }
代码2
gcc提交
#include <stdio.h> __attribute__((section(".text"))) main[] = {0x56EC8B55,0x000AE857,0x64250000,0x25006425, 0x00000A64,0x83F78B5F,0xC58305C6,0xED83550C,0xB8575504,scanf,0xC483D0FF,0x85D0F70C, 0x8B1774C0,0x45030045,0xB8565004,printf,0xC483D0FF,0x08ED8308,0x5E5FD0EB,0x9090C35D};