Autor Beitrag
Karlson Threadstarter
ontopic starontopic starontopic starontopic starontopic starofftopic starofftopic starofftopic star
Beiträge: 2088



BeitragVerfasst: Fr 04.02.05 21:59 
Findet bei mir 37 Einträge :?
F34r0fTh3D4rk
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 5284
Erhaltene Danke: 27

Win Vista (32), Win 7 (64)
Eclipse, SciTE, Lazarus
BeitragVerfasst: Fr 04.02.05 21:59 
ich finde keinen beitrag weil die suche bei mir nicht mehr geht :roll:
Karlson Threadstarter
ontopic starontopic starontopic starontopic starontopic starofftopic starofftopic starofftopic star
Beiträge: 2088



BeitragVerfasst: Fr 04.02.05 22:17 
Zitat:
Orginal geschrieben von Obstkutsche
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
var   
 Read: DWORD;   
 OldProtect: DWORD;   
 Buf: Pointer;   
begin   
 // Lese & Schreibrechte holen   
 if VirtualProtectEx(Prozess, Adresse, Groesse, PAGE_EXECUTE_READWRITE, OldProtect) then   
 begin   
  // Speicher reservieren   
  getmem(Buf, Groesse);   
  try   
   // Daten lesen   
   if ReadProcessMemory(Prozess, Adresse, Buf, Groesse, Read) then   
    if Read = Groesse then   
    begin   
     // Spaß haben   
    end;   
  finally   
   // Wieder alte Rechte setzen   
   VirtualProtectEx(Prozess, Adresse, Groesse, OldProtect, OldProtect)   
   freemem(Buf);   
  end;   
 end;   
end;



Na dann will ich mal nicht so sein ;)
F34r0fTh3D4rk
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 5284
Erhaltene Danke: 27

Win Vista (32), Win 7 (64)
Eclipse, SciTE, Lazarus
BeitragVerfasst: Fr 04.02.05 22:20 
was kommt bei spass haben rein und welcher wert (also von welcher speicheradresse) wird jetzt an welche variable übergeben ?
F34r0fTh3D4rk
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 5284
Erhaltene Danke: 27

Win Vista (32), Win 7 (64)
Eclipse, SciTE, Lazarus
BeitragVerfasst: Fr 04.02.05 22:21 
achso spass haben, da kommt rein was man damit macht und der rest ist einsetzen oda ?
kannst mal n beispiel geben, was muss zb bei größe rein ?

der titel das programms zum testen ist bei mir galgenmännchen, die adresse ist:

45FCCC

Den Wert möchte ich gerne auslesen
Karlson Threadstarter
ontopic starontopic starontopic starontopic starontopic starofftopic starofftopic starofftopic star
Beiträge: 2088



BeitragVerfasst: Fr 04.02.05 23:35 
Ich hab mal vor ein paar Monaten die Function gebraucht. ich habs damals irgendwie hingekriegt, weiss aber noch das dass ein ziemliches gewurschtel war. Ich glaub so in der Richtung:

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
procedure TForm1.Button1Click(Sender: TObject);
var fensterhandle, processhandle : THandle;
    ProcessID : Cardinal;
    puffer : array of byte;
    read : cardinal;
    i : integer;
begin
 fensterhandle := FindWindow(nil'Project1');
 Getwindowthreadprocessid(Fensterhandle, @Processid);
 processhandle := OpenProcess(PROCESS_ALL_ACCESS, false, ProcessId);
 setLength(puffer, 4);
  readprocessmemory(processhandle, ptr($BF4A78),puffer, 4, read);
 if read = 4 then
  begin
  for i := 0 to length(puffer) do
   begin
    memo1.lines.add(inttostr(puffer[i]));
 end;
 end;
end;
end;


*ungetestet* bin mir auch absolut nicht mehr sicher. :oops:


Zuletzt bearbeitet von Karlson am Fr 04.02.05 23:41, insgesamt 1-mal bearbeitet
uall@ogc
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 1826
Erhaltene Danke: 11

Win 2000 & VMware
Delphi 3 Prof, Delphi 7 Prof
BeitragVerfasst: Fr 04.02.05 23:39 
1. um readprocessmemory muss kein try, lieber checken ob die anzahl der bytes die gelesen wurden (letzer parameter) mit denen übereinstimmt die gelesen werden sollten

2. $BF4A78 liegt ausserhalb des speicherbereiches der EXE, wird somit sehr wahrscheinlich mit HeapAlloc freigemacht und ist deshalb auch bei unterschiedlichen system anders (letzen 2 bytes werden gleich sein, da nur die ersten die page angeben)
Karlson Threadstarter
ontopic starontopic starontopic starontopic starontopic starofftopic starofftopic starofftopic star
Beiträge: 2088



BeitragVerfasst: Fr 04.02.05 23:43 
okay. Hab das mal soweit geändert. merci!
Preisfrage die ich mich schon immer gefragt habe: Wenn unsere Adresse ausserhalb dem Bereich der Exe liegt (woran siehst du das überhaupt? :lol: ), wie kann man diese dann überhaupt mit einem Trainer ansprechen?
uall@ogc
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 1826
Erhaltene Danke: 11

Win 2000 & VMware
Delphi 3 Prof, Delphi 7 Prof
BeitragVerfasst: Fr 04.02.05 23:46 
normalerweise (bei 99.99% aller EXE dateien) ist die standart base adresse bei 0x00400000 und dein BF ist weit davon weg ;> so groß kann die exe nicht sein
Karlson Threadstarter
ontopic starontopic starontopic starontopic starontopic starofftopic starofftopic starofftopic star
Beiträge: 2088



BeitragVerfasst: Fr 04.02.05 23:52 
okay, klingt logisch...und die andere Frage? :lol:
uall@ogc
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 1826
Erhaltene Danke: 11

Win 2000 & VMware
Delphi 3 Prof, Delphi 7 Prof
BeitragVerfasst: Fr 04.02.05 23:55 
irgendwo gibt es im speicher der EXE eine variable die auf den den allocierten speicher zeigt, oder api hook auf HeapAlloc etc. blub bla halt, 1000 wege sehr kompliziert und lange zu erklären
Karlson Threadstarter
ontopic starontopic starontopic starontopic starontopic starofftopic starofftopic starofftopic star
Beiträge: 2088



BeitragVerfasst: Sa 05.02.05 00:33 
mkay...dann wirds doch etwas schwerer das Spiel zu manipulieren ;)
F34r0fTh3D4rk
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 5284
Erhaltene Danke: 27

Win Vista (32), Win 7 (64)
Eclipse, SciTE, Lazarus
BeitragVerfasst: Sa 05.02.05 13:12 
ok wenn ich diese procedure nehme kommt in mein memo sowas:

ausblenden Quelltext
1:
2:
3:
4:
5:
0
0
0
0
140


der wert 0 ist korrekt aber was soll der rest ?

ich möchte schließlich nur einen integer auslesen um da nen bot für zu machen :?

also der 1. wert ist immer der gesuchte ?

ich hab das mal so gemacht:

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
function ReadProcess(Title: string; Address: integer): integer;
var
 winhandle, processhandle : THandle;
 ProcessID : Cardinal;
 puffer : array of byte;
 read : cardinal;
begin
 winhandle := FindWindow(nil, pchar(Title));
 Getwindowthreadprocessid(winhandle, @Processid);
 processhandle := OpenProcess(PROCESS_ALL_ACCESS, false, ProcessId);
 setLength(puffer, 4);
  readprocessmemory(processhandle, ptr(Address),puffer, 4, read);
 if read = 4 then
  begin
    result:= puffer[0];
  end;
end;


aber da kommt völliger müll raus, warum ?

Moderiert von user profile iconraziel: Beiträge zusammengefasst
uall@ogc
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 1826
Erhaltene Danke: 11

Win 2000 & VMware
Delphi 3 Prof, Delphi 7 Prof
BeitragVerfasst: Sa 05.02.05 13:33 
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
function ReadProcess(Title: string; Address: integer): integer;   
var   
 winhandle, processhandle : THandle;   
 ProcessID : Cardinal;   
 buffer : integer;   
 read : cardinal;   
begin   
  winhandle := FindWindow(nil, pchar(Title));   
  Getwindowthreadprocessid(winhandle, @Processid);   
  processhandle := OpenProcess(PROCESS_ALL_ACCESS, false, ProcessId);   
  if processhandle > 0 then
  begin 
    readprocessmemory(processhandle, pointer(Address),@buffer, sizeof(buffer), read);   
    if read = sizeof(buffer) then   
      result := buffer else result := 0;  
    closehandle(processhandle);
  end;
end;
F34r0fTh3D4rk
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 5284
Erhaltene Danke: 27

Win Vista (32), Win 7 (64)
Eclipse, SciTE, Lazarus
BeitragVerfasst: Sa 05.02.05 13:39 
oh danke (hab ich wohl wieder etwas geschlampt :lol: )
funzt perfekt danke, der meister hats mal wieder hinbekommen :flehan:
Kraut
Hält's aus hier
Beiträge: 2

Win XP

BeitragVerfasst: Mi 08.03.06 15:00 
Der Link funktioniert nicht mehr =(