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 › [Tutorials]Array of Bytes

[Tutorials]Array of Bytes

Posts 1–4 of 4 · Page 1 of 1
Str8Soulja00
Str8Soulja00
[Tutorials]Array of Bytes
This was written by Cobra and Str8Soulja

Put this in your module
Puts a string into a byte array.


Code:
Public Sub ByteStringToByteArray(strString As String, ByRef byteArray() As Byte)
Dim current_byte    As Byte
Dim c, d, intSize   As Integer
Dim strTemp         As String

        ReDim byteArray(0) As Byte
        
        For c = 1 To Len(strString)
            If (Mid(strString, c, 1) <> " ") Then
                strTemp = strTemp & Mid(strString, c, 1)
            End If
        Next c
        
        intSize = Round(Len(strTemp) / 2)
        ReDim Preserve byteArray(intSize) As Byte
        
        d = 0
        For c = 1 To Len(strTemp) Step 2
            current_byte = Val("&H" + Mid(strTemp, c, 2))
            byteArray(d) = current_byte
            d = d + 1
        Next c
End Sub

This writes a byte string to the desired offset.

Code:
Public Sub WriteByteString(lngAddress As Long, strValue As String, Optional ByRef NumberOfBytesWritten As Long = 0)
Dim hwnd, processHandle, processId As Long
Dim bytValue() As Byte
    
    hwnd = FindWindow(vbNullString, CurrentProcess)
    If (hwnd = 0) Then Exit Sub
    
    GetWindowThreadProcessId hwnd, processId
    processHandle = OpenProcess(PROCESS_ALL_ACCESS, False, processId)
    ByteStringToByteArray strValue, bytValue
    WriteProcessMemory processHandle, lngAddress, bytValue(0), UBound(bytValue), NumberOfBytesWritten
    CloseHandle processHandle
End Sub
Put this in form load
Code:
CurrentProcess = "WarRock"
'Put this in your button or hotkey
'90 90 90 is how you can nop stuff

Code:
Call WriteByteString(&Haddie,90 90 90)
#1 · 18y ago
OT
Otoom
Wouldnt really call it a tutorial.
More like code snippets.

Thanks though.
#2 · 18y ago
BR
brownsfan91
Quote Originally Posted by Str8Soulja00 View Post
This was written by Cobra and Str8Soulja

Put this in your module
Puts a string into a byte array.


Code:
Public Sub ByteStringToByteArray(strString As String, ByRef byteArray() As Byte)
Dim current_byte    As Byte
Dim c, d, intSize   As Integer
Dim strTemp         As String
 
        ReDim byteArray(0) As Byte
 
        For c = 1 To Len(strString)
            If (Mid(strString, c, 1) <> " ") Then
                strTemp = strTemp & Mid(strString, c, 1)
            End If
        Next c
 
        intSize = Round(Len(strTemp) / 2)
        ReDim Preserve byteArray(intSize) As Byte
 
        d = 0
        For c = 1 To Len(strTemp) Step 2
            current_byte = Val("&H" + Mid(strTemp, c, 2))
            byteArray(d) = current_byte
            d = d + 1
        Next c
End Sub

This writes a byte string to the desired offset.

Code:
Public Sub WriteByteString(lngAddress As Long, strValue As String, Optional ByRef NumberOfBytesWritten As Long = 0)
Dim hwnd, processHandle, processId As Long
Dim bytValue() As Byte
 
    hwnd = FindWindow(vbNullString, CurrentProcess)
    If (hwnd = 0) Then Exit Sub
 
    GetWindowThreadProcessId hwnd, processId
    processHandle = OpenProcess(PROCESS_ALL_ACCESS, False, processId)
    ByteStringToByteArray strValue, bytValue
    WriteProcessMemory processHandle, lngAddress, bytValue(0), UBound(bytValue), NumberOfBytesWritten
    CloseHandle processHandle
End Sub
Put this in form load
Code:
CurrentProcess = "WarRock"
'Put this in your button or hotkey
'90 90 90 is how you can nop stuff

Code:
Call WriteByteString(&Haddie,90 90 90)
this is all ****** talk; go eat some chicken
#3 · 18y ago
K2
K2 Nemico
thanks dude. this will be hlepful in asm hack making...
#4 · 18y ago
Posts 1–4 of 4 · Page 1 of 1

Post a Reply

Similar Threads

  • Array-Of-Byte ScanBy master131 in C++/C Programming
    7Last post 15y ago
  • how to find array of bytes =-/By rippantera in Piercing Blow Help
    6Last post 14y ago
  • [Help]Concatenate byte arraysBy freedompeace in C++/C Programming
    6Last post 15y ago
  • [Tutorial]Convert Bits 2 BytesBy NextGen1 in Visual Basic Programming
    7Last post 16y ago
  • [RELEASE||HELP]Compression and Encryption of Byte ArraysBy topblast in Visual Basic Programming
    0Last post 15y ago

Tags for this Thread

None