Skip to content
MPGHThe Dark Arts
/
RegisterLog in
Forum
Community
What's NewLatest posts across the boardTrendingHottest threads right nowSubscribedThreads you follow
Discussion
GeneralIntroductionsEntertainmentDebate FortFlaming & Rage
Board
News & AnnouncementsMPGH TimesSuggestions & HelpGiveaways
More Sections
Art & Graphic DesignProgrammingHackingCryptocurrency
Hacks & Cheats
Games
ValorantCS2 / CS:GOCall of Duty / WarzoneFortniteApex LegendsEscape From Tarkov
+14 moreLeague of LegendsGTA VMinecraftRustROTMGBattlefieldTroveBattleOnCombat ArmsCrossFireBlackshotRuneScapeDayZDead by Daylight
Resources
Game Hacking TutorialsReverse EngineeringGeneral Game HackingAnti-CheatConsole Game Hacking
Tools
Game Hacking ToolsTrainers & CheatsHack/Release NewsNew
Submit a release →Share your cheat, tool, or config with the community.
AINEW
AI Tools
General & DiscussionPrompt EngineeringLLM JailbreaksHotAI Agents & AutomationLocal / Open Models
AI × Gaming
AI Aimbots & VisionML Anti-CheatGame Bots & Automation
Create
AI Coding / Vibe CodingAI Art & MediaAI Voice & TTS
The AI frontier →Where game hacking meets modern machine learning. Jump in.
Marketplace
Buy & Sell
SellingBuyingTradingUser Services
Trust & Safety
Middleman LoungeMarketplace TalkVouch Copy Profiles
Money
Cryptocurrency TalkCurrency ExchangeWork & Job Offers
Start selling →List accounts, services, and goods. Use the middleman to trade safe.
MPGH The Dark Arts

A community for offensive security research, reverse engineering, and AI.

Community

ForumMarketplaceSearch

Account

RegisterLog in

Legal

Privacy PolicyForum RulesHelp & FAQ
© 2026 MPGH · All rights reserved.Built by the community, for the community. For educational purposes onlyContent is shared for security research and education — we don't condone illegal use. You're responsible for complying with applicable laws. Use at your own risk.
Home › Forum › Programming › Visual Basic Programming › grab text and write text from address

grab text and write text from address

Posts 1–5 of 5 · Page 1 of 1
CO
CodeHPro
grab text and write text from address
how can i grab text from a address and also edit it ?
this is what im using to edit the memory of the game
Module1.vb
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("Halo2") ' Replace that with your halo window text, I'm not sure what it is.
            i = p.Id
            foundit = True : Exit For
        Next
        If foundit = True Then
            Return i
        Else
            MsgBox("Couldn't find open halo client")
            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
Code:
Public Class Form1
 Private Sub af()
        WriteInt((BaseAddress + 5351029), 201326592)
    End Sub
   Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Dim MyProcess As Process() = Process.GetProcessesByName("halo2")
        Dim mainModule As ProcessModule
        mainModule = MyProcess(0).MainModule
        BaseAddress = CInt(mainModule.BaseAddress)
    End Sub
that's how im editing the memory but how can i read text ? and write to text
#1 · 17y ago
Pixie
Pixie
Umm, do you mean create a .txt file and write text to it??
#2 · 17y ago
CO
CodeHPro
Quote Originally Posted by PixieCorp View Post
Umm, do you mean create a .txt file and write text to it??
lol no i mean grabing text from a address in a game

and

Paying $30.00 to whoever can Help me!!!
#3 · 17y ago
ken53406
ken53406
well do you just mean make the program find and edit or just edit the properties of a address such as ammo adddress and change it to 999 from 50?

if so i can help you do it =D
#4 · 17y ago
CO
CodeHPro
got it guys had to pay $40.00 but it was worth it
#5 · 17y ago
Posts 1–5 of 5 · Page 1 of 1

Post a Reply

Similar Threads

  • how do i make text from a render?By -ParallaX in Art & Graphic Design
    6Last post 17y ago
  • [Solved]Clear text from textbox?By ppl2pass in Visual Basic Programming
    6Last post 16y ago
  • [Help] Problem reading text from a webpageBy Jason in Visual Basic Programming
    18Last post 16y ago
  • [help]read text from an online .txt[Solved]By trevor206 in Visual Basic Programming
    10Last post 15y ago
  • [Help]How to draw text from a file?By seeplusplus in Combat Arms Coding Help & Discussion
    29Last post 15y ago

Tags for this Thread

#address#grab#text#write