PAYDAY 2 Lua

Durum
Üzgünüz bu konu cevaplar için kapatılmıştır...
I Love MH
Seçkin Üye
Katılım
1 Mar 2020
Mesajlar
405
Tepki puanı
29
Ödüller
3
Yaş
25
6 HİZMET YILI
Kod:
#include "stdafx.h"
 
lua_State* g_L = NULL;
 
typedef lua_State* (__cdecl* lua_newstate_t)(lua_Alloc f, void *ud);
typedef int (__cdecl* luaL_loadstring_t)(lua_State *L, const char *s);
typedef int (__cdecl* lua_pcall_t)(lua_State* L, int nargs, int nresults, int errfunc);
typedef int (__cdecl* luaL_loadbuffer_t)(lua_State *L, const char *buff, size_t size, const char *name);
 
lua_newstate_t plua_newstate = NULL;
luaL_loadstring_t pluaL_loadstring = (luaL_loadstring_t) 0x007BBCA0;
lua_pcall_t plua_pcall = (lua_pcall_t) 0x007ACA70;
luaL_loadbuffer_t pluaL_loadbuffer = (luaL_loadbuffer_t) 0x007BBC40;
 
lua_State* new_lua_newstate(lua_Alloc f, void* ud)
{
    lua_State* L = plua_newstate(f, ud);
 
    if((DWORD)f != 0x761630)
    {
        gApp.AddToLogFileA("p.log", "State Created (0x%X) -> (0x%X) -> (0x%X)", f, L, _ReturnAddress());
        gApp.AddToLogFileA("p.log", "State Values (0x%X, 0x%X, 0x%X)", L->size_ci, L->stacksize, L->base_ci->func->tt);
 
        g_L = L;
    }
 
    return L;
}
 
 
void exec(char* s)
{
    gApp.AddToLogFileA("p.log", "Executing buffer...");
 
    //Load
    //int r1 = pluaL_loadstring(g_L, s);
    int r1 = pluaL_loadbuffer(g_L, s, strlen(s), NULL);
 
    if(r1 != 0)
    {
        if( LUA_ERRSYNTAX == r1 )
        {
            gApp.AddToLogFileA( "p.log", "Error loading Lua code into buffer with name (Syntax Error)" );
        }
        else if( LUA_ERRMEM == r1 )
        {
            gApp.AddToLogFileA( "p.log", "Error loading Lua code into buffer with name (Memory Allocation Error)" );
        }
        else
        {
            gApp.AddToLogFileA( "p.log", "Error loading Lua code into buffer with name (%i)", r1 );
        }
 
        return;
    }
 
    gApp.AddToLogFileA("p.log", "Load Success!");
 
    //Call
    int r2 = plua_pcall(g_L, 0, -1, 0);
 
    if(r2 != 0)
    {
        if( LUA_ERRRUN == r2 )
        {
            gApp.AddToLogFileA( "lua.log", "Error calling Lua code with name (Runtime Error)" );
        }
        else if( LUA_ERRMEM == r2 )
        {
            gApp.AddToLogFileA( "lua.log", "Error calling Lua code with name (Memory Allocation Error)" );
        }
        else if( LUA_ERRERR == r2 )
        {
            gApp.AddToLogFileA( "lua.log", "Error calling Lua code with name (Error while running error handler)" );
        }
        else
        {
            gApp.AddToLogFileA( "lua.log", "Error calling Lua code with name (%i)", r2 );
        }
 
        return;
    }
 
    gApp.AddToLogFileA("p.log", "Call Success!");
}
 
DWORD WINAPI lpLuaThread(LPVOID lpParam)
{
    while(true)
    {
        if(GetAsyncKeyState(VK_INSERT) & 1)
        {
            gApp.AddToLogFileA("p.log", "Lua key...");
 
            exec("dofile(\"s0beit.lua\")");
        }
 
        Sleep(100);
    }
 
    return 0;
}
 
BOOL APIENTRY DllMain( HMODULE hModule, DWORD dwReason, LPVOID lpReserved )
{
    if(dwReason == DLL_PROCESS_ATTACH)
    {
        gApp.BaseUponModule(hModule);
        gApp.AddToLogFileA("p.log", "PAYDAY 2 LUA HACK INITIALIZE");
 
        plua_newstate = (lua_newstate_t) DetourFunction((BYTE*) 0x007AB7D0, (BYTE*) new_lua_newstate);
 
        CreateThread(0, 0, lpLuaThread, 0, 0, 0);
    }
 
    return TRUE;
}
 
Moderatörün son düzenlenenleri:
I Love MH
Seçkin Üye
Katılım
1 Mar 2020
Mesajlar
405
Tepki puanı
29
Ödüller
3
Yaş
25
6 HİZMET YILI
sorry
 
Ultra Üye
Katılım
28 Nis 2019
Mesajlar
1,612
Çözümler
6
Tepki puanı
133
Ödüller
10
Yaş
31
7 HİZMET YILI
thanks for share
 
♥»尊敬«♥
Süper Üye
Katılım
28 Şub 2020
Mesajlar
1,444
Çözümler
4
Tepki puanı
222
Ödüller
5
Yaş
27
6 HİZMET YILI
Thank you :)
 
Siren
Süper Üye
Katılım
20 Eyl 2018
Mesajlar
604
Çözümler
1
Tepki puanı
31
Ödüller
6
7 HİZMET YILI
script doing what ?
 
lost massage
Uzman Üye
Katılım
16 Şub 2018
Mesajlar
296
Çözümler
2
Tepki puanı
67
Ödüller
7
8 HİZMET YILI
This uses cheat engine
 
Seçkin Üye
Katılım
17 Mar 2020
Mesajlar
298
Tepki puanı
26
Ödüller
5
Yaş
27
6 HİZMET YILI
What is this for? I can deduce that is injecting something , but what ?
 
Infinite
Seçkin Üye
Katılım
17 Mar 2018
Mesajlar
339
Çözümler
1
Tepki puanı
37
Ödüller
6
8 HİZMET YILI
now i cant rob bank properly
 
Durum
Üzgünüz bu konu cevaplar için kapatılmıştır...
Üst