Help Last chat message memory address

Daslee

Member
Joined
Jun 3, 2013
Messages
9
Reaction score
1
Hello. I'm new to this forum and I'm here just because I were googling samp chat messages memory address for half day and found nothing... So I see this forum is for samp hacking and I want to ask you maybe somebody knows last chat message memory address? I tried using memory address in this page: http://www.gtamodding.com/index.php?tit ... sses_(SAMP )

So that would be: 0xEFF68 + 0x152 + (0xFC * index )
Here is my c++ code:

Code:
#include <iostream>
#include <Windows.h>

using namespace std;

int main()
{
	int newValue = 500;

	HWND hWnd = FindWindow(0, "GTA:SA:MP");

	if(hWnd == 0){
		cerr << "Cannot find window!" << endl;
	}else{
		DWORD pId;
		GetWindowThreadProcessId(hWnd, &pId);
		HANDLE hProc = OpenProcess(PROCESS_ALL_ACCESS, false, pId);

		if(!hProc){
			cerr << "Cannot open process." << endl;
		}else{
			DWORD pointer = 0xEFF68 + (0xFC * 1);

			char lastmsg[1024];

			ReadProcessMemory(hProc, (LPVOID)(pointer), &lastmsg, sizeof(char) * sizeof(lastmsg), NULL);

			cout << lastmsg << endl;
		}
	}

	system("pause");
	return 0;
}

And this is what I get when I run my c++ application:
????????????????????????????????????????????????????????????????????????????????
????????????????????????????????????????????????????????????????????????????????
????????????????????????????????????????????????????????????????????????????????
????????????????????????????????????????????????????????????????????????????????
????????????????????????????????????????????????????????????????????????????????
????????????????????????????????????????????????????????????????????????????????
????????????????????????????????????????????????????????????????????????????????
????????????????????????????????????????????????????????????????????????????????
????????????????????????????????????????????????????????????????????????????????
????????????????????????????????????????????????????????????????????????????????
????????????????????????????????????????????????????????????????????????????????
????????????????????????????????????????????????????????????????????????????????
????????????????????????????????????????????????????????????????????????N?
Press any key to continue . . .

So I think that memory address is wrong, because in that site is wrote:
SAMP 0.3b R3 Client

Current samp version is 0.3x. So maybe somebody knows last chat message memory address or already have code in c++ language or any other to read chat messages?
 

0x_

Wtf I'm not new....
Staff member
Administrator
Joined
Feb 18, 2013
Messages
1,123
Reaction score
173
I think just take Memory Adresses, without Reversing them Self is a bit bad because you don't know what it exactly does a/o on Updates you can't get it again.

If you don't have many experience in it just read the last line trough the Chatlog, or hook the Win32 IO functions.
 

Daslee

Member
Joined
Jun 3, 2013
Messages
9
Reaction score
1
Oh thanks, i didn't noticed that samp have chatlog file. :D :D:D

But samp does not write chat messages to chatlog when gta sa windows is not focused, active or whatever..
 

0x_

Wtf I'm not new....
Staff member
Administrator
Joined
Feb 18, 2013
Messages
1,123
Reaction score
173
But samp does not write chat messages to chatlog when gta sa windows is not focused, active or whatever..
Yeah, because you did not receive any Message SA:MP Stop's the Network Thread if you're at desktop.
 

25GHz

Active member
Joined
Feb 19, 2013
Messages
167
Reaction score
0
well, i don't think you gonna get anything with that code....
but you can easily do it using assembly....
look(that box called "chat tracer", down at right):
https://dl.dropboxusercontent.com/s/g39 ... mp-091.png


i'm not gonna make this too easy for you, so....
here:
base address(samp dll module address) + 0x4D480
search for this memory address, you may find something there(the function by itself is not there, but........ you'll see when you get there) :p :p:p

have fun. ;) ;);)


P.S.:
btw, i don't think you gonna find anything(directly) from samp that actually give such status logging. :D :D:D
 

Wut

Well-known member
Joined
Mar 1, 2013
Messages
338
Reaction score
1
well, i don't think you gonna get anything with that code....
but you can easily do it using assembly....
look(that box called "chat tracer", down at right):
https://dl.dropboxusercontent.com/s/g39 ... mp-091.png


i'm not gonna make this too easy for you, so....
here:
base address(samp dll module address) + 0x4D480
search for this memory address, you may find something there(the function by itself is not there, but........ you'll see when you get there) :p :p:p

have fun. ;) ;);)


P.S.:
btw, i don't think you gonna find anything(directly) from samp that actually give such status logging. :D :D:D


Is possible to modify a chat line ?
 

25GHz

Active member
Joined
Feb 19, 2013
Messages
167
Reaction score
0
Is possible to modify a chat line ?
easy...
very very easy...
look:
Code:
        MOV EAX,DWORD PTR [01FD2A24h]
        PUSH samp_01E8D940                   ; ASCII "You are banned from this server."
        PUSH EAX
        CALL @samp_01E39680                  ;<= Jump/Call Address Not Resolved
        ADD ESP,8
        RET 4
        INT3
        ...
        MOV EAX,DWORD PTR [01FD2A24h]
        PUSH samp_01E8D964                   ; ASCII "Server has accepted the connection."
        PUSH EAX
        CALL @samp_01E39680                  ;<= Jump/Call Address Not Resolved
        ADD ESP,8
        RET 4
        INT3
        ...
http://puu.sh/3flft.png
call address resolved(for you to find this to):
base address(in my case is =~ 0x1DC0000) + 0x79680

so, now if you want you can do a code cave.

or you can change in hex dump to... :D :D:D (much easy(and lame :p :p:p )).
 

Wut

Well-known member
Joined
Mar 1, 2013
Messages
338
Reaction score
1
Yea easy if you understand that shit =))

I know how to get base adress, and activated that NOPs from s0beit using C#..
But this seems hard..

I like using c# because of its textbox and buttons.
 
Top