Pointer Adresse in VB08

08/17/2010 21:45 Elongate#16
PHP Code:
Public Class Form1

    
Private Sub Button1_Click(ByVal sender As System.ObjectByVal e As System.EventArgsHandles Button1.Click
        
' Dim pName As String = "Nksp"
        ' 
Dim p As Process() = process.GetProcessesByName(pName)

        
Dim p As Process() = Process.GetProcessesByName("Nksp")
        If 
Not p.Length 0 Then
            Memory
.Writememory(p(0), &H106AA26C + &H1BC0 + &H1603084)
        Else
            
MsgBox("Der Prozess Nksp.exe wurde nicht gefunden!")
        
End If
    
End Sub
End 
Class 
Ich hab jetzt das hier, es zeigt keine fehler an, es öffnet das fenster, ich klick den botton, aber es schreibt nicht den wert in den speicher... bitte hilfe
08/17/2010 22:31 KDeluxe#17
Du addierst einfach die Offsets auf die Adresse, du musst aber erst den Wert der Adresse
auslesen, dann das erste Offset addieren. Aus dem Ergebnis erhältst du eine neue Adresse,
diese liest du wieder aus und addierst danach das 2. Offset.

Ich kenn mich überhaupt nicht mit VB aus, ich hab es mir einfach mal hergeleitet:
PHP Code:
Address1 Memory.Readmemory(p(0), &H106AA26C4)
Address2 Memory.Readmemory(p(0), (&HAddress1 + &H1BC0), 4)
Memory.Writememory(p(0), (&HAddress2 + &H160), 3084
08/18/2010 00:43 chesar#18
Quote:
Originally Posted by chesar View Post
geht leider auch nicht! Ich weiß nur das es so aus sehen muss!

WriteFloatPointer(&Haddy, &Hoffset, value)

aber das geht leider nicht

WriteFloatPointer(&35ECBE7C, &4C, 598)

warum?

[Only registered and activated users can see links. Click Here To Register...]
Ich Raffe das nich :( kann mir bitte mal anhand des Bildes ein Beispiel machen?
08/18/2010 01:17 mydoom#19
Guck dir einfach mal ein Tutorial zu Zeigern an und verstehe, was ein Zeiger ist und wie man damit umgeht. Dann solltest du das eigentlich packen :-P
08/21/2010 01:06 DNA-Trainer#20
Nabend,

ich habe gerade mal das Tutorial von Cheatengine bis Step 8 gemacht,
wo die Multilevel Pointer Aufgabe kommt.

So sieht mein Quellcode aus:
Code:
        GetProcessId(ProcName)

        Dim pointerone As Long
        Dim pointertwo As Long
        Dim pointerthree As Long
        Dim pointerfour As Long
        Dim value As Long

        pointerone = Read_Long(&H460C20)
        pointertwo = Read_Long(pointerone + &HC)
        pointerthree = Read_Long(pointertwo + &H14)
        pointerfour = Read_Long(pointerthree)
        value = Read_Long(pointerfour + &H18)
        MsgBox(value)
Und es funktioniert 1A ;)

Damit das natürlich so bei dir auch funktioniert, brauchst du folgendes:
Die Deklaration
Code:
    Private Declare Function RPM Lib "kernel32" Alias "ReadProcessMemory" (ByVal hProcess As Int32, ByVal lpBaseAddress As Int32, ByRef lpBuffer As Int32, ByVal nSize As Int32, ByRef lpNumberOfBytesWritten As Int32) As Int32
und
die Funktionen GetProcessID und Read_Long

Code:
    Public Function GetProcessId(ByVal ProcName As String)
        Dim Processes() As Process = Process.GetProcesses
        Dim process_name As String
        Dim i As Byte
        For i = LBound(Processes) To UBound(Processes)
            process_name = Processes(i).ProcessName
            If process_name = ProcName Then
                process_id = Processes(i).Id
                Return process_id
            End If
        Next
    End Function

    Public Function Read_Long(ByVal address As Int32) As Int32
        Dim process_handle As Int32, value As Int32
        process_handle = OpenProcess(ACCESS_RIGHTS_ALL, False, process_id)
        If process_handle <> 0 Then
            RPM(process_handle, address, value, 4, 0)
        End If
        CloseHandle(process_handle)
        Return value
    End Function

~DNA
10/28/2010 14:02 Defkahn52#21
ich verstehe das alles nicht
wäre es nicht möglich das einer von euch ein vid tut macht mit einem Spiel wofür man ein hack mit pointer erstellt
Dann wäre das sehr nachvollziehbar
Ich wäre sehr dankbar darüber
02/18/2013 03:07 ax5#22
The class readpointer
Code:
Imports System.Runtime.InteropServices

Public Class readpointer
    Private ProcHandle As IntPtr
    Private ProcessName As String
    Public Const PROCESS_VM_OPERATION As UInteger = (&H8)
    Public Const PROCESS_VM_READ As UInteger = (&H10)
    Public Const PROCESS_VM_WRITE As UInteger = (&H20)
    <DllImport("kernel32.dll")> _
    Public Shared Function OpenProcess(ByVal dwDesiredAccess As UInt32, ByVal bInheritHandle As Int32, ByVal dwProcessId As UInt32) As IntPtr
    End Function

    <DllImport("kernel32.dll", SetLastError:=True)> _
    Public Shared Function ReadProcessMemory(ByVal hProcess As IntPtr, ByVal lpBaseAddress As IntPtr, <Out()> ByVal lpBuffer As Byte(), ByVal dwSize As Integer, ByRef lpNumberOfBytesRead As Integer) As Boolean
    End Function

    Public Function GetMaplestory() As Integer
        Dim Success As Integer
        GetProcess = "MapleStory"
        OpenProcess()
        If OpenProcess() = -1 Then
            Success = 0
            Return Success
        Else
            Success = 1
            Return Success
        End If

    End Function

    Public Property GetProcess() As String
        Get
            Return ProcessName
        End Get
        Set(ByVal value As String)
            ProcessName = value
        End Set
    End Property

    Public Function OpenProcess() As Integer
        Dim ProcessArray As Process() = Process.GetProcessesByName(ProcessName)
        Dim sucess As Integer
        Try
            ProcHandle = OpenProcess(PROCESS_VM_OPERATION Or PROCESS_VM_READ Or PROCESS_VM_WRITE, 1, CUInt(ProcessArray(0).Id))
            sucess = 1
        Catch generatedExceptionName As IndexOutOfRangeException
            sucess = -1
        End Try
        Return sucess
    End Function

    Public Function ReadPointerFromMemory(ByVal BaseAddress As Integer, ByVal PointerOffset As Integer, ByVal BytesToRead As Integer) As Integer
        Dim BytesAtAddress As Byte() = New Byte(BytesToRead - 1) {}
        Dim BytesRead As Integer
        Dim MemoryBase As Integer
        Dim ReturnVal As Integer
        ReadProcessMemory(ProcHandle, CType(BaseAddress, IntPtr), BytesAtAddress, BytesToRead, BytesRead)
        MemoryBase = BitConverter.ToInt32(BytesAtAddress, 0)
        MemoryBase += PointerOffset
        ReadProcessMemory(ProcHandle, CType(MemoryBase, IntPtr), BytesAtAddress, BytesToRead, BytesRead)
        ReturnVal = BitConverter.ToInt32(BytesAtAddress, 0)
        Return ReturnVal
    End Function

    Public Function ReadPointer(ByVal Base As Integer, ByVal Offset As Integer) As Integer
        GetMaplestory()
        Dim Pointer As Integer
        Dim Final As Integer
        Pointer = ReadPointerFromMemory(Base, Offset, 4)
        Final = (Convert.ToInt32(Pointer))
        Return Final
    End Function
End Class
To us it:
Code:
 Dim rp As New readpointer
Label2.Text = rp.ReadPointer("&HPointerBaseHere", "&HPointerOffsetHere").ToString() '//Must Have &H
hop it helps