• Trainer
  • Forums
  • Suche
  • Members
  • Kalender
  • Hilfe
  • Extras
Forum stats
Show team
Neue Beiträge ansehen
Heutige Beiträge ansehen
Home of Gamehacking - Archiv
Login to account Create an account
Login
Benutzername:
Passwort: Passwort vergessen?
 



  Home of Gamehacking - Archiv Coding Delphi Kleine Hilfe zu WriteProcessMemory gesucht...

Ansichts-Optionen
Kleine Hilfe zu WriteProcessMemory gesucht...
darius83 Offline
Junior Member
**
Beiträge: 34
Themen: 2
Registriert seit: Sep 2012
Bewertung: 0
#4
05.09.2012, 13:34 (Dieser Beitrag wurde zuletzt bearbeitet: 08.09.2012, 18:58 von darius83.)
Hier mal wie versprochen, mein aktualisierter Code...
Nach dem Klick auf den Button wird ein Timer gestartet, der jede Sekunde prüft, ob das Spiel geöffnet ist und wenn ja, wie der Kontostand ist.
Sobald der Kontostand > 0 ist, wird gepüft, ob der Kontostand > 10000 ist.
Sinkt der Kontostand darunter, wird er automatisch auf 15000 erhöht.
Ein erneuter Klick auf den Button stoppt den Timer wieder.

Viel Spaß damit Wink

[code=delphi]
unit Unit1;

interface

uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, tlhelp32, StdCtrls, ExtCtrls;

type
TForm1 = class(TForm)
Gold: TLabel;
Button1: TButton;
Timer1: TTimer;
procedure Button1Click(Sender: TObject);
procedure Timer1Timer(Sender: TObject);
private
{ Private-Deklarationen }
public
{ Public-Deklarationen }
end;

var
Form1: TForm1;

implementation

{$R *.dfm}
const
process = 'game.dat';

function GetID(Const ExeFileName: string; var ProcessId: integer): boolean;
var
ContinueLoop: BOOL;
FSnapshotHandle: THandle;
FProcessEntry32: TProcessEntry32;
begin
result := false;
FSnapshotHandle := CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0);
FProcessEntry32.dwSize := Sizeof(FProcessEntry32);
ContinueLoop := Process32First(FSnapshotHandle, FProcessEntry32);
while integer(ContinueLoop) <> 0 do begin
if (StrIComp(PChar(ExtractFileName(FProcessEntry32.szExeFile)), PChar(ExeFileName)) = 0)
or (StrIComp(FProcessEntry32.szExeFile, PChar(ExeFileName)) = 0) then begin
ProcessId:= FProcessEntry32.th32ProcessID;
result := true;
break;
end;
ContinueLoop := Process32Next(FSnapshotHandle, FProcessEntry32);
end;
CloseHandle(FSnapshotHandle);
end;

function GetAdress(Pidhandle: Integer; BasePointer: Cardinal; Offsets: Array of Cardinal) : Cardinal;
var
i, Anzahl, Data: Integer;
Written: Cardinal;
begin
Written := 4;
Data := 4;
Result := BasePointer;
Anzahl := High(Offsets);
if Anzahl = 1 then
Result := Result + Offsets[1]
else begin
for i := 1 to Anzahl do begin
ReadProcessMemory(Pidhandle, Pointer(Result), @Result, Data, Written);
Result := Result + Offsets[i];
end;
end;
end; // function GetAdress

procedure TForm1.Button1Click(Sender: TObject);

begin
if Timer1.Enabled then
Timer1.Enabled := False
else
Timer1.Enabled := True;
end;

procedure TForm1.Timer1Timer(Sender: TObject);
var
Pid: Integer;
Pidhandle, lBuf, lBuf2, NewValue, Data: Integer;
Address, Written: Cardinal;
Offsets: Array of Cardinal;
begin
Pid := 0;
Data := 4;
Address := $0096c9b0;
SetLength (Offsets, 3);
Offsets[1] := $0C;
Offsets[2] := $34;
NewValue := $3A98;
if GetID(process, Pid) then begin
Pidhandle := OpenProcess(PROCESS_ALL_ACCESS,False,Pid);
try
lBuf := GetAdress(Pidhandle, Address, Offsets);
ReadProcessMemory(Pidhandle, Pointer(lBuf), @lBuf2, Data, Written);
if lBuf2 > 0 then
if lBuf2 < 10000 then
WriteProcessMemory(Pidhandle, Pointer(lBuf), @NewValue, Data, Written);
Gold.Caption := 'Gold : '+IntToStr(lBuf2);
finally
closehandle(Pidhandle);
end;
end;
SetLength (Offsets, 0);
end;

end.
[/code]
Es gibt 10 verschiedene Typen von Personen, die, die ich mag und die, die ich nicht verstehen kann...
Suchen
Antworten
Share Thread:            


Nachrichten in diesem Thema
Kleine Hilfe zu WriteProcessMemory gesucht... - von darius83 - 04.09.2012, 22:05
RE: Kleine Hilfe zu WriteProcessMemory gesucht... - von Mydayyy - 05.09.2012, 00:14
RE: Kleine Hilfe zu WriteProcessMemory gesucht... - von darius83 - 05.09.2012, 00:43
RE: Kleine Hilfe zu WriteProcessMemory gesucht... - von darius83 - 05.09.2012, 13:34
RE: Kleine Hilfe zu WriteProcessMemory gesucht... - von iNvIcTUs oRCuS - 05.09.2012, 16:21
RE: Kleine Hilfe zu WriteProcessMemory gesucht... - von darius83 - 05.09.2012, 18:17
RE: Kleine Hilfe zu WriteProcessMemory gesucht... - von iNvIcTUs oRCuS - 05.09.2012, 19:24
RE: Kleine Hilfe zu WriteProcessMemory gesucht... - von darius83 - 05.09.2012, 20:16
RE: Kleine Hilfe zu WriteProcessMemory gesucht... - von iNvIcTUs oRCuS - 05.09.2012, 21:44
RE: Kleine Hilfe zu WriteProcessMemory gesucht... - von iNvIcTUs oRCuS - 06.09.2012, 17:22
RE: Kleine Hilfe zu WriteProcessMemory gesucht... - von darius83 - 06.09.2012, 21:19
RE: Kleine Hilfe zu WriteProcessMemory gesucht... - von iNvIcTUs oRCuS - 07.09.2012, 01:23
RE: Kleine Hilfe zu WriteProcessMemory gesucht... - von darius83 - 07.09.2012, 20:25
RE: Kleine Hilfe zu WriteProcessMemory gesucht... - von iNvIcTUs oRCuS - 08.09.2012, 01:39
RE: Kleine Hilfe zu WriteProcessMemory gesucht... - von Acubra - 07.09.2012, 01:15
RE: Kleine Hilfe zu WriteProcessMemory gesucht... - von Mydayyy - 08.09.2012, 00:53
RE: Kleine Hilfe zu WriteProcessMemory gesucht... - von darius83 - 08.09.2012, 01:07
RE: Kleine Hilfe zu WriteProcessMemory gesucht... - von darius83 - 08.09.2012, 19:14
RE: Kleine Hilfe zu WriteProcessMemory gesucht... - von iNvIcTUs oRCuS - 09.09.2012, 00:42
RE: Kleine Hilfe zu WriteProcessMemory gesucht... - von darius83 - 09.09.2012, 01:11
RE: Kleine Hilfe zu WriteProcessMemory gesucht... - von iNvIcTUs oRCuS - 09.09.2012, 01:29
RE: Kleine Hilfe zu WriteProcessMemory gesucht... - von darius83 - 09.09.2012, 18:35
RE: Kleine Hilfe zu WriteProcessMemory gesucht... - von Acubra - 09.09.2012, 20:37
RE: Kleine Hilfe zu WriteProcessMemory gesucht... - von darius83 - 09.09.2012, 22:49
RE: Kleine Hilfe zu WriteProcessMemory gesucht... - von iNvIcTUs oRCuS - 10.09.2012, 00:32
RE: Kleine Hilfe zu WriteProcessMemory gesucht... - von darius83 - 10.09.2012, 01:37
RE: Kleine Hilfe zu WriteProcessMemory gesucht... - von iNvIcTUs oRCuS - 10.09.2012, 01:47
RE: Kleine Hilfe zu WriteProcessMemory gesucht... - von darius83 - 11.09.2012, 00:36
RE: Kleine Hilfe zu WriteProcessMemory gesucht... - von Acubra - 11.09.2012, 16:03
RE: Kleine Hilfe zu WriteProcessMemory gesucht... - von darius83 - 11.09.2012, 23:45
RE: Kleine Hilfe zu WriteProcessMemory gesucht... - von iNvIcTUs oRCuS - 12.09.2012, 05:48
RE: Kleine Hilfe zu WriteProcessMemory gesucht... - von darius83 - 12.09.2012, 23:30
RE: Kleine Hilfe zu WriteProcessMemory gesucht... - von iNvIcTUs oRCuS - 13.09.2012, 01:35
RE: Kleine Hilfe zu WriteProcessMemory gesucht... - von DNA - 13.09.2012, 12:16
RE: Kleine Hilfe zu WriteProcessMemory gesucht... - von iNvIcTUs oRCuS - 13.09.2012, 17:18
RE: Kleine Hilfe zu WriteProcessMemory gesucht... - von Acubra - 13.09.2012, 17:35
RE: Kleine Hilfe zu WriteProcessMemory gesucht... - von darius83 - 14.09.2012, 02:42
RE: Kleine Hilfe zu WriteProcessMemory gesucht... - von DNA - 14.09.2012, 12:06
RE: Kleine Hilfe zu WriteProcessMemory gesucht... - von darius83 - 14.09.2012, 15:04
RE: Kleine Hilfe zu WriteProcessMemory gesucht... - von iNvIcTUs oRCuS - 14.09.2012, 17:14
RE: Kleine Hilfe zu WriteProcessMemory gesucht... - von darius83 - 14.09.2012, 18:54
RE: Kleine Hilfe zu WriteProcessMemory gesucht... - von iNvIcTUs oRCuS - 15.09.2012, 17:21
RE: Kleine Hilfe zu WriteProcessMemory gesucht... - von darius83 - 15.09.2012, 19:54
RE: Kleine Hilfe zu WriteProcessMemory gesucht... - von iNvIcTUs oRCuS - 15.09.2012, 20:44
RE: Kleine Hilfe zu WriteProcessMemory gesucht... - von darius83 - 15.09.2012, 21:37
RE: Kleine Hilfe zu WriteProcessMemory gesucht... - von iNvIcTUs oRCuS - 15.09.2012, 22:00
RE: Kleine Hilfe zu WriteProcessMemory gesucht... - von darius83 - 16.09.2012, 00:17
RE: Kleine Hilfe zu WriteProcessMemory gesucht... - von iNvIcTUs oRCuS - 16.09.2012, 19:33
RE: Kleine Hilfe zu WriteProcessMemory gesucht... - von darius83 - 16.09.2012, 22:05
RE: Kleine Hilfe zu WriteProcessMemory gesucht... - von darius83 - 19.09.2012, 21:09
RE: Kleine Hilfe zu WriteProcessMemory gesucht... - von iNvIcTUs oRCuS - 20.09.2012, 19:25
RE: Kleine Hilfe zu WriteProcessMemory gesucht... - von iNvIcTUs oRCuS - 20.09.2012, 20:11
RE: Kleine Hilfe zu WriteProcessMemory gesucht... - von darius83 - 20.09.2012, 20:06
RE: Kleine Hilfe zu WriteProcessMemory gesucht... - von Acubra - 20.09.2012, 21:01
RE: Kleine Hilfe zu WriteProcessMemory gesucht... - von darius83 - 20.09.2012, 21:15
RE: Kleine Hilfe zu WriteProcessMemory gesucht... - von Acubra - 20.09.2012, 22:30
RE: Kleine Hilfe zu WriteProcessMemory gesucht... - von iNvIcTUs oRCuS - 21.09.2012, 08:06
RE: Kleine Hilfe zu WriteProcessMemory gesucht... - von darius83 - 25.09.2012, 18:13
RE: Kleine Hilfe zu WriteProcessMemory gesucht... - von iNvIcTUs oRCuS - 25.09.2012, 19:29
RE: Kleine Hilfe zu WriteProcessMemory gesucht... - von Acubra - 25.09.2012, 19:33
RE: Kleine Hilfe zu WriteProcessMemory gesucht... - von iNvIcTUs oRCuS - 25.09.2012, 20:06
RE: Kleine Hilfe zu WriteProcessMemory gesucht... - von darius83 - 27.09.2012, 22:19
RE: Kleine Hilfe zu WriteProcessMemory gesucht... - von iNvIcTUs oRCuS - 28.09.2012, 01:51
RE: Kleine Hilfe zu WriteProcessMemory gesucht... - von darius83 - 28.09.2012, 22:49
RE: Kleine Hilfe zu WriteProcessMemory gesucht... - von iNvIcTUs oRCuS - 29.09.2012, 02:50
RE: Kleine Hilfe zu WriteProcessMemory gesucht... - von Acubra - 29.09.2012, 15:20
RE: Kleine Hilfe zu WriteProcessMemory gesucht... - von iNvIcTUs oRCuS - 29.09.2012, 20:01

  • Druckversion anzeigen
  • Thema abonnieren


Benutzer, die gerade dieses Thema anschauen:
1 Gast/Gäste

  • Kontakt
  • Forum team
  • Forum stats
  • Nach oben
 
  • RSS-Synchronisation
  • Lite mode
  • Home of Gamehacking - Archiv
  • Help
 
Forum software by © MyBB - Theme © iAndrew 2014



Linearer Modus
Baumstrukturmodus