Register for your free account! | Forgot your password?

Go Back   elitepvpers > Coders Den > .NET Languages
You last visited: Today at 14:27

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

Advertisement



VB2010 problem mit nicht statische adresse.

Discussion on VB2010 problem mit nicht statische adresse. within the .NET Languages forum part of the Coders Den category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: May 2010
Posts: 3
Received Thanks: 0
Question VB2010 problem mit nicht statische adresse.

Ich bin gerade dabei für ein Spiel ein Testtrainer zu bauen.
Nun komme ich aber nicht klar und irgendwas stimmt nicht.

Habe Windows 7 64bit so wie auch Windows XP 32bit daran liegt es leider nicht.
Der spuckt dauernd Wert4 raus obwohl Cheat Engine ein anderen Wert rausspuckt bei der Ziel Adresse die aber über ein Pointer läuft.
Die Adresse ist nicht statisch wollte ich noch hinzufügen.
Langsam hab ich den Eindruck das er von der Base Adresse immer den Wert4 raus spuckt.
Was er aber raus spucken soll ist von der Ziel Adresse den Wert auslesen.
Schaut euch bitte den Code genau an.

Hier das Module:
Code:
Module Memory
    Private Declare Function OpenProcess Lib "kernel32" (ByVal dwDesiredAccess As Integer, ByVal bInheritHandle As Integer, ByVal dwProcessId As Integer) As Integer
    Private Declare Function WriteProcessMemory Lib "kernel32" (ByVal hProcess As Integer, ByVal lpBaseAddress As Integer, ByRef lpBuffer As Integer, ByVal nSize As Integer, ByRef lpNumberOfBytesWritten As Integer) As Integer
    Private Declare Function WriteFloatMemory Lib "kernel32" Alias "WriteProcessMemory" (ByVal hProcess As Integer, ByVal lpBaseAddress As Integer, ByRef lpBuffer As Single, ByVal nSize As Integer, ByRef lpNumberOfBytesWritten As Integer) As Integer
    Private Declare Function ReadFloat Lib "kernel32" Alias "ReadProcessMemory" (ByVal hProcess As IntPtr, ByVal lpBaseAddress As IntPtr, ByRef buffer As Single, ByVal size As Int32, ByRef lpNumberOfBytesRead As Int32) As Boolean
    Private Declare Function ReadProcessMemory Lib "kernel32" Alias "ReadProcessMemory" (ByVal hProcess As Integer, ByVal lpBaseAddress As Integer, ByRef lpBuffer As Integer, ByVal nSize As Integer, ByRef lpNumberOfBytesWritten As Integer) As Integer
    Private Declare Function CloseHandle Lib "kernel32" (ByVal hObject As Integer) As Integer
    Public Declare Function GetAsyncKeyState Lib "user32" (ByVal vKey As Long) As Integer
    Public RBuff As Long
    Public RBuff2 As Single
    Public RBuff3 As Integer

    Public Function Writememory(ByVal ProcessName As Process, ByVal Address As Integer, ByVal Value As Long, ByVal Bytes As Integer)
        Dim GameLookUp As Process() = Process.GetProcessesByName(ProcessName.ProcessName)

        If GameLookUp.Length = 0 Then

            End

        End If
        Dim processHandle As IntPtr = OpenProcess(&H1F0FFF, 0, GameLookUp(0).Id)

        WriteProcessMemory(processHandle, Address, Value, Bytes, Nothing)

        CloseHandle(processHandle)
        Return True
    End Function

    Public Function ReadFloat(ByVal ProcessName As Process, ByVal Address As Single)

        Dim GameLookUp As Process() = Process.GetProcessesByName(ProcessName.ProcessName)

        If GameLookUp.Length = 0 Then

            End

        End If

        Dim processHandle As IntPtr = OpenProcess(&H1F0FFF, 0, GameLookUp(0).Id)

        ReadProcessMemory(processHandle, Address, RBuff, 4, Nothing)

        CloseHandle(processHandle)

        Return RBuff

    End Function

    Public Function WriteFloat(ByVal ProcessName As Process, ByVal Address As Integer, ByVal Value As Single)

        Dim GameLookUp As Process() = Process.GetProcessesByName(ProcessName.ProcessName)

        If GameLookUp.Length = 0 Then

            End

        End If

        Dim processHandle As IntPtr = OpenProcess(&H1F0FFF, 0, GameLookUp(0).Id)

        WriteFloatMemory(processHandle, Address, Value, 4, Nothing)

        CloseHandle(processHandle)
        Return True
    End Function

    Public Function ReadLong(ByVal ProcessName As Process, ByVal Address As Integer)

        Dim GameLookUp As Process() = Process.GetProcessesByName(ProcessName.ProcessName)

        If GameLookUp.Length = 0 Then

            End

        End If

        Dim processHandle As IntPtr = OpenProcess(&H1F0FFF, 0, GameLookUp(0).Id)

        ReadProcessMemory(processHandle, Address, RBuff, 4, Nothing)

        CloseHandle(processHandle)

        Return RBuff

    End Function

    Public Function ReadFloatPointer(ByVal ProcessName As Process, ByVal Base As Integer, ByVal Offset As Short)

        Dim fullAddress As Long

        Dim GameLookUp As Process() = Process.GetProcessesByName(ProcessName.ProcessName)

        If GameLookUp.Length = 0 Then

            End

        End If

        Dim processHandle As IntPtr = OpenProcess(&H1F0FFF, 0, GameLookUp(0).Id)

        ReadProcessMemory(processHandle, Base, RBuff, 4, Nothing)

        fullAddress = RBuff + Offset

        ReadFloat(processHandle, fullAddress, RBuff2, 4, Nothing)

        Return RBuff2

        CloseHandle(processHandle)

    End Function

    Public Function ReadLongPointer(ByVal ProcessName As Process, ByVal Base As Integer, ByVal Offset As Short, ByVal Bytes As Integer)

        Dim fullAddress As Long

        Dim GameLookUp As Process() = Process.GetProcessesByName(ProcessName.ProcessName)

        If GameLookUp.Length = 0 Then

            End

        End If

        Dim processHandle As IntPtr = OpenProcess(&H1F0FFF, 0, GameLookUp(0).Id)

        ReadProcessMemory(processHandle, Base, RBuff, 4, Nothing)

        fullAddress = RBuff + Offset

        ReadProcessMemory(processHandle, fullAddress, RBuff3, Bytes, Nothing)

        Return RBuff3

        CloseHandle(processHandle)

    End Function

    Public Function WriteFloatPointer(ByVal ProcessName As Process, ByVal Base As Integer, ByVal Offset As Short, ByVal Value As Single)

        Dim fullAddress As Long

        Dim GameLookUp As Process() = Process.GetProcessesByName(ProcessName.ProcessName)

        If GameLookUp.Length = 0 Then

            End

        End If

        Dim processHandle As IntPtr = OpenProcess(&H1F0FFF, 0, GameLookUp(0).Id)

        ReadProcessMemory(processHandle, Base, RBuff, 4, Nothing)

        fullAddress = RBuff + Offset

        WriteFloatMemory(processHandle, fullAddress, Value, 4, Nothing)

        CloseHandle(processHandle)
        Return True
    End Function

    Public Function WriteLongPointer(ByVal ProcessName As Process, ByVal Base As Integer, ByVal Offset As Short, ByVal Value As Long, ByVal Bytes As Integer)

        Dim fullAddress As Long

        Dim GameLookUp As Process() = Process.GetProcessesByName(ProcessName.ProcessName)

        If GameLookUp.Length = 0 Then

            End

        End If

        Dim processHandle As IntPtr = OpenProcess(&H1F0FFF, 0, GameLookUp(0).Id)

        ReadProcessMemory(processHandle, Base, RBuff, 4, Nothing)

        fullAddress = RBuff + Offset

        WriteProcessMemory(processHandle, fullAddress, Value, Bytes, Nothing)

        CloseHandle(processHandle)
        Return True
    End Function

    Public Function NOP(ByVal ProcessName As Process, ByVal Address As Integer, ByVal value As Integer)

        Dim GameLookUp As Process() = Process.GetProcessesByName(ProcessName.ProcessName)

        If GameLookUp.Length = 0 Then

            End

        End If

        Dim processHandle As IntPtr = OpenProcess(&H1F0FFF, 0, GameLookUp(0).Id)

        WriteProcessMemory(processHandle, Address, value, 1, Nothing)

        CloseHandle(processHandle)
        Return True
    End Function

End Module
Nun zum eigentlichen Code in Form1:
Was auch ganz sicher die Fehlerquelle sein wird.

Code:
Public Class Form1

    Private Sub TextBox1_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles TextBox1.KeyPress
        Try
            If e.KeyChar = Microsoft.VisualBasic.ChrW(Keys.Enter) Then
                Dim proc As Process = Process.GetProcessesByName("Sacred DarkBloods Extrem")(0)
                Dim base = &H6D3BC0
                Dim Offset1 As Short
                Dim Offset2 As Integer
                Dim Offset3 As Integer
                Dim Offset4 As Byte
                Dim Offset5 As Byte
                Dim Wert As Long
                Offset1 = ReadLong(proc, base)
                Offset2 = ReadLong(proc, Offset1 + &H10)
                Offset3 = ReadLong(proc, Offset2 + &H3AC)
                Offset4 = ReadLong(proc, Offset3 + &H3AC)
                Offset5 = ReadLong(proc, Offset4 + &H4)
                Wert = ReadLong(proc, Offset5 + &H4)
                TextBox1.Text = Wert
            End If
        Catch ex As Exception
            MsgBox("Bitte starte zuerst Sacred mit den Exenamen Sacred DarkBloods Extrem", MsgBoxStyle.Critical, "Process nicht gefunden!")
        End Try
    End Sub
End Class
Was ist da blos falsch? .... " verzweifel "
Wäre echt sehr dankbar für sehr gute Tipps und Hilfen was in der TextBox1 noch verbessert werden muss damit der Pointer auf die richtige Adresse auch wirklich zeigt und den identischen Wert wie bei Cheat Engine anzeigt.

EDIT:
Tja das Thema hat sich erledigt bis dann.
Xiantrius is offline  
Reply


Similar Threads Similar Threads
[VB2010] Problem mit JSON
10/08/2012 - .NET Languages - 2 Replies
Hallo, Ich habe versucht ein Programm zu schreiben, um mir die letzten TBM Transaktionen anzuzeigen. Nur leider hängt dies beim Lesen der JsonStrings. Ich benutze diese Library dafür. Hier ist mein Code: Imports Newtonsoft.Json Imports System.Net Imports System.IO
PS3 IP-Adresse nicht gefunden
07/09/2012 - Consoles - 5 Replies
Hey Leute ich habe das Problem das meine PS3 keine IP-Adresse findet ich habe Internet über diese D-Lan Stecker , auf meinem PC funktinoiert alles gut aber die Playstation findet nichteinmal eine Ip . Gestern ging alles noch wunderbar... ( Router , PS3 usw alles schon neu gestartet worden) Was soll ich tun??:confused::confused:
[vb2010] Konsolenanwendung problem
12/09/2011 - .NET Languages - 5 Replies
Ich will für die Webseite Lastwow.com eine Konsolenanwendung erstellen, die sich auf dieser Internetseite einloggt und danach auf die 3 Votelinks geht. Die Accountinformationen für den Login sollen sich in einer .txt befinden die dann automatisch geladen werden sollen und wie oben schon geschrieben es soll sich eingeloggt werden und gevotet werden. Mein Problem ist nur ich bin ein Neuling was Konsolenanwendungen an geht und ich finde auch nirgends ein Tutorial etc. . Ich wäre sehr...
IP-Adresse nicht anzeigen
11/07/2011 - Nostale - 10 Replies
Guten Morgen epvper`s, bin so ziehmlich neu in Sachen hacken und naja wollte halt mal ein paar Hack`s ausprobieren.Nur da gibt es ein Problem ich habe gehört das man bei Nostale einen IP-Bann kriegt wenn man beim hacken erwischt wird.Ihr wisst schon worauf ich hinaus will.Wie kann ich einstellen das meine IP nicht angezeigt wird? Danke im vorraus! MfG Weeed x3 :D
AutoIt kann keine statische Adresse mit XYZ Koordinaten auslesen?
10/10/2009 - WoW Bots - 15 Replies
Hi ich frage mich, warum mein AutoIt Code keine statische Adresse aus Wow 2.4.3, genauer: die XYZ Koordinaten, auslesen kann.:confused: Es kommt immer nur 0 raus, anstelle der in CE korrekt angezeigten Koordinaten (bei gleicher statischer Adresse, also nichts mehr mit Pointern usw) Code: #include <NomadMemory.au3> #include <GUIConstants.au3> #include <String.au3>



All times are GMT +1. The time now is 14:28.


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.