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.  
  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. DWORD GetModuleBaseExtern( DWORD dwPID, char* szModuleName )
  21. {
  22. HANDLE hModuleSnap = INVALID_HANDLE_VALUE;
  23. MODULEENTRY32 me32;
  24.  
  25. hModuleSnap = CreateToolhelp32Snapshot( TH32CS_SNAPMODULE, dwPID );
  26. if ( hModuleSnap == INVALID_HANDLE_VALUE )
  27. return 0x0;
  28.  
  29. me32.dwSize = sizeof( MODULEENTRY32 );
  30.  
  31. if ( !Module32First( hModuleSnap, &me32 ) )
  32. {
  33. CloseHandle( hModuleSnap );
  34. return 0x0;
  35. }
  36. do
  37. {
  38. if ( strstr( me32.szModule, szModuleName ) )
  39. {
  40. CloseHandle( hModuleSnap );
  41. return (DWORD)me32.modBaseAddr;
  42. }
  43. }
  44. while( Module32Next( hModuleSnap, &me32 ) );
  45.  
  46. CloseHandle( hModuleSnap );
  47. return 0x0;
  48. }
  49.  
  50. struct sGameWindow
  51. {
  52. HWND hWindow;
  53. };
  54.  
  55. sGameWindow GameWindow;
  56.  
  57. int main()
  58. {
  59. cout << "Triggerbot" << endl << "by Santo" << endl << endl;
  60.  
  61. while( !(GameWindow.hWindow = FindWindow(NULL, "Counter-Strike Source")) )
  62. {
  63. Sleep(10);
  64. cout << "searching Counter-Strike Source";
  65. }
  66. cout << "Counterstrike Source found " << endl;
  67.  
  68. SetForegroundWindow( GameWindow.hWindow );
  69.  
  70. while( !( GetForegroundWindow() == GameWindow.hWindow ) )
  71. {
  72. Sleep(10);
  73. }
  74.  
  75. GetWindowThreadProcessId( GameWindow.hWindow, &dwPID );
  76.  
  77. while( !( hProcess = OpenProcess( PROCESS_ALL_ACCESS, false, dwPID ) ) )
  78. {
  79. Sleep(10);
  80. }
  81.  
  82.  
  83. while( !( dwClient_DLL = GetModuleBaseExtern( dwPID, "client.dll" ) ) )
  84. {
  85. Sleep(10);
  86. }
  87. printf ( "[*] client.dll [0x%.8X]\n", dwClient_DLL );
  88. cout << "if client.dll is not 0x38000000 hack won't work!??!" << endl;
  89. cout << "in this case please contact the coder" << endl;
  90.  
  91. cout << "..." << endl;
  92.  
  93.  
  94. ReadProcessMemory( hProcess, (PVOID)( 0x905A4D + 0x7063E4 ), &m_dwAddress, 4, NULL );
  95. cout<<"gelesen: "<<m_dwAddress <<endl;
  96.  
  97. ReadProcessMemory( hProcess, (PVOID)( m_dwAddress + 0x90 ), &m_iLookAtPlayer, 4, NULL );
  98. printf ( "Look at: %u", m_iLookAtPlayer );
  99.  
  100.  
  101. cin >> x;
  102.  
  103. return 0;
  104. }
  105.  

achja client.dll ist glaubich nicht 905A4D weil wenn ich in CE nen pointer mit engine.dll mach, grieg ich auch diese addresse 905A4D!!