函数定位,函数转shellcode

void MessageBX() //事例函数
{
    HWND hwnd=NULL;
    char message[]="haohao ";
    char message2[]="hehe ";
    int b=0;
    MessageBox(hwnd,message,message2,b);

}

void FunctionToShellCode(void * fun)  //转换函数
{
    unsigned char *s=(unsigned char *)fun;
    printf("Shellcode Start \n");
    while (1)
    {
        printf("\\x%x", *s);
        if (*s==0xC3)
        {
            break;
        }
        s++;
    }
    printf("\nShellcode End \n");
}

posted @ 2010-04-11 13:06  Yan Zhe  阅读(220)  评论(0编辑  收藏  举报