Testing a shellcode

前端 未结 2 401
小蘑菇
小蘑菇 2020-12-29 09:14

I have this piece of code to test a shellcode but I don\'t understand it so can anyone explain it to me?

Forget about the assembly shellcode, what I want to underst

2条回答
  •  生来不讨喜
    2020-12-29 09:50

    int (*func)(); is the definition of a pointer to a function with return type int, func = (int (*)()) shellcode; assigns a function pointer an address to the shellcode[] (assembler bytecode, the instructions your CPU executes), (int)(*func)(); calls the function by its address (assembler instructions) with no arguments passed, because () is specified. For example the assembler instruction \x90 has name NOP (N o Op eration) and does nothing, other assembler instructions do different things depending on the system you're executing them on.

提交回复
热议问题