diff options
Diffstat (limited to '')
-rw-r--r-- | bruiser/executioner.h | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/bruiser/executioner.h b/bruiser/executioner.h index 4b8b651..0113d6c 100644 --- a/bruiser/executioner.h +++ b/bruiser/executioner.h @@ -56,6 +56,34 @@ namespace { // start of anonymous namespace return 0; } + inline void argInjector(lua_State* __ls) { + int numargs = lua_gettop(__ls); + for (int i = 2; i <= numargs; ++i) { + if (lua_type(__ls, i) == LUA_TBOOLEAN) { + } + else if (lua_type(__ls, i) == LUA_TLIGHTUSERDATA) { + } + else if (lua_type(__ls, i) == LUA_TNUMBER) { + } + else if (lua_type(__ls, i) == LUA_TSTRING) { +#ifdef __x86_64__ + asm volatile("movl %%eax, %0"); +#endif + } + else if (lua_type(__ls, i) == LUA_TTABLE) { + } + else if (lua_type(__ls, i) == LUA_TFUNCTION) { + } + else if (lua_type(__ls, i) == LUA_TUSERDATA) { + } + else if (lua_type(__ls, i) == LUA_TTHREAD) { + } + else { // type is nil + PRINT_WITH_COLOR_LB(RED, "you passed a Nil argument..."); + } + } + } + std::vector<uint8_t> arg_emitter(std::vector<uint8_t> _args) {} int LuaXobjWrapper(lua_State* __ls) { @@ -147,6 +175,16 @@ class Executioner { return std::make_pair(program_memory, code_size); } + std::vector<uint64_t> getAllArgs(lua_State* __ls) { + int numargs = lua_gettop(__ls); + std::vector<uint64_t> args; + + for (int i = 0; i < numargs; ++i) { + } + + return args; + } + void loadAll(void) { for (auto &iter : objs) { this->loadObjsInXMem(iter); |