No one wants to help? D:
I am trying to start hacking, and I just want to see if it works.
Here's the code, why doesn't it work in-game, I have the recent address/byte.
Please tell me what I am doing wrong there, and please hesitate to flame me xD
Code:
#include <windows.h>
int HackOn = 0;
int HackMax = 10;
bool test = false;
#define ADDR_SBULLLETS 0x3740DDB6
void Main (void)
{
while(1)
{
if(GetAsyncKeyState(VK_NUMPAD1)&1)
{
test = (!test);
}
if(GetAsyncKeyState(VK_NUMPAD2)&1)
{
HackOn ++;
if(HackOn == HackMax) HackOn = 0;
}
if(test)
{
memcpy( (PBYTE)ADDR_SBULLLETS, (PBYTE)"\x90\x90\x90", 3 );
}else{
memcpy( (PBYTE)ADDR_SBULLLETS, (PBYTE)"\x0F\x94\xC0", 3 );
}
}
}
DWORD WINAPI Lesson (LPVOID)
{
Main();
return 1;
}
BOOL WINAPI DllMain ( HMODULE hDll, DWORD dwReason, LPVOID lpReserved )
{
DisableThreadLibraryCalls(hDll);
if ( dwReason == DLL_PROCESS_ATTACH )
{
CreateThread(NULL, NULL, Lesson, NULL, NULL, NULL);
}
return TRUE;
}
(Of course it's not my source code, I'm just starting, when I'm done learning I will make my own and not c/p.)
Last edited by MohammaDMD18; 10-29-2011 at 01:29 PM.
No one wants to help? D:
ill give u 2 questions to think about. why do i have HackMax at 10 if u have one feature... and y does it only #include windows...
For the love of god use [code] tags and format your source.
You need to make sure the client is loaded and in game. I would add
andCode:bool HookReady() { if( GetModuleHandleA( "d3d9.dll" ) //Not required if just memory hacking != NULL && GetModuleHandleA("CShell.dll" ) != NULL && GetModuleHandleA( "ClientFX.fxd" ) != NULL) return true; return false; }
Code:bool inGame() { if((*(INT*)GameStatus_ADDR== 1)) return true; else return false; }
The in the top of your main method add a check to see if the modules are loaded and sleep for like 25ms -35ms if not AND also add the inGame() method along side your test field to make sure you are in game before memory is modified and have it normal when you are out of game.
Thanks for the help, finally some help.
Did I said please hesitate to flame me? :P
Very new...
More hep is appreciated.
Here you go, this should work.
Try learning more C++, How memory works and ASM helps too.Code:#include <windows.h> #define SuperBullets 0x3740DDB6 /*Defining the address of SuperBullets*/ void Main() { if(GameStatus == 1)/*Checking if In game*/ { if(GetAsyncKeyState (VK_NUMPAD1))/*If Key is pressed*/ { memcpy((LPVOID)SuperBullets, "\x33\xC0\x90", 3);//ON } else { memcpy((LPVOID)SuperBullets, "\x0F\x94\xC0", 3);//OFF } } } bool IsGameReady(void) //Gets the handle of all of these { if( GetModuleHandleW( L"d3d9.dll" ) != NULL && GetModuleHandleW( L"ClientFX.fxd" ) != NULL && GetModuleHandleW( L"CShell.dll" ) != NULL ) return true; return false; } DWORD WINAPI dwMainThread(LPVOID) { while ( !IsGameReady() ) Sleep(100); Main(); return 0; } BOOL WINAPI DllMain( HINSTANCE hinstDLL, // handle to DLL module DWORD fdwReason, // reason for calling function LPVOID lpReserved ) // reserved { // Perform actions based on the reason for calling. switch( fdwReason ) { case DLL_PROCESS_ATTACH: // Initialize once for each new process. CreateThread(NULL, NULL, (LPTHREAD_START_ROUTINE)dwMainThread, NULL, NULL, NULL); MessageBoxA(NULL, "Message", "Caption", MB_OK); break; case DLL_THREAD_ATTACH: // Do thread-specific initialization. break; case DLL_THREAD_DETACH: // Do thread-specific cleanup. break; case DLL_PROCESS_DETACH: // Perform any necessary cleanup. break; } return TRUE; // Successful DLL_PROCESS_ATTACH. }
I Read All Of My PM's & VM'sIf you need help with anything, just let me know.
Staff Administrator Since 10.13.2019
Publicist Since 04.04.2015
Middleman Since 04.14.2014
Global Moderator Since 08.01.2013
Premium Since 05.29.2013
Minion+ Since 04.18.2013
Combat Arms Minion Since 12.26.2012
Contributor Since 11.16.2012
Member Since 05.11.2010
That code wont work @comando2056. When I hit the numpad 1 button, the superbullets turns on but as soon as I let go it will turn off again.
Donate:
BTC: 1GEny3y5tsYfw8E8A45upK6PKVAEcUDNv9
Handy Tools/Hacks:
Extreme Injector v3.7.3
A powerful and advanced injector in a simple GUI.
Can scramble DLLs on injection making them harder to detect and even make detected hacks work again!
Minion Since: 13th January 2011
Moderator Since: 6th May 2011
Global Moderator Since: 29th April 2012
Super User/Unknown Since: 23rd July 2013
'Game Hacking' Team Since: 30th July 2013
--My Art--
[Roxas - Pixel Art, WIP]
[Natsu - Drawn]
[Natsu - Coloured]
All drawings are coloured using Photoshop.
--Gifts--
[Kyle]
[MPGH]Flengo (10-30-2011)
Just have the keypress trigger a boolean to change and use that same variable in a loop to determine to modify the memory.
Code://At top of program BOOL sBullets = false; //top of main loop if(GetAsyncKeyState (VK_NUMPAD1)) sBullets = !sBullets //Switch state to opposite //In loop farther down if(sBullets ) memcpy((LPVOID)SuperBullets, "\x33\xC0\x90", 3);//ON else memcpy((LPVOID)SuperBullets, "\x0F\x94\xC0", 3);//OFF
I Read All Of My PM's & VM'sIf you need help with anything, just let me know.
Staff Administrator Since 10.13.2019
Publicist Since 04.04.2015
Middleman Since 04.14.2014
Global Moderator Since 08.01.2013
Premium Since 05.29.2013
Minion+ Since 04.18.2013
Combat Arms Minion Since 12.26.2012
Contributor Since 11.16.2012
Member Since 05.11.2010
I Read All Of My PM's & VM'sIf you need help with anything, just let me know.
Staff Administrator Since 10.13.2019
Publicist Since 04.04.2015
Middleman Since 04.14.2014
Global Moderator Since 08.01.2013
Premium Since 05.29.2013
Minion+ Since 04.18.2013
Combat Arms Minion Since 12.26.2012
Contributor Since 11.16.2012
Member Since 05.11.2010
It injects perfectly, even the pop-up comes, but in-game the superbullet doesn't work...hmm...I'm gonna keep learning C++, while trying to creat 1 working hack for CA, while being a noob and c/p-ing the source codes D:
I've realized how hard coding is, now on I'm gonna show some real respect to the coders, thank them and all that.
Last edited by MohammaDMD18; 10-30-2011 at 06:48 PM.
The code given isn't on a while loop
No I do not make game hacks anymore, please stop asking.
Last edited by Flengo; 10-31-2011 at 02:05 PM.
I Read All Of My PM's & VM'sIf you need help with anything, just let me know.
Staff Administrator Since 10.13.2019
Publicist Since 04.04.2015
Middleman Since 04.14.2014
Global Moderator Since 08.01.2013
Premium Since 05.29.2013
Minion+ Since 04.18.2013
Combat Arms Minion Since 12.26.2012
Contributor Since 11.16.2012
Member Since 05.11.2010