Jump to content
Heads Up! This website is no longer maintained, if your a member from our era, consider joining the discord to say hello.
Sign in to follow this  

VB8 Hacks?

Recommended Posts

Okay so after attempting at C++ I failed miserably when I got to API, well actually just wasn't working out. So I switched to VB8 and so far it's going great. I have a lot of prior programming knowledge and I want to know if there is any practical hacks that you could make with Visual Basic? Besides name spoofs.

~lilneo

Share this post


Link to post

'//first u need these 3 functions and the 1 const

 

Public 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

 

Public Declare Function OpenProcess Lib "kernel32" (ByVal dwDesiredAccess As Integer, ByVal bInheritHandle As Integer, ByVal dwProcessId As Integer) As Integer

 

Public 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

 

Public Const PROCESS_ALL_ACCESS As Long = &H1F0FFF

 

'// This sub will write to a process's memory

 

private sub WriteprocmemoryExample()

 

'// declare our process handler

Dim myProcesses As Process() = Process.GetProcessesByName("THIS IS THE NAME OF THE PROCESS")

 

Dim myProcesses As Process() = Process.GetProcessesByName("hl2")

 

'this checks to make sure we have a handle....

If myProcesses.Length = 0 Then

MsgBox("hl2.exe is not running", MsgBoxStyle.Information)

Else

'ADDRESS WE WISH TO WRITE TO "&H2051F774" is the adress we will use "&H" converts it for hex

dim Address as integer = &H2051F774

'VALUE WE WISH TO RIGHT TO THAT ADDRESS

dim Value as long = 1

'now to edit the memory

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

end if

end sub

 

' This will read a value from process's memory allowing you to put a condition on it.

private sub ReadProcMemSample()

 

'// declare our process handler

Dim myProcesses As Process() = Process.GetProcessesByName("THIS IS THE NAME OF THE PROCESS")

 

Dim myProcesses As Process() = Process.GetProcessesByName("hl2")

 

'this checks to make sure we have a handle....

If myProcesses.Length = 0 Then

MsgBox("hl2.exe is not running", MsgBoxStyle.Information)

Else

'address we want to read

dim address as integer = &H2051F774

'this next value will hold the value of the address we will read

dim buffer as long

 

'now to read our value

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

If buffer <> 1 Then

msgbox("success")

dim value as integer = 1

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

End If

end sub

 

 

---------------in short our code will look like this:

 

Public 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

 

Public Declare Function OpenProcess Lib "kernel32" (ByVal dwDesiredAccess As Integer, ByVal bInheritHandle As Integer, ByVal dwProcessId As Integer) As Integer

 

Public 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

 

Public Const PROCESS_ALL_ACCESS As Long = &H1F0FFF

 

private sub WriteprocmemoryExample()

 

Dim myProcesses As Process() = Process.GetProcessesByName("THIS IS THE NAME OF THE PROCESS")

 

Dim myProcesses As Process() = Process.GetProcessesByName("hl2")

 

If myProcesses.Length = 0 Then

MsgBox("hl2.exe is not running", MsgBoxStyle.Information)

Else

dim Address as integer = &H2051F774

dim Value as long = 1

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

end if

end sub

 

private sub ReadProcMemSample()

 

Dim myProcesses As Process() = Process.GetProcessesByName("THIS IS THE NAME OF THE PROCESS")

 

Dim myProcesses As Process() = Process.GetProcessesByName("hl2")

 

If myProcesses.Length = 0 Then

MsgBox("hl2.exe is not running", MsgBoxStyle.Information)

Else

dim address as integer = &H2051F774

dim buffer as long

 

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

If buffer <> 1 Then

msgbox("success")

dim value as integer = 1

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

End If

end sub

 

If you don't know the basic fundamentals of a language u need to in order to learn how to make hacks.

 

have fun :)

Share this post


Link to post

lilneo probably already knows all this information by now. I've spoken to him about this subject not too long ago.

Share this post


Link to post

Thanks fatfuk, well I do know a programming language and I understand the syntax of it all. It's mainly memorizing functions that gets to me. Since there isn't really a direct manual to whatever you want to do and there really isn't too many people around to help you. I'll pop that code into MSVB and see if I can fiddle around with it changing some offsets and see if I can get a basic hack

 

Edit: Okay well after putting it into MSVB08, I am getting a bunch of namespace errors. Saying that all those lines starting with "Private Sub" are not valid in namespaces.

 

Is there somewhere I am supposed to put them? To tell the truth I'm not so clear on what a namespace is. I did a little work with I/O C++ with namespaces, like "using namespace STD" but that's all I know. Could someone explain a little?

 

Edit2: Okay so, I fixed it up, everything is working except for that there is nothing defining processhandle, not really sure how I am supposed to get this or make it work

 

Edit3: Alright, well I have mostly gotten it to work. But for some reason whenever I use read or write process, it says starcraft is not running. I tried modifying the offset to an obvious money offset in single player I found in Artmoney. I had to put &H before it and it turned the offset "0057F0F1" into "&H57FF1" and the read/write still returned 0 as it's result for finding the address in the StarCraft process

 

~lilneo

Edited by lilneo

Share this post


Link to post

Based upon what I see in the code he posted, this section here:

Dim myProcesses As Process() = Process.GetProcessesByName("THIS IS THE NAME OF THE PROCESS")

Dim myProcesses As Process() = Process.GetProcessesByName("hl2")

Is where you're getting the process handle. Why he did this twice I do not know as you don't need to do this twice...

Replacing it with the following should find the process fine if you got everything else fixed up just fine.

Dim myProcesses As Process() = Process.GetProcessesByName("BroodWar")

If you are still having trouble, then just post code and I'll see if I can still help you even though it's VB8.

Share this post


Link to post

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×