OldSchoolHack

Registrieren / Anmelden Deutsch

Wunsch für Tut - Adresslogger

icon Thema: Wunsch für Tut - Adresslogger

Anmeldungsdatum: Aug 2007

Beiträge: 8643

Benutzer-Bewertung:

199 positiv
33 negativ
Credits: Gordon

TEXT Code:
  1. #include <windows.h>
  2. #include <tlhelp32.h>
  3. #include <conio.h>
  4. #include <iostream>
  5.  
  6. using namespace std;
  7.  
  8. HANDLE hProcess = NULL;
  9. DWORD dwStartAddress = 0;
  10. DWORD dwCurrentAddress = 0;
  11. DWORD dwSize = 0;
  12. BYTE Read[200] = {0};
  13. bool bFound[100] = {0};
  14.  
  15. bool strstri(const char* a, const char* b)
  16. {
  17. char szBuffer1[1024] = "";
  18. char szBuffer2[1024] = "";
  19.  
  20. for(int i = 0; i < strlen(a); i++)
  21. szBuffer1[i] = tolower(a[i]);
  22.  
  23. for(int i = 0; i < strlen(b); i++)
  24. szBuffer2[i] = tolower(b[i]);
  25.  
  26. return strstr(szBuffer1, szBuffer2);
  27. }
  28.  
  29. bool GetWarrock()
  30. {
  31. HANDLE hModule = NULL;
  32. PROCESSENTRY32 pe32 = {0};
  33. pe32.dwSize = sizeof(PROCESSENTRY32);
  34.  
  35. while(1)
  36. {
  37. hModule = CreateToolhelp32Snapshot(0x2, 0);
  38. if(!hModule || hModule == (HANDLE)-1)
  39. return 0;
  40.  
  41. if(!Process32First(hModule, &pe32))
  42. {
  43. CloseHandle(hModule);
  44. return 0;
  45. }
  46.  
  47. do
  48. {
  49. if(strstri(pe32.szExeFile, "warrock"))
  50. {
  51. Sleep(1000);
  52. CloseHandle(hModule);
  53. hProcess = OpenProcess(PROCESS_ALL_ACCESS, false, pe32.th32ProcessID);
  54. MODULEENTRY32 me32 = {0};
  55. me32.dwSize = sizeof(MODULEENTRY32);
  56. while(1)
  57. {
  58. hModule = CreateToolhelp32Snapshot(0x8, pe32.th32ProcessID);
  59. if(!hModule || hModule == (HANDLE)-1)
  60. return 0;
  61.  
  62. if(!Module32First(hModule, &me32))
  63. {
  64. CloseHandle(hModule);
  65. return 0;
  66. }
  67.  
  68. do
  69. {
  70. if(strstri(me32.szModule, "warrock"))
  71. {
  72. dwStartAddress = (DWORD)me32.modBaseAddr;
  73. dwSize = me32.modBaseSize;
  74. CloseHandle(hModule);
  75. return 1;
  76. }
  77. Sleep(10);
  78. }
  79. while(Module32Next(hModule, &me32));
  80. Sleep(10);
  81. }
  82. }
  83. Sleep(10);
  84. }
  85. while(Process32Next(hModule, &pe32));
  86.  
  87. Sleep(20);
  88. }
  89.  
  90. return 0;
  91. }
  92.  
  93. char mskPlayerPointer[] = "\xA1\xFF\xFF\xFF\xFF\x56\x50\xE8";
  94.  
  95. void AddSig(char* szSig, int iCorrection, bool isPtr, char* szName, int iIndex)
  96. {
  97. if(bFound[iIndex])
  98. goto end;
  99.  
  100. for(int i = 0; i < strlen(szSig); i++)
  101. {
  102. if((BYTE)szSig[i] == 0xFF)
  103. goto endfor;
  104.  
  105. if((BYTE)szSig[i] != Read[i+100])
  106. goto end;
  107.  
  108. endfor:;
  109. }
  110.  
  111. dwCurrentAddress += 100 + iCorrection;
  112.  
  113. if(isPtr)
  114. {
  115. DWORD dwReadValue = 0;
  116. ReadProcessMemory(hProcess, (void*)dwCurrentAddress, &dwReadValue, 4, 0);
  117. printf("%s: %X\n", szName, dwReadValue);
  118. }
  119. else
  120. {
  121. printf("%s: %X\n", szName, dwCurrentAddress);
  122. }
  123.  
  124. bFound[iIndex] = true;
  125.  
  126. end:;
  127. }
  128.  
  129.  
  130. int main()
  131. {
  132. DWORD dwProcessId = GetWarrock();
  133. printf("Startaddress: %X\nSize: %X\n", dwStartAddress, dwSize);
  134.  
  135. if(!hProcess || hProcess == (HANDLE)-1)
  136. {
  137. printf("Error while opening process...\n");
  138. goto end;
  139. }
  140.  
  141. for(int i = 0; i < dwSize/6; i++)
  142. {
  143. if(ReadProcessMemory(hProcess, (void*)(dwStartAddress + i), &Read, 200, 0))
  144. {
  145. dwCurrentAddress = dwStartAddress + i;
  146. AddSig(mskPlayerPointer, 1, true, "Playerpointer", 1);
  147. }
  148. else
  149. {
  150. printf("Reading failed - process terminated?\n");
  151. goto end;
  152. }
  153. }
  154.  
  155. end:;
  156. getch();
  157. return 0;
  158. }

greetz KN4CK3R

__________________

Hallo