Heya guys
i thought vb6 is kinda lame so i wanna make my trainers in VB.net (2005)
and it works perfectly
this is how I've done it
[Requirements]
- VB.net 2005
https://msdn.microsof*****m/vstudio/express/vb/ FREE express download version
-a brain (yes.... you need one, so leachers/idiots/.. don't come whining)
any basic trainer is made up of
memory reader, memory writer & timers
i've made the comments green.
Code:
Public Sub ReadMemory() 'this will read the stamina adress and output it as a vallue between 0-100
'Checking if the process is avaiable
Dim myProcesses As Process() = Process.GetProcessesByName("Warrock")
If myProcesses.Length = 0 Then
status.Text = "Warrock is not running." 'Optional
Exit Sub
End If
Dim processHandle As IntPtr = OpenProcess(PROCESS_ALL_ACCESS, 0, myProcesses(0).Id)
If processHandle = IntPtr.Zero Then
status.Text = "Failed to open Warrock process." 'Optional
Exit Sub
End If
Dim Address(0 To 1) As Integer 'Address Location
Dim vBuffer(0 To 1) As Long 'VBuffer is the value being read
Dim convert(0 To 1) As Single 'Convert vBuffer to something readable
Dim ret0 As Byte() = Nothing 'Also another converting process
Address(0) = &H7DB120 'Address location.Can be in Heximal(&H+Address) and Decimal
Address(0) = &H7DB120
ReadProcessMemory(processHandle, Address(0), vBuffer(0), 4, 0) 'ReadProcessMemory from processHandle(Warrock.exe) from AddressLocation(Address(0)) store Value into vbuffer(0) and have it be 4 bytes long.
ret0 = BitConverter.GetBytes(vBuffer(0)) 'Read bytes from vbuffer(0)
convert(0) = BitConverter.ToSingle(ret0, 0) 'Convert bytes into Single https://msdn2.microsof*****m/en-us/library/47zceaw7.aspx
Label1.Text = convert(0)
End Sub
This is a working stamina hack.
Code:
Private Sub WriteMemorystamina()
'Checking if the process is avaiable
Dim myProcesses As Process() = Process.GetProcessesByName("Warrock")
If myProcesses.Length = 0 Then
status.Text = "Warrock is not running." 'Optional
Exit Sub
End If
Dim processHandle As IntPtr = OpenProcess(PROCESS_ALL_ACCESS, 0, myProcesses(0).Id)
If processHandle = IntPtr.Zero Then
status.Text = "Failed to open Warrock process." 'Optional
Exit Sub
End If
Dim Address(0 To 1) As Integer 'Address Location
Dim vBuffer(0 To 1) As Long 'VBuffer is the value being read
Address(0) = &H7DB120 'Address location.Can be in Heximal(&H+Address) and Decimal
Address(0) = &H7DB120
vBuffer(0) = "1120403456" 'Giving the vBuffer(0) a value to write
VirtualProtectEx(processHandle, Address(0), 4, PAGE_READWRITE, 0) 'Set memory protection at Address(0) + 4 bytes to Read+Write mode
WriteProcessMemory(processHandle, Address(0), vBuffer(0), 4, 0) 'WriteProcessMemory to processHandle(warrock.exe) to AddressLocation(Address(0)) set Value to vbuffer(0) and have it be 4 bytes long.
Once these 2 are in place it's simple
make a timer that calls the memory write
Code:
Private Sub spawntimer_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles spawntimer.Tick
WriteMemoryspawn()
End Sub
and then make a button that enables the timer
Code:
Private Sub cmdstamina_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
spawntimer.Enabled = True
End Sub
Adding SECURE password login
whenever you add a password in vb6 it's easy to crack becouse that code can be easely decompiled and read (atleast if you keep the password in plain text)
so my idea was to make it an MD5 hash
To create this go to your vb2005 project and add new item -> login form
i removed the username for this project
First you must add the MD5 encyption
at the top of your code (above "public class loginform1") add
Code:
Imports System.Text
Imports System.Security.Cryptography.MD5
then add this funtion
Code:
Function getMd5Hash(ByVal input As String) As String
' Create a new instance of the MD5 object.
Dim md5Hasher As Security.Cryptography.MD5 = Security.Cryptography.MD5.Create()
' Convert the input string to a byte array and compute the hash.
Dim data As Byte() = md5Hasher.ComputeHash(Encoding.Default.GetBytes(input))
' Create a new Stringbuilder to collect the bytes
' and create a string.
Dim sBuilder As New StringBuilder()
' Loop through each byte of the hashed data
' and format each one as a hexadecimal string.
Dim i As Integer
For i = 0 To data.Length - 1
sBuilder.Append(data(i).ToString("x2"))
Next i
' Return the hexadecimal string.
Return sBuilder.ToString()
End Function
Now comes the password itselve
Code:
Private Sub OK_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles OK.Click
Dim input As String
Dim password As String
input = PasswordTextBox.Text
password = "02a57f160413feed2ded106d47179f54"
If getMd5Hash(input) = password Then
Form1.Visible = True
Me.Visible = False
MsgBox(getMd5Hash(PasswordTextBox.Text))
Else
MsgBox("Wrong Password, Application is closing", MsgBoxStyle.Critical, "Wrong Password")
Me.Close()
End If
End Sub
you might be thinking... what the hell is that password
well it's an encrypted version of what someone types in
"02a57f160413feed2ded106d47179f54" in this case is the MD5 encrypted version of the string "warrock"
so if someone enters warrock they can use the hack. but if someone reads your code... they don't know what the password is...
now i know md5 can be cracked in some cases... but thats not what this is about...
I hope you all enjoyed this tutorial so far
feel free to ask any questions and give feedback.
i did NOT program all of this, parts are taken off the web & some parts are from MSDN. i've just edited it to make it work for Warrock hacking.