Executing machine code in memory

后端 未结 9 1475
盖世英雄少女心
盖世英雄少女心 2020-12-04 12:47

I\'m trying to figure out how to execute machine code stored in memory.

I have the following code:

#include 
#include          


        
9条回答
  •  伪装坚强ぢ
    2020-12-04 13:12

    You can dlopen() a file, look up the symbol "main" and call it with 0, 1, 2 or 3 arguments (all of type char*) via a cast to pointer-to-function-returning-int-taking-0,1,2,or3-char*

提交回复
热议问题