Register for your free account! | Forgot your password?

You last visited: Today at 17:28

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

Advertisement



Base pointers!

Discussion on Base pointers! within the Rappelz Private Server forum part of the Rappelz category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Aug 2011
Posts: 532
Received Thanks: 233
Exclamation Base pointers!

I've cracked my head on this long enough to finally ask for any help.

Below I've included an image containing the 'Addresses' of the values I need. As my VB.NET memory reading application is not that advanced it needs the base pointers to grab the values from in-game.


Can someone point me to the correct direction to get these?
Attached Images
File Type: png Untitled.png (4.7 KB, 52 views)
marekrndr is offline  
Old 04/06/2012, 19:09   #2


 
Xijezu's Avatar
 
elite*gold: 0
Join Date: May 2011
Posts: 5,084
Received Thanks: 3,458
Usually you work with Pointer in C++, not vb.

If I remember right, you have the functions "WriteProcessMemory" & "ReadProcessMemory" (not sure about the Read[...], I never used such things in C#).

This is how it would look in C++ (I took it from a Tut here, because I like that function xD)

Code:
void CMemory::m_Lesen(void)
{
	if (pWnd = CWnd::FindWindowExW(NULL,NULL,NULL,_T("PROCESSNAME-HERE"))) { 

		hWnd = HWND(pWnd->GetSafeHwnd());  

	}else{ 
		AfxMessageBox(_T("Fenster nicht gefunden!")); 
	}
	UpdateData(true);  
	//unsigned long address1 = 0x0015B778; 
	//unsigned long offset = 0x00000014; 
	unsigned long address1 = 0xFF7D0FB8; 
	unsigned long offset = 0x170; 
	unsigned long address2 ; 
	int value ; 

	DWORD numBytesRead; 
	HANDLE hProc; 
	DWORD procID;  
	GetWindowThreadProcessId(hWnd,&procID);  
	hProc = OpenProcess(PROCESS_ALL_ACCESS, FALSE, procID);  
	ReadProcessMemory(hProc, (LPCVOID)address1, &address2, sizeof(long), &numBytesRead);  
	address2 = address2+offset ;  
	ReadProcessMemory(hProc, (LPCVOID)address2, &value, sizeof(int), &numBytesRead);  
	m_Value.Format(_T("%i"),value);  
	UpdateData(false);  
	CloseHandle(hProc);  
}


void CMemory::m_schreiben(void)
{
	if (pWnd = CWnd::FindWindowExW(NULL,NULL,NULL,_T("PROCESS-NAME"))) { 

		hWnd = HWND(pWnd->GetSafeHwnd());  

	}else{ 
		AfxMessageBox(_T("Fenster nicht gefunden!")); 
	}
	UpdateData(true);  
	unsigned long address1 = 0xFFAA5F78; 
	unsigned long offset = 120; 
	unsigned long address2 ; 
	int value ; 

	DWORD numBytesRead; 
	HANDLE hProc; 
	DWORD procID;  
	GetWindowThreadProcessId(hWnd,&procID);  
	hProc = OpenProcess(PROCESS_ALL_ACCESS, FALSE, procID);  
	ReadProcessMemory(hProc, (LPCVOID)address1, &address2, sizeof(long), &numBytesRead);  
	address2 = address2+offset ;  
	value = _wtoi (m_Value);  
	WriteProcessMemory(hProc,(LPVOID)address2,&value,sizeof(value),NULL);  
	m_Value.Format(_T("%i"),value);  
	UpdateData(false);  
	CloseHandle(hProc);  
}
Xijezu is offline  
Thanks
1 User
Old 04/06/2012, 19:14   #3
 
elite*gold: 0
Join Date: Aug 2011
Posts: 532
Received Thanks: 233
Jep, I'm more confused as I was before.


To make things more clear - I only need to read the memory.
marekrndr is offline  
Old 04/06/2012, 19:20   #4


 
Xijezu's Avatar
 
elite*gold: 0
Join Date: May 2011
Posts: 5,084
Received Thanks: 3,458
C#:
vb.net:
Xijezu is offline  
Old 04/06/2012, 19:25   #5
 
elite*gold: 0
Join Date: Aug 2011
Posts: 532
Received Thanks: 233
This is the Module I've been trying to use :

Code:
Module Memory
    Public Const PROCESS_VM_READ = &H10
    Public Const PROCESS_VM_WRITE = (&H20)
    Public Const PROCESS_VM_OPERATION = (&H8)
    Public Const PROCESS_QUERY_INFORMATION = (&H400)
    Public Const PROCESS_READ_WRITE_QUERY = PROCESS_VM_READ + PROCESS_VM_WRITE + PROCESS_VM_OPERATION + PROCESS_QUERY_INFORMATION
    Public Const PROCESS_ALL_ACCESS = &H1F0FFF
    Public Declare Function ReadProcessMemory Lib "kernel32" (ByVal hProcess As IntPtr, ByVal lpBaseAddress As Int32, ByRef lpBuffer As Int32, ByVal nSize As Int32, ByVal lpNumberOfBytesWritten As Int32) As Long
    Public Declare Function ReadProcessMemory Lib "kernel32" (ByVal hProcess As IntPtr, ByVal lpBaseAddress As Int32, ByRef lpBuffer As Byte(), ByVal nSize As Int32, ByVal lpNumberOfBytesWritten As Int32) As Long
    Public Declare Function WriteProcessMemory Lib "kernel32" (ByVal hProcess As IntPtr, ByVal lpBaseAddress As Int32, ByVal lpBuffer() As Byte, ByVal nSize As Int32, ByVal lpNumberOfBytesWritten As Int32) As Long
    Public Declare Function OpenProcess Lib "kernel32.dll" (ByVal dwDesiredAccess As UInteger, ByVal bInheritHandle As Integer, ByVal dwProcessId As UInteger) As IntPtr
    Public Declare Function CloseHandle Lib "kernel32.dll" (ByVal hHandle As IntPtr) As Boolean
    Public Function Game_Hwnd() As Int32
        Dim i As Int32 : Dim foundit As Boolean = False
        For Each p As Process In Process.GetProcessesByName("sframe")
            i = p.Id
            foundit = True : Exit For
        Next
        If foundit = True Then
            Return i
        Else
            MsgBox("Couldn't find game")
            Return 0
        End If
    End Function
#Region "Memory reading/Writing"
    Public Sub WriteMemory(ByVal Address As Integer, ByVal Value As Integer, ByVal Size As Integer)
        Try
            Dim GameReadWrite As Integer
            Dim PID As Integer = Game_Hwnd()
            GameReadWrite = OpenProcess(PROCESS_READ_WRITE_QUERY, False, PID)

            Dim bytArray() As Byte
            bytArray = BitConverter.GetBytes(Value)
            WriteProcessMemory(GameReadWrite, Address, bytArray, Size, 0)

            CloseHandle(GameReadWrite)
        Catch Ex As Exception
            'ShowError(Ex)
        End Try
    End Sub
    Public Sub WriteMemory(ByVal Address As Integer, ByVal Value() As Byte)
        Try
            Dim GameReadWrite As Integer
            Dim PID As Integer = Game_Hwnd()
            GameReadWrite = OpenProcess(PROCESS_READ_WRITE_QUERY, False, PID)

            WriteProcessMemory(GameReadWrite, Address, Value, Value.Length, 0)

            CloseHandle(GameReadWrite)
        Catch Ex As Exception
            'ShowError(Ex)
        End Try
    End Sub
    Public Sub WriteMemory(ByVal Address As Integer, ByVal Value() As Byte, ByVal Offset As Integer, ByVal Length As Integer)
        Try
            Dim Count1 As Integer
            For Count1 = 0 To Length - 1
                WriteMemory(Address + Count1, Value(Count1 + Offset), 1)
            Next
        Catch Ex As Exception
            'ShowError(Ex)
        End Try
    End Sub
    Public Sub WriteMemory(ByVal Address As Integer, ByVal Value As String)
        Try
            Dim Length As Integer = Value.Length
            For I As Integer = 0 To Length - 1
                WriteMemory(Address + I, Asc(Value.Chars(I)), 1)
            Next
            WriteMemory(Address + Length, 0, 1)
        Catch Ex As Exception
            'ShowError(Ex)
        End Try
    End Sub
    Public Sub WriteMemory(ByVal Address As Integer, ByVal Value As Double)
        Try
            Dim Buffer(0 To 7) As Byte
            Buffer = BitConverter.GetBytes(Value)
            For I As Integer = 0 To 7
                WriteMemory(Address + I, CInt(Buffer(I)), 1)
            Next
        Catch Ex As Exception
            'ShowError(Ex)
        End Try
    End Sub
    'Read Memory
    Public Sub ReadMemory(ByVal Address As Integer, ByRef Value As Double)
        Try
            Dim Buffer(7) As Byte
            Dim Temp As Integer
            For I As Integer = 0 To 7
                ReadMemory(Address + I, Temp, 1)
                Buffer(I) = CByte(Temp)
            Next
            Value = BitConverter.ToDouble(Buffer, 0)
        Catch Ex As Exception
            'ShowError(Ex)
        End Try
    End Sub
    Public Sub ReadMemory(ByVal Address As Integer, ByRef Value As Integer, ByVal Size As Integer)
        Try
            Dim mValue As Integer

            Dim GameReadWrite As Integer
            Dim PID As Integer = Game_Hwnd()
            GameReadWrite = OpenProcess(PROCESS_READ_WRITE_QUERY, False, PID)

            ReadProcessMemory(GameReadWrite, Address, mValue, Size, 0)
            Value = mValue

            CloseHandle(GameReadWrite)
        Catch Ex As Exception
            'ShowError(Ex)
        End Try
    End Sub
    Public Sub ReadMemory(ByVal Address As Integer, ByRef Value() As Byte, ByVal Length As Integer)
        Try
            Dim bytArray() As Byte
            Dim Count1 As Integer
            Dim tempInteger As Integer
            ReDim bytArray(Length - 1)
            For Count1 = 0 To Length - 1
                ReadMemory(Address + Count1, tempInteger, 1)
                bytArray(Count1) = CByte(tempInteger)
            Next
            Value = bytArray
        Catch Ex As Exception
            'ShowError(Ex)
        End Try
    End Sub
    Public Sub ReadMemory(ByVal Address As Integer, ByRef Value As String)
        Try
            Dim intChar As Integer
            Dim Count1 As Integer
            Dim strTemp As String
            strTemp = String.Empty
            Count1 = 0
            Do
                ReadMemory(Address + Count1, intChar, 1)
                If intChar <> 0 Then strTemp = strTemp & Chr(intChar)
                Count1 += 1
            Loop Until intChar = 0
            Value = strTemp
        Catch Ex As Exception
            'ShowError(Ex)
        End Try
    End Sub
    Public Sub ReadMemory(ByVal Address As Integer, ByRef Value As String, ByVal Length As Integer)
        Try
            Dim intChar As Integer
            Dim Count1 As Integer
            Dim strTemp As String
            strTemp = String.Empty
            For Count1 = 0 To Length - 1
                ReadMemory(Address + Count1, intChar, 1)
                strTemp = strTemp & Chr(intChar)
            Next
            Value = strTemp
        Catch Ex As Exception
            'ShowError(Ex)
        End Try
    End Sub
#End Region
    Function ReadInt(ByVal Address As Int32)
        Dim i As Int32
        ReadMemory(Address, i, 4)
        Return i
    End Function
    Sub WriteInt(ByVal Address As Int32, ByVal Value As Int32)
        WriteMemory(Address, Value, 4) ' We'll write a 4 bit to the address
    End Sub
End Module
And to read the memory I was planning to use this :

Code:
Label1.Text = ReadInt((BaseAddress + POINTER))
Quote:
Originally Posted by Xijezu View Post
vb.net:
Quote:
Public Function vReadMemory(handle As IntPtr, baseAdress As IntPtr) As Byte()
' handle would be your Process, the BaseAdress would be the Pointer
The actualy problem is that I can't find the pointer for it.. I only have the mere address.
marekrndr is offline  
Reply


Similar Threads Similar Threads
[Base D3D9] Eagl3 Public Base[WarRock]
03/29/2012 - WarRock Hacks, Bots, Cheats & Exploits - 30 Replies
http://www.grabilla.com/01b1c-c23da3ed-13ef-4cad-b 7fb-7cda6cd299e2.png Download Scan ~Credit: ~Me ~DirecTX ~Hans ~Croner ~WHC Team
pointers
06/22/2009 - Grand Chase Philippines - 4 Replies
im just wondering how to use pointers ? anyone can help me?
Pointers with CE
01/15/2009 - Dekaron - 0 Replies
Hello! Guys im having problems when I try to search for a pointer of a dynamic address using CE 5.4. Always when I press "Find out what writes to this address" or similar options the game just will crash. I'm not able to go further with this problem. If anyone knows how to fix this problem, or knows another way to do it give me a tip and i'll try to find it and learn it. Thanks,



All times are GMT +2. The time now is 17:28.


Powered by vBulletin®
Copyright ©2000 - 2024, 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 ©2024 elitepvpers All Rights Reserved.