Autor Beitrag
glotzer
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 393
Erhaltene Danke: 49

Win 7
Lazarus
BeitragVerfasst: Di 22.12.09 17:13 
ich hab ein programm mit caption "xyz" (es ist sichergestellt das das programm nur einmal ausgeführt wird)
mein program soll aus diesem programm daten auslesen
die adresse ist der wert im speicer bei adresse [beginn von xyz.exe] +5DD96 + 24
(alle daten liegen als hex zahl vor, mein ergebnis sollte aber menschenleslich sein, also dizimalzahl)
und dort will ich jetzt nen 4bytes integer lesen.

mein problem ist das ich mich noch nie richtig mit dem arbietsspeicher auseinandergesetzt hab, ich hab keine ahnung wie ich and die processId für ReadProcessMemory komm, und wie ich in delphi mit hex zahlen umgeh

könnt mir da bitte wer helfen?
Flamefire
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 1207
Erhaltene Danke: 31

Win 10
Delphi 2009 Pro, C++ (Visual Studio)
BeitragVerfasst: Di 22.12.09 18:54 
also
1)Hexzahlen:
In delphi wird das als $BADF00D dargestellt. Also mit $ davor
demzufolge strtoint('$'+hexStr); bzw inttohex(intval);
2)lesen aus speicher mittels openprocess, readprocessmemory, closehandle. in der reihenfolge
3)wenn du nicht weißt, wie du mit den Daten klarkommst: Ollydbg für den tiefen Blick. CheatEnginge zum Lesen für den flachen Blick

Rest ist fleißarbeit von deiner Seite!
BenBE
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 8721
Erhaltene Danke: 191

Win95, Win98SE, Win2K, WinXP
D1S, D3S, D4S, D5E, D6E, D7E, D9PE, D10E, D12P, DXEP, L0.9\FPC2.0
BeitragVerfasst: Di 22.12.09 18:55 
Zwecks Hex-Zahlen: Im Source mit $ prefixen; ansonsten IntToHex vs. IntToStr.

Bzgl. ReadProcessMemory gibt's ne ganze Reihe beispiele hier im Forum. Die ProzessID bekommst du anhand des Fenster-Handles über nen gewissen Umweg, wenn Du GetWindowProcessThreadId (o.s.ä.) mit deinem Fenster-Handle aufrufst.

_________________
Anyone who is capable of being elected president should on no account be allowed to do the job.
Ich code EdgeMonkey - In dubio pro Setting.
glotzer Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 393
Erhaltene Danke: 49

Win 7
Lazarus
BeitragVerfasst: Di 22.12.09 18:57 
:) tausend mal danke, genau das hab ich gesucht

für alle die mal änliche probleme haben:
www.delphi-library.d...ighlight=openprocess
und google, habs grad mit den hilfen hier hinbekommen