Posted: Sun Feb 20, 2011 8:38 am Post subject: Need Example VB Reading Strings from Another Process
I've been searching high and low for a good example of how to read strings from a memory address in visual basic 2010.. Please show me a decent example showing how to convert bytes to string. Thanks bunches!
Joined: 17 Feb 2008 Posts: 524 Location: Inside the Intel CET shadow stack
Posted: Sun Feb 20, 2011 8:59 am Post subject:
Converting bytes to string can be done with the Encoding.UTF8 class:
Code:
' Bytes to string
Dim str As String = Encoding.UTF8.GetString(input_bytes)
' String to bytes
Dim bytes() As Byte = Encoding.UTF8.GetBytes(str)
As for getting strings from memory, learn how to use ReadProcessMemory. Check out http://pinvoke.net/ for a good resource on PInvoke definitions for the Win32 API. _________________
It's not fun unless every exploit mitigation is enabled.
Please do not reply to my posts with LLM-generated slop; I consider it to be an insult to my time.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum