Cara Membuat Cheat Counter Strike


[Tutorial] Create Counter-Strike:Source Hacks
VB 2008


Note: I did not code this Module.

Adresses:

Wireframe Wallhack: 243AEC3C, 2, 4

1 = value, 4 = bytes

1. Download VB 2008

Ok after downloading Visual Basic 2008 you must create a new Project! (File/New Project/Windows Forms Application)

2. Build the Form

After Creating the Form , you must open the Toolbox (Look Picture)



When the Tool Box opens, create two Buttons and one timer.

3. The Coding!

-Look always that the timer is enabled = False at beginning and that the invental is always 1!

-Ok now press doubleclick on the button1 and write in the coding part.
Code:
Timer1.Enabled = True
- Then double click on the button2 and write in the coding part
Code:
Timer1.Enabled = False
-Now press doubleclick on the timer1 (Look that the invental is = 1. make sure it set on 1)
-After you doubleclick on the timer1 we come back to the coding part and must add the code for Wireframe Wallhack , the code is :
Code:
WriteMemory(&H243AEC3C, 2 , 4)
*You must always add &H before you put an address.
*2 = the value of the address
*4 = the bytes

5. Add the module
Code:
Module Module1
Private Declare Function OpenProcess Lib "kernel32" (ByVal dwDesiredAccess As Integer, ByVal bInheritHandle As Integer, ByVal dwProcessId As Integer) As Integer
Private 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
Private Declare Function WriteFloatMemory Lib "kernel32" Alias "WriteProcessMemory" (ByVal hProcess As Integer, ByVal lpBaseAddress As Integer, ByRef lpBuffer As Single, ByVal nSize As Integer, ByRef lpNumberOfBytesWritten As Integer) As Integer
Private Declare Function ReadFloat Lib "kernel32" Alias "ReadProcessMemory" (ByVal hProcess As IntPtr, ByVal lpBaseAddress As IntPtr, ByRef buffer As Single, ByVal size As Int32, ByRef lpNumberOfBytesRead As Int32) As Boolean
Private 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
Private Declare Function CloseHandle Lib "kernel32" (ByVal hObject As Integer) As Integer
Public Declare Function GetAsyncKeyState Lib "user32" (ByVal vKey As Long) As Integer
Public RBuff As Long
Public RBuff2 As Single
Public RBuff3 As Integer

Public Function Writememory(ByVal Address As Integer, ByVal Value As Long, ByVal Bytes As Integer)

Dim counter-strike sourceLookUp As Process() = Process.GetProcessesByName("Counter-Strike Source")

If counter-strike sourceLookUp.Length = 0 Then

End

End If

Dim processHandle As IntPtr = OpenProcess(&H1F0FFF, 0, counter-strike sourceLookUp(0).Id)

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

CloseHandle(processHandle)

End Function

End Module
6. Making the Module Undetected.
Code:
Module Module1
Private Declare Function OpenProcess Lib "kernel32" (ByVal dwDesiredAccess As Integer, ByVal bInheritHandle As Integer, ByVal dwProcessId As Integer) As Integer
Private 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
Private Declare Function WriteFloatMemory Lib "kernel32" Alias "WriteProcessMemory" (ByVal hProcess As Integer, ByVal lpBaseAddress As Integer, ByRef lpBuffer As Single, ByVal nSize As Integer, ByRef lpNumberOfBytesWritten As Integer) As Integer
Private Declare Function ReadFloat Lib "kernel32" Alias "ReadProcessMemory" (ByVal hProcess As IntPtr, ByVal lpBaseAddress As IntPtr, ByRef buffer As Single, ByVal size As Int32, ByRef lpNumberOfBytesRead As Int32) As Boolean
Private 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
Private Declare Function CloseHandle Lib "kernel32" (ByVal hObject As Integer) As Integer
Public Declare Function GetAsyncKeyState Lib "user32" (ByVal vKey As Long) As Integer
Public RBuff As Long
Public RBuff2 As Single
Public RBuff3 As Integer

Public Function Writememory(ByVal Address As Integer, ByVal Value As Long, ByVal Bytes As Integer)

Dim counter-strike sourceLookUp As Process() = Process.GetProcessesByName("Counter-Strike Source")

If counter-strike sourceLookUp.Length = 0 Then

End

End If

Dim processHandle As IntPtr = OpenProcess(&H1F0FFF, 0, counter-strike sourceLookUp(0).Id)

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

CloseHandle(processHandle)

End Function

End Module
To make a Module Undetected is really simple , just Change the red marked strings with your own definated... But dont forget if you change it here you must change it in your Function part too!

For example, as you can see in the module 'Writememory' is red.
Now you need to change that to what ever definated you want.
Code:
Module Module1
Private Declare Function OpenProcess Lib "kernel32" (ByVal dwDesiredAccess As Integer, ByVal bInheritHandle As Integer, ByVal dwProcessId As Integer) As Integer
Private 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
Private Declare Function WriteFloatMemory Lib "kernel32" Alias "WriteProcessMemory" (ByVal hProcess As Integer, ByVal lpBaseAddress As Integer, ByRef lpBuffer As Single, ByVal nSize As Integer, ByRef lpNumberOfBytesWritten As Integer) As Integer
Private Declare Function ReadFloat Lib "kernel32" Alias "ReadProcessMemory" (ByVal hProcess As IntPtr, ByVal lpBaseAddress As IntPtr, ByRef buffer As Single, ByVal size As Int32, ByRef lpNumberOfBytesRead As Int32) As Boolean
Private 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
Private Declare Function CloseHandle Lib "kernel32" (ByVal hObject As Integer) As Integer
Public Declare Function GetAsyncKeyState Lib "user32" (ByVal vKey As Long) As Integer
Public RBuff As Long
Public RBuff2 As Single
Public RBuff3 As Integer

Public Function mafioso(ByVal Address As Integer, ByVal Value As Long, ByVal Bytes As Integer)

Dim counter-strike sourceLookUp As Process() = Process.GetProcessesByName("Counter-Strike Source")

If counter-strike sourceLookUp.Length = 0 Then

End

End If

Dim processHandle As IntPtr = OpenProcess(&H1F0FFF, 0, counter-strike sourceLookUp(0).Id)

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

CloseHandle(processHandle)

End Function

End Module
-In your function you have this:
Code:
WriteMemory(&H243AEC3C, 1 , 4)
-So what you do now is add your Definated.
Code:
mafioso(&H243AEC3C, 1 , 4)
VB6


Open VB6, hit make new Standard.exe,now we have are basic form page.

1. We need to rename this,notice on the righthand side.You will see project1 properties.
if you notice caption is highlighted, in our properties box.thats the name of our forum. Go ahead and rename it. My Trainer V1.0 or w/e.

2. Ok you need this module, for Counter-Strike Source, to add this module, at the top left of vb6 by the file ,and edit.
Code:
Public Const PROCESS_ALL_ACCESS = &H1F0FFF
Dim f1holder As Integer
Dim timer_pos As Long

'API Declaration
Public Declare Function GetWindowThreadProcessId Lib "user32" (ByVal hwnd As Long, lpdwProcessId As Long) As Long
Public Declare Function OpenProcess Lib "kernel32" (ByVal dwDesiredAccess As Long, ByVal bInheritHandle As Long, ByVal dwProcessId As Long) As Long
Public Declare Function WriteProcessMemory Lib "kernel32" (ByVal hProcess As Long, ByVal lpBaseAddress As Any, lpBuffer As Any, ByVal nSize As Long, lpNumberOfBytesWritten As Long) As Long
Public Declare Function CloseHandle Lib "kernel32" (ByVal hObject As Long) As Long
Public Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal Classname As String, ByVal WindowName As String) As Long
Public Declare Function GetKeyPress Lib "user32" Alias "GetAsyncKeyState" (ByVal key As Long) As Integer
Public Declare Function ReadProcessMem Lib "kernel32" Alias "ReadProcessMemory" (ByVal hProcess As Long, ByVal lpBaseAddress As Any, ByRef lpBuffer As Any, ByVal nSize As Long, lpNumberOfBytesWritten As Long) As Long

Public Function WriteAByte(gamewindowtext As String, address As Long, value As Byte)
Dim hwnd As Long
Dim pid As Long
Dim phandle As Long
hwnd = FindWindow(vbNullString, gamewindowtext)
If (hwnd = 0) Then
MsgBox "The Game Is Not Working", vbCritical, "Error"
End
Exit Function
End If
GetWindowThreadProcessId hwnd, pid
phandle = OpenProcess(PROCESS_ALL_ACCESS, False, pid)
If (phandle = 0) Then
MsgBox "Can't get ProcessId", vbCritical, "Error"
Exit Function
End If
WriteProcessMemory phandle, address, value, 1, 0&
CloseHandle hProcess
End Function

Public Function WriteAnInt(gamewindowtext As String, address As Long, value As Integer)
Dim hwnd As Long
Dim pid As Long
Dim phandle As Long
hwnd = FindWindow(vbNullString, gamewindowtext)
If (hwnd = 0) Then
MsgBox "The Game Is Not Working", vbCritical, "Error"
End
End If
GetWindowThreadProcessId hwnd, pid
phandle = OpenProcess(PROCESS_ALL_ACCESS, False, pid)
If (phandle = 0) Then
MsgBox "Can't get ProcessId", vbCritical, "Error"
Exit Function
End If
WriteProcessMemory phandle, address, value, 2, 0&
CloseHandle hProcess
End Function

Public Function WriteALong(gamewindowtext As String, address As Long, value As Long)
Dim hwnd As Long
Dim pid As Long
Dim phandle As Long
hwnd = FindWindow(vbNullString, gamewindowtext)
If (hwnd = 0) Then
MsgBox "The Game Is Not Working", vbCritical, "Error"
End
Exit Function
End If
GetWindowThreadProcessId hwnd, pid
phandle = OpenProcess(PROCESS_ALL_ACCESS, False, pid)
If (phandle = 0) Then
MsgBox "Can't get ProcessId", vbCritical, "Error"
Exit Function
End If
WriteProcessMemory phandle, address, value, 4, 0&
CloseHandle hProcess
End Function

Public Function ReadAByte(gamewindowtext As String, address As Long, valbuffer As Byte)
Dim hwnd As Long
Dim pid As Long
Dim phandle As Long
hwnd = FindWindow(vbNullString, gamewindowtext)
If (hwnd = 0) Then
MsgBox "The Game Is Not Working", vbCritical, "Error"
End
Exit Function
End If
GetWindowThreadProcessId hwnd, pid
phandle = OpenProcess(PROCESS_ALL_ACCESS, False, pid)
If (phandle = 0) Then
MsgBox "Can't get ProcessId", vbCritical, "Error"
Exit Function
End If
ReadProcessMem phandle, address, valbuffer, 1, 0&
CloseHandle hProcess
End Function

Public Function ReadAnInt(gamewindowtext As String, address As Long, valbuffer As Integer)
Dim hwnd As Long
Dim pid As Long
Dim phandle As Long
hwnd = FindWindow(vbNullString, gamewindowtext)
If (hwnd = 0) Then
MsgBox "The Game Is Not Working", vbCritical, "Error"
End
Exit Function
End If
GetWindowThreadProcessId hwnd, pid
phandle = OpenProcess(PROCESS_ALL_ACCESS, False, pid)
If (phandle = 0) Then
MsgBox "Can't get ProcessId", vbCritical, "Error"
Exit Function
End If
ReadProcessMem phandle, address, valbuffer, 2, 0&
CloseHandle hProcess
End Function

Public Function ReadALong(gamewindowtext As String, address As Long, valbuffer As Long)
Dim hwnd As Long
Dim pid As Long
Dim phandle As Long
hwnd = FindWindow(vbNullString, gamewindowtext)
If (hwnd = 0) Then
MsgBox "The Game Is Not Working", vbCritical, "Error"
End
Exit Function
End If
GetWindowThreadProcessId hwnd, pid
phandle = OpenProcess(PROCESS_ALL_ACCESS, False, pid)
If (phandle = 0) Then
MsgBox "Can't get ProcessId", vbCritical, "Error"
Exit Function
End If
ReadProcessMem phandle, address, valbuffer, 4, 0&
CloseHandle hProcess
End Function

Public Function ReadAFloat(gamewindowtext As String, address As Long, valbuffer As Single)
Dim hWnd As Long
Dim pid As Long
Dim phandle As Long
hWnd = FindWindow(vbNullString, gamewindowtext)
If (hWnd = 0) Then
MsgBox "The Game Is Not Working", vbCritical, "Error"
End
Exit Function
End If

GetWindowThreadProcessId hWnd, pid
phandle = OpenProcess(PROCESS_ALL_ACCESS, False, pid)
If (phandle = 0) Then
MsgBox "Can't get ProcessId", vbCritical, "Error"
Exit Function
End If

ReadProcessMem phandle, address, valbuffer, 4, 0&
CloseHandle hProcess
End Function



Public Function WriteAFloat(gamewindowtext As String, address As Long, value As Single)
Dim hWnd As Long
Dim pid As Long
Dim phandle As Long

hWnd = FindWindow(vbNullString, gamewindowtext)
If (hWnd = 0) Then
MsgBox "The Game Is Not Working", vbCritical, "Error"
End
Exit Function
End If

GetWindowThreadProcessId hWnd, pid
phandle = OpenProcess(PROCESS_ALL_ACCESS, False, pid)
If (phandle = 0) Then
MsgBox "Can't get ProcessId", vbCritical, "Error"
Exit Function
End If

WriteProcessMemory phandle, address, value, 4, 0&
CloseHandle hProcess
End Function
Ok now we have our module, were ready to build our trainer
Now heres how to do buttons.

3.Now to add a button, go to the lefthand side, to the toolbar, double click a button, now you have a button on your form, click it to put were you want it. Notice you can resize it and whatnot.ok now

4.rename this button, look into the properties box again,now your in the properties of this button, scroll threw it, look for caption (and rename it)

5.Adding a code to this button, double click the button, now your in the coding part of the button/trainer. This is what you should see.
Code:
Private Sub Command1_Click()

End Sub
Ok now to add the address and value.
Code:
Private Sub Command1_Click()
Call WriteAlong("Counter-Strike Source", &H243AEC3C , 2)
End Sub
*Note like in VB 2008 you must add &H before every address.

Now add a new button and add this to turn it off.
Code:
Private Sub Command2_Click()
Call WriteAlong("Counter-Strike Source", &H243AEC3C, 1)
End Sub
*Note as you can see the value is different for the 'On' and 'Off' Buttons, reason for that is because in order to actually turn off the hack, you must put the original value of the address.

8. Go to file and save your trainer, change the names to what you want, then go back to file and look for make project1.exe or w/e u named it.exe and your done find your trainer inside C:\Program Files\Microsoft Visual Studio\VB98.

*I hope this tutorial has helped some people. VB is maybe not the right choice to use to make hacks, knowing that C++ is better, but it can help you in some ways.

Credits go to the people who made these modules.

0 komentar: