Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/iano/public_html/tpforums-vb5/forum/includes/class_core.php on line 5842

PHP Warning: Use of undefined constant MYSQL_NUM - assumed 'MYSQL_NUM' (this will throw an Error in a future version of PHP) in ..../includes/init.php on line 165

PHP Warning: Use of undefined constant MYSQL_ASSOC - assumed 'MYSQL_ASSOC' (this will throw an Error in a future version of PHP) in ..../includes/init.php on line 165

PHP Warning: Use of undefined constant MYSQL_BOTH - assumed 'MYSQL_BOTH' (this will throw an Error in a future version of PHP) in ..../includes/init.php on line 165

PHP Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in ..../includes/functions_navigation.php on line 588

PHP Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in ..../includes/functions_navigation.php on line 612

PHP Warning: Use of undefined constant misc - assumed 'misc' (this will throw an Error in a future version of PHP) in ..../global.php(29) : eval()'d code(6) : eval()'d code on line 1

PHP Warning: Use of undefined constant index - assumed 'index' (this will throw an Error in a future version of PHP) in ..../global.php(29) : eval()'d code(6) : eval()'d code on line 1

PHP Warning: Use of undefined constant misc - assumed 'misc' (this will throw an Error in a future version of PHP) in ..../includes/class_bootstrap.php(1422) : eval()'d code(4) : eval()'d code on line 1

PHP Warning: Use of undefined constant index - assumed 'index' (this will throw an Error in a future version of PHP) in ..../includes/class_bootstrap.php(1422) : eval()'d code(4) : eval()'d code on line 1

PHP Warning: Use of undefined constant onlinestatusphrase - assumed 'onlinestatusphrase' (this will throw an Error in a future version of PHP) in ..../includes/class_core.php(4684) : eval()'d code on line 6

PHP Warning: Use of undefined constant onlinestatusphrase - assumed 'onlinestatusphrase' (this will throw an Error in a future version of PHP) in ..../includes/class_core.php(4684) : eval()'d code on line 6
Bot Stop Read MemoryAddress
Results 1 to 2 of 2

Thread: Bot Stop Read MemoryAddress

  1. #1
    Junior Member
    Join Date
    Oct 2010
    Posts
    21

    Bot Stop Read MemoryAddress

    Hello bot stoping read correctly value on all address always = 0
    Someone can look it ? is VS 2013 Full Source.

    Link:
    http://speedy.sh/MNyR9/MaCrOsoft.zip

    Example

    ReadInt32(Tibia.Handle, adrZPos + Base - 400000) // Return 0

    Now all function and declaration:

    Public Function ReadBytes(Handle As IntPtr, Address As Int64, BytesToRead As UInteger) As Byte()
    Dim ptrBytesRead As IntPtr
    ' Declare a buffer, this is the no mans land in which the information travels to get from the memory address to our programs memory.
    Dim buffer As Byte() = New Byte(BytesToRead - 1) {}
    ' Call to the windows function to get the information.
    ReadProcessMemory(Handle, New IntPtr(Address), buffer, BytesToRead, ptrBytesRead)
    ' The result of this function will be the contents of buffer. Any information which was stored at the memory address passed in, is now in the buffer.
    Return buffer
    End Function


    Public Function ReadInt32(Handle As IntPtr, Address As Long) As Integer
    Return BitConverter.ToInt32(ReadBytes(Handle, Address, 4), 0)
    End Function


    Public Declare Function ReadProcessMemory Lib "kernel32.dll" (hProcess As IntPtr, lpBaseAddress As IntPtr, buffer As Byte(), size As UInt32, ByRef lpNumberOfBytesRead As IntPtr) As Int32

    Public adrZPos As UInt32 = &HAD1040

    Dim TibiaProcess As Process() = Process.GetProcessesByName("Tibia")
    Tibia = TibiaProcess(0)
    Base = Hex(Tibia.MainModule.BaseAddress.ToInt32())
    Last edited by MaCrOs; 10-28-2015 at 01:45 PM.

  2. #2
    Senior Member
    Join Date
    Mar 2009
    Location
    Brazil
    Posts
    266
    I have no idea what are you doing wrong.

    Anyway, i just made this code and it is working like a charm. Remember Blackd address list always uses Tibia's baseaddress as &H400000.

    Code:
    Imports System.Runtime.InteropServices
    
    Public Class Form1
    
        Public Shared Function ReadProcessMemory(ByVal hProcess As IntPtr, _
                                                ByVal lpBaseAddress As IntPtr, _
                                                <Out()> ByVal lpBuffer As Byte(), _
                                                ByVal dwSize As IntPtr, _
                                                ByRef lpNumberOfBytesRead As IntPtr) As Boolean
        End Function
        '
        Public ProcessID As IntPtr
        Public ProcessHandle As IntPtr
        Public ProcessBase As Long
        '
        Public Const HealthAdr As Long = &HAD1030 - &H400000
        Public Const ManaAdr As Long = &H933688 - &H400000
        Public Const XorAdr As Long = &H933658 - &H400000
    
        Private Sub Button1_Click(ByVal sender As Object, ByVal e As EventArgs) Handles Button1.Click
            Dim p As Process = Nothing
            '
            Dim xorVlr As Long
            Dim hpVlr As Long
            Dim mpVlr As Long
            '
            p = Process.GetProcessesByName("tibia")(0)
            '
            If Not p Is Nothing Then
                '
                ProcessID = p.Id
                ProcessHandle = p.Handle
                ProcessBase = p.MainModule.BaseAddress
                '
                xorVlr = ReadMemoryLong(ProcessID, ProcessBase, XorAdr)
                hpVlr = ReadMemoryLong(ProcessID, ProcessBase, HealthAdr)
                mpVlr = ReadMemoryLong(ProcessID, ProcessBase, ManaAdr)
                '
                hpVlr = hpVlr Xor xorVlr
                mpVlr = mpVlr Xor xorVlr
                '
                Label1.Text = "Health: " & hpVlr
                Label2.Text = "Mana:" & mpVlr
                '
                p = Nothing
            End If
            '
        End Sub
    
        Public Function ReadMemoryLong(ByVal idProcess As IntPtr, ByVal baseaddress As Long, ByVal address As Long) As Long
            Dim realaddress As Long
            Dim buffer() As Byte
            Dim handleproc As IntPtr
            '
            ReDim buffer(3)
            '
            handleproc = Process.GetProcessById(idProcess).Handle
            '
            realaddress = baseaddress + address
            '
            ReadProcessMemory(handleproc, realaddress, buffer, buffer.Length, Nothing)
            '
            Return BitConverter.ToInt32(buffer, 0)
            '
        End Function
    End Class

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •