Slirpa (12-18-2012)
Got bored also someone asked me for it, took me a minute to make you have to basically copy & paste it.Code:Imports System.Runtime.InteropServices Public Class Form1 <DllImport("kernel32.dll")> Private Shared Function WriteProcessMemory(ByVal hProcess As IntPtr, ByVal lpBaseAddress As IntPtr, <[In](), Out()> ByVal buffer As Byte(), ByVal size As UInt32, ByRef lpNumberOfBytesWritten As IntPtr) As Int32 End Function Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim Buffer As Byte() = New Byte() {&H90, &H90, &H90, &H90, &H90} WriteProcessMemory(Process.GetProcessesByName("IW5MP")(0).Handle, New IntPtr(&H427029), Buffer, UInt32.Parse(Buffer.Length), IntPtr.Zero) End Sub End Class
Credits, @-InSaNe- for the offset......
Last edited by Geometrical; 12-18-2012 at 06:33 PM.
Slirpa (12-18-2012)
I thought this one was patched? @-InSaNe- didn't you say the 5 NOPs Crash the game? O_O
Kenshin13 (12-18-2012)
It did crash for previous versions.. maybe it is working again.. can't test so I don't know... Btw, NOPing functions is highly risky
And, @Geometrical, how did you find the offset? Seems to me you forgot the credits.. again.
Last edited by MarkHC; 12-18-2012 at 06:28 PM.
CoD Minion from 09/19/2012 to 01/10/2013
Yes. Here:
As I know you don't know C++, I'll make it easier for you. Simply Find the offset for ViewMatrix (I believe my sig scanner has the pattern for it) then on a timer:Code:typedef struct { Vector Recoil; //0x0044 <= See this? Vector vOrigin; //0x0050 float DeltaOrigin[3]; //0x005C float ReadViewAngleY; //0x0068 float ReadViewAngleX; //0x006C char _0x0070[108]; float SetViewAngleY; //0x00DC float SetViewAngleX; //0x00E0 } ViewMatrix_t; //Size=0x00A4
(Assuming &H100 is the offset found by the scanner)
Totally undetected. But it is a bit buggy sometimes...Code:WriteFloat(&H100, 0); WriteFloat(&H104, 0); WriteFloat(&H108, 0);
Last edited by MarkHC; 12-18-2012 at 06:44 PM.
CoD Minion from 09/19/2012 to 01/10/2013
Geometrical (12-18-2012)
Yeah.. you have to set it to the lower value possible, 1ms. And I think that's still too slow...
CoD Minion from 09/19/2012 to 01/10/2013
Geometrical (12-19-2012)
Do you know what I'd have to do to make a hook? I haven't been able to find a tutorial on how to even make a basic hook.
Also why wouldn't it be possible to do this in an external application?
https://www.mpgh.net/forum/161-progra...tion-hook.html
^That's a nice little tutorial in C++ and Assembly on how to make a hook. (It's a mid function hook but.......)
Also it's not possible if you understand how the a hook works.
You overwrite the game code internally and tell it to call your code which you also keep in the same process (As with a DLL ... )
The game cannot call code from another process thus the only way to make it call "external" code is by injecting it.