Register for your free account! | Forgot your password?

Go Back   elitepvpers > Coders Den > C/C++
You last visited: Today at 17:03

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

Advertisement



[C++] ReadProcessMemory Text?

Discussion on [C++] ReadProcessMemory Text? within the C/C++ forum part of the Coders Den category.

Closed Thread
 
Old   #1
 
elite*gold: 0
Join Date: Aug 2008
Posts: 465
Received Thanks: 224
[C++] ReadProcessMemory Text?

die frage kommt den pros hier vllt etwas dumm vor, aber
ich befasse mich ja erst seit 2 wochen mit c++:

ich habe folgenden code:
PHP Code:
      ReadProcessMemory(handle,(LPVOID)address,&text,sizeof(long),&numBytesRead);
      
cout << hex << text << "\n";
      
cout << char(text) << "\n"
ich will in einem spiel einen text auslesen.
der erste wert in der konsole entspricht dem 4 bytes wert in CE.
der zweite ist der erste buchstabe des textes, den ich auslesen will.
der text, der gelesen wird, heißt "test".

mach ich was mit char() falsch?
kann mir jemand bitte den code korrigieren?

Quote:
Originally Posted by Konsole
74736574
t
EDIT: ach ja, ich habe eben mal in meiner ascii tabelle nachgesehen
und hab das mal verglichen.

74|73|65|74
t | s | e | t

also wie bekomme ich das richtig umgewandelt?
MrCrackR is offline  
Old 09/11/2010, 23:53   #2


 
MrSm!th's Avatar
 
elite*gold: 7110
Join Date: Jun 2009
Posts: 28,902
Received Thanks: 25,407
Von welchem Typ ist text?
Da ich das nicht weiß, kann ich dir den Code jetzt nicht so korrigieren, ich könnte dir nur meine Lösung vorschlagen.

edit:

Achso, aufgrund des sizeof(long) würde ich mal sagen, es ist ein long/int/DWORD.
Das wird natürlicherweise als Zahlenkombination interpretiert...
Du musst ein Char Array nehmen, um den String abzuspeichern:

PHP Code:
char text[10];
ReadProcessMemory(handle,(LPVOID)address,text,strlen("test"),&numBytesRead);   //strlen("test") ist ein Beispiel; du müsstest eben die maximale Länge eines Chateintrags nehmen, damit es immer passt
text[strlen("text")] = '\0';
cout << hex << text << "\n";
cout << text << "\n"
MrSm!th is offline  
Thanks
1 User
Old 09/12/2010, 00:22   #3
 
elite*gold: 0
Join Date: Aug 2008
Posts: 465
Received Thanks: 224
vielen dank, hat prima funktioniert

ich wünschte, c++ hätte eine so übersichtliche
hilfebibliothek wie autoit
MrCrackR is offline  
Old 09/12/2010, 00:26   #4


 
MrSm!th's Avatar
 
elite*gold: 7110
Join Date: Jun 2009
Posts: 28,902
Received Thanks: 25,407
Hat es.
MSDN und Google.
MrSm!th is offline  
Thanks
1 User
Old 09/12/2010, 00:31   #5
 
elite*gold: 0
Join Date: Aug 2008
Posts: 465
Received Thanks: 224
danke für den tipp mit msdn. da gibt es wirklich schöne tutorials.
tja, nur mit google kann ich halt nicht richtig umgehen xD

kann von mir aus geschlossen werden
MrCrackR is offline  
Old 09/12/2010, 00:32   #6


 
MrSm!th's Avatar
 
elite*gold: 7110
Join Date: Jun 2009
Posts: 28,902
Received Thanks: 25,407
#closed
MrSm!th is offline  
Closed Thread

Tags
ascii, c++, ce, hex, readprocessmemory


Similar Threads Similar Threads
ReadProcessMemory From Lineage II
03/03/2011 - Lin2 Exploits, Hacks, Bots, Tools & Macros - 8 Replies
Hello, This is my second thread, and I hope someone can have some benefit from it. Why do this? well maybe make an status bar to display health,mana, etc or maybe you want to write data to the process, But in this article I show how to read. First of all you need to inculde some files: #include <Tlhelp32.h> to have access to:
ReadProcessMemory, C++ Problem
08/09/2010 - C/C++ - 12 Replies
Hi, ich mach mich gerade ans Memory editing in C++ aber habe nen Problem mit ReadProcessMemory. Hier mal mein Code: #include <iostream> #include <limits> #include <windows.h> using namespace std; int main()
[delphi] ReadProcessMemory
10/30/2009 - General Coding - 1 Replies
Hey guys, I don't know how to use ReadProcessMemory to get a string. Code: ReadProcessMemory(PHandle,Pointer($3B98D104),@tem ,4,Read); ...:= string(tem); This gives me an error
ReadProcessMemory Problem
07/26/2009 - General Coding - 3 Replies
I can't listing Proc. Only one uses TlHelp32 var hProcess,HandleWindow: THandle; Struct: TProcessEntry32; ProcessID,temp:cardinal; buf:pchar; begin
ReadProcessMemory problem
06/10/2009 - General Coding - 4 Replies
hi, jedes mal wenn ich ReadProcessMemory verwende kommt die zahl 1 raus. Was mache ich denn falsch. int ReadMemory(int address) { int r; FindWindow(); r = ReadProcessMemory(Process, (int*)address, &value, sizeof(value), NULL); CloseHandle( Process );



All times are GMT +1. The time now is 17:04.


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.