DO NOT DEAL WITH THIS MEMBER
Jun 26, 2012 11:55 AM
(This post was last modified: Jun 26, 2012 11:56 AM by MatthewHodnick.)
Ok, so I can't get no recoil to work with my current code. Can anyone help? I don't know what value to set the address and I also don't know if the address is correct. This is fourDeltaOne by the way. Another problem I have is checking if the value is correct, there's an if statement on line 43. Here's the current code:
Code // MW2_NoRecoil.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include <Windows.h>
#include <iostream>
void pauseScreen(); // prototype
int _tmain(int argc, _TCHAR* argv[]) // main method
{
int recoilAmount = 0; // a variable to disable recoil, takes effect in WriteProcessMemory()
SetConsoleTitle(L"MW2 fourDeltaOne No Recoil - by LEGiiTxCHAOTiiC / Piggy"); // title of CMD window
HWND hWnd = FindWindow(NULL, TEXT("Modern Warfare 2")); // find the 4D1 window
if(hWnd == NULL) // if unable to find window
{
std::cerr << "\n\n\nERROR :: Cannot find fourDeltaOne window" << std::endl; // print error
}
else // if able to find window
{
std::cout << "Welcome to MW2 fourDeltaOne No Recoil!" << std::endl; // intro message
DWORD pId; // process id
GetWindowThreadProcessId(hWnd, &pId); // get the window's process id
HANDLE hProc = OpenProcess(PROCESS_ALL_ACCESS, FALSE, pId); // open 4D1 process
if(!hProc) // if can't open 4D1 process
{
std::cerr << "\n\n\nERROR :: Cannot open process" << std::endl; // print error
}
else // if it works
{
// [iw4mp.exe+0x1AABE1]
WriteProcessMemory(hProc, (LPVOID)0xB35980, &recoilAmount, (DWORD)sizeof (recoilAmount), NULL); // this is where we write the memory to prevent recoil effect
if(recoilAmount == 0) // if success
{
std::clog << "\n\n\nSUCCESS :: Process memory written - Your stats should be changed" << std::endl; // print succes
}
else // if fail
{
std::cerr << "\n\n\nERROR :: Process write failure - Cannot change your stats" << std::endl; // print error
}
CloseHandle(hProc); // unhook from mw2
}
}
pauseScreen();
return 0;
}
void pauseScreen() // pause console to allow user to see output
{
std::cout << "\n\n\nPress <Enter> to continue..." << std::endl;
std::cin.clear();
std::cin.ignore();
}
(Jun 26, 2012 11:55 AM)MatthewHodnick Wrote: Ok, so I can't get no recoil to work with my current code. Can anyone help? I don't know what value to set the address and I also don't know if the address is correct. This is fourDeltaOne by the way. Another problem I have is checking if the value is correct, there's an if statement on line 43. Here's the current code:
Code // MW2_NoRecoil.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include <Windows.h>
#include <iostream>
void pauseScreen(); // prototype
int _tmain(int argc, _TCHAR* argv[]) // main method
{
int recoilAmount = 0; // a variable to disable recoil, takes effect in WriteProcessMemory()
SetConsoleTitle(L"MW2 fourDeltaOne No Recoil - by LEGiiTxCHAOTiiC / Piggy"); // title of CMD window
HWND hWnd = FindWindow(NULL, TEXT("Modern Warfare 2")); // find the 4D1 window
if(hWnd == NULL) // if unable to find window
{
std::cerr << "\n\n\nERROR :: Cannot find fourDeltaOne window" << std::endl; // print error
}
else // if able to find window
{
std::cout << "Welcome to MW2 fourDeltaOne No Recoil!" << std::endl; // intro message
DWORD pId; // process id
GetWindowThreadProcessId(hWnd, &pId); // get the window's process id
HANDLE hProc = OpenProcess(PROCESS_ALL_ACCESS, FALSE, pId); // open 4D1 process
if(!hProc) // if can't open 4D1 process
{
std::cerr << "\n\n\nERROR :: Cannot open process" << std::endl; // print error
}
else // if it works
{
// [iw4mp.exe+0x1AABE1]
WriteProcessMemory(hProc, (LPVOID)0xB35980, &recoilAmount, (DWORD)sizeof (recoilAmount), NULL); // this is where we write the memory to prevent recoil effect
if(recoilAmount == 0) // if success
{
std::clog << "\n\n\nSUCCESS :: Process memory written - Your stats should be changed" << std::endl; // print succes
}
else // if fail
{
std::cerr << "\n\n\nERROR :: Process write failure - Cannot change your stats" << std::endl; // print error
}
CloseHandle(hProc); // unhook from mw2
}
}
pauseScreen();
return 0;
}
void pauseScreen() // pause console to allow user to see output
{
std::cout << "\n\n\nPress <Enter> to continue..." << std::endl;
std::cin.clear();
std::cin.ignore();
}
[/CODE]
I have a great idea. Stop copy pasting you fucking piece of shit and go actually learn something. Stupid leecher.
DO NOT DEAL WITH THIS MEMBER
Jun 26, 2012 12:02 PM
(This post was last modified: Jun 26, 2012 12:05 PM by MatthewHodnick.)
(Jun 26, 2012 11:56 AM)Feminist Wrote: I have a great idea. Stop copy pasting you fucking piece of shit and go actually learn something. Stupid leecher.
lol, I'm not C&P. And I never asked for anyone to do it for me, just what value to set the address to. I don't C&P without credits lol, and this is nothing at all to have to C&P, this is simple. I learned this in a beginners book so I didn't copy anything. All I was asking was what value... nothing like please do my project. I'm not a LQ skid, if I was, I'd be in the VB section asking how to make a crypter, but I'm not. Please understand, and don't always assume the worst of people. Thank you, ~MatthewHodnick.
EDIT: Also, if I didn't know any of this, I wouldn't be posting it simply because it'd be obvious that I would be skidding, but in this case I'm not. It's all my code from VC++. I commented it, and again, it's nothing special so I have no reason to copy and paste it.
Jun 26, 2012 12:04 PM
(This post was last modified: Jun 26, 2012 12:06 PM by _SLQ.)
How about using a memory scanner to find the address yourself? Also DLL injection would be better suited for things such as recoil.
(Jun 26, 2012 12:02 PM)MatthewHodnick Wrote: lol, I'm not C&P. And I never asked for anyone to do it for me, just what value to set the address to. I don't C&P without credits lol, and this is nothing at all to have to C&P, this is simple. I learned this in a beginners book so I didn't copy anything. All I was asking was what value... nothing like please do my project. I'm not a LQ skid, if I was, I'd be in the VB section asking how to make a crypter, but I'm not. Please understand, and don't always assume the worst of people. Thank you, ~MatthewHodnick.
Doesn't mean people in the C/C++ section can't be LQ skids.
Okay, firstly I may have came off as too harsh.
How do you think you can find the address? Open up a debugger and go search for it. If you can't do this, go and learn how to debug something from google.
Once you have enough expertise, maybe a few years from now, feel free to make your own hacks.
(Jun 26, 2012 12:04 PM)_SLQ Wrote: How about using a memory scanner to find the address yourself? Also DLL injection would be better than this.
Vac would ban him if he attempts to write to this address, especially if it's the no recoil address. It's a lot of work, nobody will do it for you. If you have to ask how, don't even attempt to, because that shows you are years away from your goal. Please don't make suggestions when you know nothing, DLL injection would not be better because its written to the PEB and the anticheat would know you injected it and ban you (esp if its shit loadlibrary injection).
DO NOT DEAL WITH THIS MEMBER
(Jun 26, 2012 12:05 PM)Feminist Wrote: Doesn't mean people in the C/C++ section can't be LQ skids.
Okay, firstly I may have came off as too harsh.
How do you think you can find the address? Open up a debugger and go search for it. If you can't do this, go and learn how to debug something from google.
Once you have enough expertise, maybe a few years from now, feel free to make your own hacks.
Ok, I'll search using OllyDbg. Also, I'm still learning more over time.
(Jun 26, 2012 12:06 PM)MatthewHodnick Wrote: Ok, I'll search using OllyDbg. Also, I'm still learning more over time.
I'm happy you are willing to learn. PM me if you actually want to learn things, but I will not do stuff for you.
Offer is open to anyone
DO NOT DEAL WITH THIS MEMBER
Jun 26, 2012 12:17 PM
(This post was last modified: Jun 26, 2012 12:20 PM by MatthewHodnick.)
(Jun 26, 2012 12:12 PM)Feminist Wrote: I'm happy you are willing to learn. PM me if you actually want to learn things, but I will not do stuff for you.
Offer is open to anyone
Thanks for the offer. I'll consider it if I need help with anything else. But one question, I modified the code... is this statement possible? You don't have to correct it or anything like that, just if you are willing tell me if it's valid or not.
Code for(;;)
{
if(WriteProcessMemory(hProc, (LPVOID)0xB35980, noRecoil, (DWORD)sizeof (noRecoil), NULL)) // this is where we write the memory to prevent recoil effect
{
std::clog << "\n\n\nSUCCESS :: Process memory written - Your stats should be changed" << std::endl; // print succes
}
else // if fail
{
std::cerr << "\n\n\nERROR :: Process write failure - Cannot change your stats" << std::endl; // print error
}
}
EDIT: Sorry for "stats" that's from my cod4 console trainer, i copied the source from my own project to save time lol
(Jun 26, 2012 12:17 PM)MatthewHodnick Wrote: Thanks for the offer. I'll consider it if I need help with anything else. But one question, I modified the code... is this statement possible? You don't have to correct it or anything like that, just if you are willing tell me if it's valid or not.
Code for(;;)
{
if(WriteProcessMemory(hProc, (LPVOID)0xB35980, noRecoil, (DWORD)sizeof (noRecoil), NULL)) // this is where we write the memory to prevent recoil effect
{
std::clog << "\n\n\nSUCCESS :: Process memory written - Your stats should be changed" << std::endl; // print succes
}
else // if fail
{
std::cerr << "\n\n\nERROR :: Process write failure - Cannot change your stats" << std::endl; // print error
}
}
Yeah it would work if the memory address is correct and noRecoil byte array is what its suppose to do. But I don't think you have the correct address or bytes. Try hacking something easier with no anticheat for now. However, it would just keep writing it forever. If this is your intention add a sleep delay so it doesnt hog too many resources
|