[Help] Creating a CoD4 Wallhack

Posts 1–12 of 12 · Page 1 of 1
[Help] Creating a CoD4 Wallhack
Hi,I want to create a CoD4 wallhack and ive found a good tutorial, but it is for css, now is my question:can i use this modul,if i change the progress?

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



and if i want to do an undetected cheat, can i use this codes if i also change them ??

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
1. If you want to make it undetected, go make a punkbuster bypass(you won't get that done in vb).

2. You will probably have to nop one or a few addresses, not sure. But if you don't even know how to search or properly use the functions, don't attempt at making an undetected wh.

@ur "source", your module only contains the basic functions you will need to access the process' memory.
For the record, please use MPGH's built in code wrappers next time you post large blocks of code:

[highlight= vb.net] (no spaces)
'...code here
[/ highlight] (no spaces)
You're definately not going to get a working wallhack with VB, I can tell you that. It's going to require alot of coding and experience in DirectX in VB to even display the wallhack to the user. Unless you can somehow activate a thermal FOF layer (the red boxes that appear when using some killstreaks) then there's nothing you can do (possibly NOPing some addresses like Blubb mentioned howver, any memory editing will probably be detected by PB).
Quote Originally Posted by master131 View Post
You're definately not going to get a working wallhack with VB, I can tell you that. It's going to require alot of coding and experience in DirectX in VB to even display the wallhack to the user. Unless you can somehow activate a thermal FOF layer (the red boxes that appear when using some killstreaks) then there's nothing you can do (possibly NOPing some addresses like Blubb mentioned howver, any memory editing will probably be detected by PB).
Memory editing memory IS detected by PB(obvious).

I already got a working nametags hack in mw2 by nopping 1 address...but that wasn't a wallhack so...you are on a better way with c++ :P
Quote Originally Posted by Blubb1337 View Post
Memory editing memory IS detected by PB(obvious).

I already got a working nametags hack in mw2 by nopping 1 address...but that wasn't a wallhack so...you are on a better way with c++ :P
yes, but i dont have knowledge of c++, only visual basic
C++ is way more powerful and it's the best to make hacks im making a table viewer for reversing structs in C++
Quote Originally Posted by user590177 View Post
C++ is way more powerful and it's the best to make hacks im making a table viewer for reversing structs in C++
We know that its the most powerful language in the world. But at some areas it just sucks so much. It totally sucks in Rapid Application Development (RAD) for example.
To make wallhack you're probably gonna need to inject your own module in the process. If you do it in VB you're going to have to find a way to inject the CLR/CLI ( whatever the hell its called ) along with your module.

After you've done this, learn the basics of DirectX and you'll understand how wallhack works.
What David said.

Also, if you haven't gotten help in 2 weeks, you're not going to get it, so don't bump threads.
Posts 1–12 of 12 · Page 1 of 1
This thread is closed for replies.

Tags for this Thread

None

Need help?