OldSchoolHack

Registrieren / Anmelden Deutsch

[CS:S] externer Triggerbot

icon Thema: [CS:S] externer Triggerbot

Anmeldungsdatum: Jan 2012

Beiträge: 26

CPP Code:
  1. // triggerbot.cpp : Definiert den Einstiegspunkt für die Konsolenanwendung.
  2. //
  3. #include "stdafx.h"
  4. #include <iostream>
  5. #include <windows.h>
  6. #include <conio.h>
  7. #include <tlhelp32.h>
  8.  
  9. using namespace std;
  10.  
  11. DWORD dwPID = 0;
  12. HANDLE hProcess;
  13. DWORD m_dwAddress;
  14. DWORD dwClient_DLL;
  15. DWORD dwEngine_DLL;
  16. int m_iLookAtPlayer;
  17. int x;
  18. DWORD GetModuleBaseExtern( DWORD dwPID, char* szModuleName );
  19.  
  20. struct sGameWindow
  21. {
  22. HWND hWindow;
  23. };
  24.  
  25. sGameWindow GameWindow;
  26.  
  27. int main()
  28. {
  29. cout << "Triggerbot" << endl << "by Santo" << endl << endl;
  30.  
  31. while( !(GameWindow.hWindow = FindWindow(NULL, "Counter-Strike Source")) )
  32. {
  33. Sleep(10);
  34. cout << "searching Counter-Strike Source";
  35. }
  36. cout << "Counterstrike Source found " << endl;
  37.  
  38. SetForegroundWindow( GameWindow.hWindow );
  39.  
  40. while( !( GetForegroundWindow() == GameWindow.hWindow ) )
  41. {
  42. Sleep(10);
  43. }
  44.  
  45. GetWindowThreadProcessId( GameWindow.hWindow, &dwPID );
  46.  
  47. while( !( hProcess = OpenProcess( PROCESS_ALL_ACCESS, false, dwPID ) ) )
  48. {
  49. Sleep(10);
  50. }
  51.  
  52. while( !( dwEngine_DLL = GetModuleBaseExtern( dwPID, "engine" ) ) )
  53. {
  54. Sleep(10);
  55. }
  56. printf ( "[*] engine.dll [0x%.8X]\n", dwEngine_DLL );
  57. while( !( dwClient_DLL = GetModuleBaseExtern( dwPID, "client" ) ) )
  58. {
  59. Sleep(10);
  60. }
  61. printf ( "[*] client.dll [0x%.8X]\n", dwClient_DLL );
  62. cout << "if client.dll is not 0x38000000 hack won't work" << endl;
  63. cout << "in this case please contact the coder" << endl;
  64.  
  65. cout << "..." << endl;
  66.  
  67. ReadProcessMemory( hProcess, (PVOID)( dwClient_DLL + 0x16Cb0968 ), &m_dwAddress, 4, NULL );
  68.  
  69. while( 1 == 1 )
  70. {
  71. ReadProcessMemory( hProcess, (PVOID)( m_dwAddress + 0x1450 ), &m_iLookAtPlayer, 4, NULL );
  72. printf ( "Look at: %u", m_iLookAtPlayer );
  73. }
  74.  
  75. cin >> x;
  76.  
  77. return 0;
  78. }
  79. DWORD GetModuleBaseExtern( DWORD dwPID, char* szModuleName )
  80. {
  81. HANDLE hModuleSnap = INVALID_HANDLE_VALUE;
  82. MODULEENTRY32 me32;
  83.  
  84. hModuleSnap = CreateToolhelp32Snapshot( TH32CS_SNAPMODULE, dwPID );
  85. if ( hModuleSnap == INVALID_HANDLE_VALUE )
  86. return 0x0;
  87.  
  88. me32.dwSize = sizeof( MODULEENTRY32 );
  89.  
  90. if ( !Module32First( hModuleSnap, &me32 ) )
  91. {
  92. CloseHandle( hModuleSnap );
  93. return 0x0;
  94. }
  95. do
  96. {
  97. if ( strstr( me32.szModule, szModuleName ) )
  98. {
  99. CloseHandle( hModuleSnap );
  100. return (DWORD)me32.modBaseAddr;
  101. }
  102. }
  103. while( Module32Next( hModuleSnap, &me32 ) );
  104.  
  105. CloseHandle( hModuleSnap );
  106. return 0x0;
  107. }

Hat jemand ne Ahnung wieso ich immer den Wert 0 ausgegeben bekomme? Meine Addressen bzw Offsets stimmen!