Noob Noping help !

Posts 1–14 of 14 · Page 1 of 1
Noob NOP'ing help !
Hey watsup guys im trying to have a go at making a hack altho this hack crashes unfortunately :

Code:
#include <windows.h>
#define dwpLTClient 0x377F4930
#define RECOIL1 0x37465A60
#define RECOIL2 0x37234EB9
#define RECOIL3 0x37465A74
#define RECOIL4 0x37465A77
#define RECOIL5 0x37465A80

bool IsGameReadyForHook()
{
if( GetModuleHandleA( "d3d9.dll" ) != NULL
&& GetModuleHandleA( "ClientFX.fxd" ) != NULL
&& GetModuleHandleA( "CShell.dll" ) != NULL )
return true;
return false;
}


bool memoria( void * pDest, char * szPatch, size_t sSize ) //Nopping Method
{
    DWORD dwOrgProtect = NULL;
    if ( !VirtualProtect ( pDest, sSize, PAGE_EXECUTE_READWRITE, &dwOrgProtect ))
        return FALSE;

    memcpy( pDest, szPatch, sSize );
    VirtualProtect( pDest, sSize, dwOrgProtect, NULL );
    return TRUE;
}



void main()
	{
    while (!IsGameReadyForHook()){
        Sleep(222);
	}
    bool Recoil = false;
    
    while(true)
{

if(GetAsyncKeyState(VK_NUMPAD2) < 0){ // No Recoil, On Off
            if(Recoil){
			memoria((LPVOID)(RECOIL1), "\xD8\x66\x54", 3);
			memoria((LPVOID)(RECOIL2), "\xD9\x46\x54", 3);
			memoria((LPVOID)(RECOIL3), "\xD9\x5E\x54", 3);
			memoria((LPVOID)(RECOIL4), "\xD9\x46\x48", 3);
			memoria((LPVOID)(RECOIL5), "\xD9\x5E\x48", 3);
				Recoil = false;
            } else {
            memoria((LPVOID)(RECOIL1), "\x90\x90\x90", 3);
            memoria((LPVOID)(RECOIL2), "\x90\x90\x90", 3);
            memoria((LPVOID)(RECOIL3), "\x90\x90\x90", 3);
            memoria((LPVOID)(RECOIL4), "\x90\x90\x90", 3);
            memoria((LPVOID)(RECOIL5), "\x90\x90\x90", 3);
                Recoil = true;

            }
        }


      Sleep(100);  
	}
}


DWORD WINAPI HackStart(LPVOID)
{
	while( !IsGameReadyForHook() )
	Sleep(400);
	main();

	return 0;
}


BOOL APIENTRY DllMain( HMODULE hModule,DWORD  dwReason,LPVOID lpReserved)
{		DisableThreadLibraryCalls(hModule);
   if( dwReason == DLL_PROCESS_ATTACH )
    {
		if( MessageBox(0, TEXT("    @osma8 first hack  \n\n\n  Do you want to use the hack?"), TEXT("Lol"), MB_YESNO)==IDYES){
        CreateThread(NULL, NULL, HackStart, NULL, NULL, NULL);
    }else{	
	 MessageBox(0, TEXT("Hack Dis-Attached"), TEXT("MPGH.Net"), MB_ICONINFORMATION);
			} 
    }
    return TRUE;
}
Anybody kno why its crashing?
Quote Originally Posted by @osma8 View Post
Hey watsup guys im trying to have a go at making a hack altho this hack crashes unfortunately :

Code:
#include <windows.h>
#define dwpLTClient 0x377F4930
#define RECOIL1 0x37465A60
#define RECOIL2 0x37234EB9
#define RECOIL3 0x37465A74
#define RECOIL4 0x37465A77
#define RECOIL5 0x37465A80

bool IsGameReadyForHook()
{
if( GetModuleHandleA( "d3d9.dll" ) != NULL
&& GetModuleHandleA( "ClientFX.fxd" ) != NULL
&& GetModuleHandleA( "CShell.dll" ) != NULL )
return true;
return false;
}


bool memoria( void * pDest, char * szPatch, size_t sSize ) //Nopping Method
{
    DWORD dwOrgProtect = NULL;
    if ( !VirtualProtect ( pDest, sSize, PAGE_EXECUTE_READWRITE, &dwOrgProtect ))
        return FALSE;

    memcpy( pDest, szPatch, sSize );
    VirtualProtect( pDest, sSize, dwOrgProtect, NULL );
    return TRUE;
}



void main()
	{
    while (!IsGameReadyForHook()){
        Sleep(222);
	}
    bool Recoil = false;
    
    while(true)
{

if(GetAsyncKeyState(VK_NUMPAD2) < 0){ // No Recoil, On Off
            if(Recoil){
			memoria((LPVOID)(RECOIL1), "\xD8\x66\x54", 3);
			memoria((LPVOID)(RECOIL2), "\xD9\x46\x54", 3);
			memoria((LPVOID)(RECOIL3), "\xD9\x5E\x54", 3);
			memoria((LPVOID)(RECOIL4), "\xD9\x46\x48", 3);
			memoria((LPVOID)(RECOIL5), "\xD9\x5E\x48", 3);
				Recoil = false;
            } else {
            memoria((LPVOID)(RECOIL1), "\x90\x90\x90", 3);
            memoria((LPVOID)(RECOIL2), "\x90\x90\x90", 3);
            memoria((LPVOID)(RECOIL3), "\x90\x90\x90", 3);
            memoria((LPVOID)(RECOIL4), "\x90\x90\x90", 3);
            memoria((LPVOID)(RECOIL5), "\x90\x90\x90", 3);
                Recoil = true;

            }
        }


      Sleep(100);  
	}
}


DWORD WINAPI HackStart(LPVOID)
{
	while( !IsGameReadyForHook() )
	Sleep(400);
	main();

	return 0;
}


BOOL APIENTRY DllMain( HMODULE hModule,DWORD  dwReason,LPVOID lpReserved)
{		DisableThreadLibraryCalls(hModule);
   if( dwReason == DLL_PROCESS_ATTACH )
    {
		if( MessageBox(0, TEXT("    @osma8 first hack  \n\n\n  Do you want to use the hack?"), TEXT("Lol"), MB_YESNO)==IDYES){
        CreateThread(NULL, NULL, HackStart, NULL, NULL, NULL);
    }else{	
	 MessageBox(0, TEXT("Hack Dis-Attached"), TEXT("MPGH.Net"), MB_ICONINFORMATION);
			} 
    }
    return TRUE;
}
Anybody kno why its crashing?

Firstly, just looking through your code, you're doing a crazy loop.

Basically this is what you're doing:

Code:
bool Recoil;

Recoil = true;
Recoil = false;

Recoil = true;
Recoil = false;

Recoil = true;
Recoil = false;

Recoil = true;
Recoil = false;

Recoil = true;
Recoil = false;

Recoil = true;
Recoil = false;

Recoil = true;
Recoil = false;

Recoil = true;
Recoil = false;
Not exactly smart. Update and repost.

Also, check your addresses while you're at it.
Kk will update everything after CA maintanence
Quote Originally Posted by @osma8 View Post
Kk will update everything after CA maintanence
How long will the maintanence take ?
I wanna test my own hack xD
read it wrong :P xD
Quote Originally Posted by kotentopf View Post
read it wrong :P xD
LOl saw what you said haha b4 u changed.

Help me fix the code
Quote Originally Posted by @osma8 View Post
LOl saw what you said haha b4 u changed.

Help me fix the code
Have you fixed your retarded loop yet? (Yes, it was retarded, because it achieved something in a very roundabout way. I'm not sure if you intended to do this or not, but I am looking at the final result).
Quote Originally Posted by freedompeace View Post
Have you fixed your retarded loop yet? (Yes, it was retarded, because it achieved something in a very roundabout way. I'm not sure if you intended to do this or not, but I am looking at the final result).
Yes i have want to test it tho CA is down lolol.
Code:
bool recoil = false;

if(GetAsyncKeyState(VK_NUMPAD1)<0) {
    recoil != recoil
}

if(recoil) {
      //Do no recoil
}
;D
Quote Originally Posted by ac1d_buRn View Post
Code:
bool recoil = false;

if(GetAsyncKeyState(VK_NUMPAD1)<0) {
    recoil != recoil
}

if(recoil) {
      //Do no recoil
}
;D

Yah, do what ac1d_bUrn said, but make sure it's off before entering a game because of Nexon's Anti-Cheat system... Also you can use mine! http://www.mpgh.net/forum/207-combat...e-way-nop.html
Thanks guys lol
"#define dwpLTClient 0x377F4930"

Just wondering why this defined? Also is that correct Address?

Im converting this library to Delphi so I can can test it, I seen most comes from the template in an older post...
Do it in ASM.. Its not that hard
That has nothing to do with my question, why is it defined when its not even used in the code, and I would like to know if thats the correct VA because from another post they say "377E7810" is the correct address, which then I converted to Delphi the 2 functions..

TCP and Write bytes to address, Im not sure which works as im new to game hacking..

but here are my 2 functions anyway in Delphi..

Code:
//PTC Method
Procedure PushToConsole(command: string);
var
  LTClient, CONoff: Dword;
begin
  LTClient := $377E7810;
  CONoff := LTClient + $00000208;
  asm
    push command;
    call CONoff;
    add esp, $00000004;
  end;
end;

// Write Bytes to Address Method
Function WriteIt(pAddress: Pointer; Bytes: Array of Byte): Boolean;
var
  OldProtect: Cardinal;
begin
  if not VirtualProtect(pAddress, SizeOf(Bytes), PAGE_EXECUTE_READWRITE,
    OldProtect) then
    Result := False;
  Move(Bytes, pAddress^, SizeOf(Bytes));
  VirtualProtect(pAddress, SizeOf(Bytes), OldProtect, OldProtect);
  Result := True;
end;
I haven't Tested it yet because the server is down.. Just want to know before I test if that LTClient is correct VA.

And yes could convert this to Assembly as they are all just API calls, But I prefer Delphi for easy syntax and less work, Also writing it in Delphi will let me expand it...
Posts 1–14 of 14 · Page 1 of 1

Post a Reply

Similar Threads

Tags for this Thread

None

Talk with us