Advertisement
Guest User

Untitled

a guest
Aug 12th, 2017
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.85 KB | None | 0 0
  1. #include <windows.h>
  2. #include <iostream>
  3. #include <fstream>
  4. #include <stdio.h>
  5.  
  6. using namespace std; //need for the logging func
  7. ofstream infile; //need for the logging func
  8. #define WIN32_LEAN_AND_MEAN
  9. #define _CRT_SECURE_NO_WARNINGS
  10.  
  11. char *GetDirectoryFile(char *filename); //getdirfile for the logging func
  12. void __cdecl add_log (const char * fmt, ...); //the logging func
  13. void thethread(); //the main function
  14. char dlldir[320];
  15. DWORD adrNores,adrDefuse,dwJaz,adrInvic,dwSize, dwStartAddress, ResultDefuse ,ResultResBom=0;
  16. LPTSTR i3engine = "PointBlank.i3Exec";
  17. char *GetDirectoryFile(char *filename)//get the directory of the dll
  18. {
  19. static char path[320];
  20. strcpy(path, dlldir);
  21. strcat(path, filename);
  22. return path;
  23. }
  24.  
  25.  
  26. void __cdecl Writelog (const char *fmt, ...)//the add log func
  27. {
  28. if(infile != NULL)
  29. {
  30. if(!fmt) { return; }
  31.  
  32. va_list va_alist;
  33. char logbuf[256] = {0};
  34.  
  35. va_start (va_alist, fmt);
  36. _vsnprintf (logbuf+strlen(logbuf), sizeof(logbuf) - strlen(logbuf), fmt, va_alist);
  37. va_end (va_alist);
  38.  
  39. infile << logbuf << endl;
  40. }
  41. }
  42. bool Match(const BYTE* pData, const BYTE* bMask, const char* szMask)
  43. {
  44. for(;*szMask;++szMask,++pData,++bMask)
  45. if(*szMask=='x' && *pData!=*bMask )
  46. return false;
  47. return (*szMask) == NULL;
  48. }
  49.  
  50.  
  51. DWORD FindPattern(DWORD dwAddress,DWORD dwLen,BYTE *bMask,char * szMask)
  52. {
  53. for(DWORD i=0; i < dwLen; i++)
  54. if( Match( (BYTE*)( dwAddress+i ),bMask,szMask) )
  55. return (DWORD)(dwAddress+i);
  56.  
  57. return 0;
  58. }
  59. bool Ready(void)
  60. {
  61. if( GetModuleHandle(i3engine) != NULL )
  62. return true;
  63. return false;
  64. }
  65.  
  66.  
  67. void SearchPatterns(void)
  68. {
  69. //while (!Ready())
  70. Sleep(500);
  71. dwStartAddress = 0x400000;
  72. do {
  73. dwStartAddress = (DWORD)GetModuleHandle(i3engine);
  74. Sleep(100);
  75. }while(!dwStartAddress);
  76. dwSize = 0x500000;
  77. DWORD Defuse = FindPattern(dwStartAddress,dwSize,(PBYTE)"\xC7\x05\x58\x2F\x4C\x10\x01\x00\x00\x00\x6A\x00\x68\xF8","xxxxxxxxxx");
  78. ResultDefuse = Defuse - dwStartAddress;
  79. Writelog(" HantuLoggerBySalomoq ");
  80. Writelog(" from ");
  81. Writelog(" Ghostghostghostghostghostghostghostghostghostghost ");
  82. Writelog("/*Copy Paste hasil log ini ke SC");
  83. Writelog(" ");
  84. Writelog("#define OFS_DEFUSE 0x%X", ResultDefuse);
  85. Writelog(" ");
  86. Writelog("//END C&P KE ADDYS");
  87. Writelog(" ");
  88. Writelog(" Credit : -Salomo ");
  89. Writelog("* -ApaSaja ");
  90. Writelog(" Blom Lunas ");
  91. Writelog("* Coz masih COPO...wkwkw ");
  92. Beep(1000, 500);
  93. ExitProcess(0);
  94. }
  95. BOOL WINAPI DllMain ( HMODULE hAdd, DWORD dwReason, LPVOID lpReserved )
  96. {
  97. DisableThreadLibraryCalls(hAdd);
  98. if (dwReason==DLL_PROCESS_ATTACH)
  99. {
  100. MessageBox (0, HantuLoggerBySalomo !","xxxx", MB_OK | MB_ICONINFORMATION);
  101. CreateThread(NULL, NULL, (LPTHREAD_START_ROUTINE)SearchPatterns, NULL, NULL, NULL);
  102. GetModuleFileName(hAdd, dlldir, 512);
  103. for(int i = strlen(dlldir); i > 0; i--) { if(dlldir[i] == '\\') { dlldir[i+1] = 0; break;}}
  104. infile.open(GetDirectoryFile("Wexley.txt"), ios::out);
  105.  
  106.  
  107. }
  108. return TRUE;
  109. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement