Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- typedef int (*_luaL_ls)(void *L, const char *s);
- typedef int (*_lua_pcall)(void *L, int nargs, int nresults, int errfunc);
- g_luaL_loadstring = (_luaL_ls)GetProcAddress(lua_shared, "luaL_loadstring");
- if (g_luaL_loadstring == 0)
- MessageBoxA(0, "Failed to get luaL_loadstring address!", "bomb_bypass error", 0);
- g_lua_pcall = (_lua_pcall)GetProcAddress(lua_shared, "lua_pcall");
- if (g_lua_pcall == 0)
- MessageBoxA(0, "Failed to get lua_pcall address!", "bomb_bypass error", 0);
- g_luaL_loadstring((void*)state, "SOME LUA BRO");
- int err = g_lua_pcall((void*)state, 0, LUA_MULTRET, 0);
- if (err == 1)
- printf("lua_pcall returned error. Failed to execute.\n");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement