Register for your free account! | Forgot your password?

Go Back   elitepvpers > Coders Den > General Coding
You last visited: Today at 14:56

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



[S4 League] Trainer Problem

Discussion on [S4 League] Trainer Problem within the General Coding forum part of the Coders Den category.

Reply
 
Old   #1
 
Σternαl.'s Avatar
 
elite*gold: 20
Join Date: Dec 2009
Posts: 1,850
Received Thanks: 484
[S4 League] Trainer Problem

Hallo Community,
ich hab nen Trainer für S4 League geschrieben, in C++.
S4 League wird durch XTrap geschützt, die Folge:
man kann keine Values per Cheat Engine finden (zumindest auf x32) und man
bekommt den Process Handle von S4 League nicht (Errorcode 5).

Da aber jemand in der S4 League Section einen Trainer in AutoIt geschrieben
hat, der auch auf x32 funktioniert, habe ich mir den Sourcecode von ihm besorgt
und ihn gefragt wie er es hingkrigt hat. Er sagte mir, dass er den Trainer vor
dem Start von S4 League startet und sobald S4 startet ändert sein Trainer die
Values, weil XTrap.xt ungefähr 1 Sekunde nach S4Client.exe gestartet wird.

Da hab ich mir gedacht, dass ich es auch so mache und mir sobald S4 offen ist
den Window Handle, dann die Process Id und schließlich den Process Handle hole,
um mit ReadProcessMemory und WriteProcessMemory das Value zu verändern.

Jedoch kommt beim Process Handle immernoch Errorcode 5 und ich wieß nicht woran das liegt.

English version
Hier mal der Source.
Here's the sourcecode.
PHP Code:
#include <windows.h>
#include <iostream>

using namespace std;

int main()
{
    
float a;

    
cout << "Type in the value! " << endl;
    
cin >> a;
    
    
HWND hwnd;
    do
    {
        
hwnd FindWindow(0,L"S4 Client");
        
Sleep(10);

    } while(!
hwnd);

    
cout << "Windowhandle: " << hwnd << endl;
        
    
DWORD Id;
    
GetWindowThreadProcessId(hwnd,&Id);

    if(!
Id)
    {
        
cout << "Process ID not found! Errorcode : " << GetLastError() << endl;
    }

    else
    {
        
cout << "Process ID: " << Id << endl;
    
        
HANDLE ProcessHandle;
        
ProcessHandle OpenProcess(PROCESS_ALL_ACCESS ,FALSE,Id);

        if(!
ProcessHandle)
        {
            
cout << "Process Handle not found! Errorcode : " << GetLastError() << endl;
        }
            
        else
        {
            
cout << "Process Handle: " << ProcessHandle << endl;
                
            
unsigned adress 0x00C334A8;
            
float value 3000;

            
ReadProcessMemory(ProcessHandle, (void*)adress, &value4NULL);

            
WriteProcessMemory(ProcessHandle,(LPVOID)adress,&,sizeof(float),NULL);

            
cout << "Finished " << endl;
        }
        
cin.get();
    }    

Bedenkt bitte, dass ich noch kompletter C++ Anfänger bin.
Please consider I'm a totally beginner with C++.
Ich hoffe, ihr könnt mir helfen.
I hope you can help me.
Σternαl. is offline  
Old 03/27/2010, 18:12   #2
 
~kau~'s Avatar
 
elite*gold: 0
Join Date: May 2009
Posts: 634
Received Thanks: 794
Machs dir doch net so schwer!
Code:
//Kauknochen's Source//
#include "stdafx.h"
#include <stdio.h>
#define range1 0x00C334A8


BOOL APIENTRY DllMain( HMODULE hModule,
                       DWORD  ul_reason_for_call,
                       LPVOID lpReserved
                     )
{
    switch (ul_reason_for_call)
    {
    case DLL_PROCESS_ATTACH:
        {
MessageBoxA(NULL, "Succesfull","Injected", MB_OK);
MessageBoxA(NULL, "kauknochen", "Credits", MB_OK);
    }
    case DLL_THREAD_ATTACH:
    case DLL_THREAD_DETACH:
    case DLL_PROCESS_DETACH:
        break;
    }
    return TRUE;
}

void rangeon ()
{
    if(GetAsyncKeyState(VK_NUMPAD1) &1)
{
*(float*)(range1) = 10000;
}
}

void rangeoff ()
{
    if(GetAsyncKeyState(VK_NUMPAD0) &1)
{
*(float*)(range1) = 3000;
}
}
//have fun//
mfg Kauknochen
~kau~ is offline  
Old 03/27/2010, 22:29   #3
 
Σternαl.'s Avatar
 
elite*gold: 20
Join Date: Dec 2009
Posts: 1,850
Received Thanks: 484
Wasn das? oO
Σternαl. is offline  
Old 03/28/2010, 00:15   #4
 
~kau~'s Avatar
 
elite*gold: 0
Join Date: May 2009
Posts: 634
Received Thanks: 794
im grunde das selbe wie das oben xD nur meins funtzt
~kau~ is offline  
Old 03/28/2010, 00:47   #5
 
Σternαl.'s Avatar
 
elite*gold: 20
Join Date: Dec 2009
Posts: 1,850
Received Thanks: 484
Wie gesagt ich bin noch Anfänger, ist das ne dll?
Σternαl. is offline  
Old 03/28/2010, 14:08   #6
 
~kau~'s Avatar
 
elite*gold: 0
Join Date: May 2009
Posts: 634
Received Thanks: 794
..ja ^^ Wende skype icq etc hast kann ichs dir erklären xD
~kau~ is offline  
Old 03/28/2010, 20:09   #7
 
Σternαl.'s Avatar
 
elite*gold: 20
Join Date: Dec 2009
Posts: 1,850
Received Thanks: 484
Ja, ich weiß, dumme Frage =D
Warte ich geb dir mal icq per PM.

€dit: Bitte noch nicht closen, vllt gibt es andere, die mir bei dem Problem mit der .exe helfen können.
Σternαl. is offline  
Old 03/28/2010, 21:42   #8


 
MrSm!th's Avatar
 
elite*gold: 7110
Join Date: Jun 2009
Posts: 28,902
Received Thanks: 25,407
Quote:
Originally Posted by kauknochen View Post
im grunde das selbe wie das oben xD nur meins funtzt
Quote:
Originally Posted by kauknochen View Post
Machs dir doch net so schwer!
Code:
//Kauknochen's Source//
#include "stdafx.h"
#include <stdio.h>
#define range1 0x00C334A8


BOOL APIENTRY DllMain( HMODULE hModule,
                       DWORD  ul_reason_for_call,
                       LPVOID lpReserved
                     )
{
    switch (ul_reason_for_call)
    {
    case DLL_PROCESS_ATTACH:
        {
MessageBoxA(NULL, "Succesfull","Injected", MB_OK);
MessageBoxA(NULL, "kauknochen", "Credits", MB_OK);
    }
    case DLL_THREAD_ATTACH:
    case DLL_THREAD_DETACH:
    case DLL_PROCESS_DETACH:
        break;
    }
    return TRUE;
}

void rangeon ()
{
    if(GetAsyncKeyState(VK_NUMPAD1) &1)
{
*(float*)(range1) = 10000;
}
}

void rangeoff ()
{
    if(GetAsyncKeyState(VK_NUMPAD0) &1)
{
*(float*)(range1) = 3000;
}
}
//have fun//
mfg Kauknochen
du hast die frage nicht beantwortet
es ging hier um nen trainer; das ist deswegen wichtig, weil es ja bei alastor geht und bei foo nicht.
eine dll löst das problem auch nicht (zumindest nicht für jemanden, der sein problem verstehen will)

nebenbei glaube ich nicht wirklich, dass der code von dir ist o.o
MrSm!th is offline  
Old 03/29/2010, 02:55   #9
 
Σternαl.'s Avatar
 
elite*gold: 20
Join Date: Dec 2009
Posts: 1,850
Received Thanks: 484
Doch doch
Kannste dich daran noch erinnern?

Den Code hab ich leicht umgeändert und tadaa, das is draus geworden ^^
Naja ok, ich muss sagen, dass du mir mit dem Post
auch nicht bei meinem Problem geholfen hast.
Ich könnt jetzt selfowned sagen, aber ich bin ja nich gemein
Σternαl. is offline  
Reply

Tags
c++, league, problem, s4, trainer




All times are GMT +1. The time now is 14:56.


Powered by vBulletin®
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2025 elitepvpers All Rights Reserved.