diff options
author | bloodstalker <thabogre@gmail.com> | 2018-01-09 20:28:23 +0000 |
---|---|---|
committer | bloodstalker <thabogre@gmail.com> | 2018-01-09 20:28:23 +0000 |
commit | d26bd54a2aaa12e0273025acf175cefc84c74063 (patch) | |
tree | 6e81f44de2710f94d2e49f356b94b568fd82dfad /bruiser/executioner.h | |
parent | readme update [ci skip] (diff) | |
download | mutator-d26bd54a2aaa12e0273025acf175cefc84c74063.tar.gz mutator-d26bd54a2aaa12e0273025acf175cefc84c74063.zip |
update
Diffstat (limited to 'bruiser/executioner.h')
-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); |