Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <windows.h>
- #include <iostream>
- #include <fstream>
- #include <stdio.h>
- using namespace std; //need for the logging func
- ofstream infile; //need for the logging func
- #define WIN32_LEAN_AND_MEAN
- #define _CRT_SECURE_NO_WARNINGS
- char *GetDirectoryFile(char *filename); //getdirfile for the logging func
- void __cdecl add_log (const char * fmt, ...); //the logging func
- void thethread(); //the main function
- char dlldir[320];
- DWORD adrNores,adrDefuse,dwJaz,adrInvic,dwSize, dwStartAddress, ResultDefuse ,ResultResBom=0;
- LPTSTR i3engine = "PointBlank.i3Exec";
- char *GetDirectoryFile(char *filename)//get the directory of the dll
- {
- static char path[320];
- strcpy(path, dlldir);
- strcat(path, filename);
- return path;
- }
- void __cdecl Writelog (const char *fmt, ...)//the add log func
- {
- if(infile != NULL)
- {
- if(!fmt) { return; }
- va_list va_alist;
- char logbuf[256] = {0};
- va_start (va_alist, fmt);
- _vsnprintf (logbuf+strlen(logbuf), sizeof(logbuf) - strlen(logbuf), fmt, va_alist);
- va_end (va_alist);
- infile << logbuf << endl;
- }
- }
- bool Match(const BYTE* pData, const BYTE* bMask, const char* szMask)
- {
- for(;*szMask;++szMask,++pData,++bMask)
- if(*szMask=='x' && *pData!=*bMask )
- return false;
- return (*szMask) == NULL;
- }
- DWORD FindPattern(DWORD dwAddress,DWORD dwLen,BYTE *bMask,char * szMask)
- {
- for(DWORD i=0; i < dwLen; i++)
- if( Match( (BYTE*)( dwAddress+i ),bMask,szMask) )
- return (DWORD)(dwAddress+i);
- return 0;
- }
- bool Ready(void)
- {
- if( GetModuleHandle(i3engine) != NULL )
- return true;
- return false;
- }
- void SearchPatterns(void)
- {
- //while (!Ready())
- Sleep(500);
- dwStartAddress = 0x400000;
- do {
- dwStartAddress = (DWORD)GetModuleHandle(i3engine);
- Sleep(100);
- }while(!dwStartAddress);
- dwSize = 0x500000;
- DWORD Defuse = FindPattern(dwStartAddress,dwSize,(PBYTE)"\xC7\x05\x58\x2F\x4C\x10\x01\x00\x00\x00\x6A\x00\x68\xF8","xxxxxxxxxx");
- ResultDefuse = Defuse - dwStartAddress;
- Writelog(" HantuLoggerBySalomoq ");
- Writelog(" from ");
- Writelog(" Ghostghostghostghostghostghostghostghostghostghost ");
- Writelog("/*Copy Paste hasil log ini ke SC");
- Writelog(" ");
- Writelog("#define OFS_DEFUSE 0x%X", ResultDefuse);
- Writelog(" ");
- Writelog("//END C&P KE ADDYS");
- Writelog(" ");
- Writelog(" Credit : -Salomo ");
- Writelog("* -ApaSaja ");
- Writelog(" Blom Lunas ");
- Writelog("* Coz masih COPO...wkwkw ");
- Beep(1000, 500);
- ExitProcess(0);
- }
- BOOL WINAPI DllMain ( HMODULE hAdd, DWORD dwReason, LPVOID lpReserved )
- {
- DisableThreadLibraryCalls(hAdd);
- if (dwReason==DLL_PROCESS_ATTACH)
- {
- MessageBox (0, HantuLoggerBySalomo !","xxxx", MB_OK | MB_ICONINFORMATION);
- CreateThread(NULL, NULL, (LPTHREAD_START_ROUTINE)SearchPatterns, NULL, NULL, NULL);
- GetModuleFileName(hAdd, dlldir, 512);
- for(int i = strlen(dlldir); i > 0; i--) { if(dlldir[i] == '\\') { dlldir[i+1] = 0; break;}}
- infile.open(GetDirectoryFile("XaLomo.txt"), ios::out);
- }
- return TRUE;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement