War Rock Cheat Programming Discussion

12/17/2014 10:28 Zn1337#886
Adddys :rolleyes:

HTML Code:
//[][===============================================][]
//[]                   ZNOEN LOGGER                  []
//[]              17-12-2014  |  10:00:48            []
//[]                 STATUS: Private                 []
//[][===============================================][]
//[][==================[Pointers]===================][]
#define ADR_PlayerPointer		0xAE5820
#define ADR_ServerPointer		0xAE47C4
#define ADR_ViewAngles			0xAE36F4
#define ADR_DevicePointer		0x903BF4
#define ADR_UserPointer			0xAE47C4
#define ADR_HealthPointer		0x31FB8
#define ADR_RemotePointer		0xC1CCDC
#define ADR_BasePointer			0xB36DF0
#define ADR_WeaponPointer1		0xC10C20
#define ADR_WeaponPointer2		0xB038E0
//[][===============================================][]
//[][===================[Address]===================][]
#define ADR_NoRecoil1			0xC444
#define ADR_NoRecoil2			0xC448
#define ADR_NoRecoil3			0xC44C
#define ADR_NoSpread1			0xAE9F7C
#define ADR_NoSpread2			0xAE9F80
#define ADR_FastAmmo			0xAE9EE0
#define ADR_NoBounds1			0xC2D990
#define ADR_NoBounds2			0xC2D994
#define ADR_NoBounds3			0xC2D998
#define ADR_IGNName			0xB37434
#define ADR_QuickSpawn1			0xC38024
#define ADR_QuickSpawn2			0xC38028
#define ADR_QuickSpawn3			0xC3802C
#define ADR_FogColor1			0xAE5D30
#define ADR_FogColor2			0xAE5D2C
#define ADR_FogColor3			0xAE5D28
#define ADR_GlassWalls			0xAE37FC
#define ADR_NoWater1			0xAEC6EC
#define ADR_NoWater2			0xAEC6F0
#define ADR_Scope			0xAE3733
#define ADR_FarFog			0xAEC70C
#define ADR_NearFog			0xAEC704
//[][===============================================][]
//[][===================[Offsets]===================][]
#define OFS_Gravity_X			0xC4B4
#define OFS_Gravity_Y			0xC4BC
#define OFS_Gravity_Z			0xC4B8
#define OFS_X				0x10304
#define OFS_Z				0x1030C
#define OFS_Y				0x10314
#define OFS_Weapon1			0x101F0
#define OFS_Weapon2			0x101F2
#define OFS_Weapon3			0x101F4
#define OFS_Slot5			0x3415C
#define OFS_Slot6			0x3415D
#define OFS_Slot7			0x3415E
#define OFS_Slot8			0x3415F
#define OFS_LocalIndex			0xC498
#define OFS_NoFallDamage		0x102EC
#define OFS_FastNade			0x10118
#define OFS_NoM134Idle			0x103FC
#define OFS_Premium			0x3C8
#define OFS_3DPlayerView		0x101A4
#define OFS_NoDelay			0x10414
#define OFS_Invisible			0x40794
#define OFS_Level			0x40750
#define OFS_Dinar			0x40760
#define OFS_RoomMaster			0x31564
#define OFS_SuperMaster			0x316A8
//[][===============================================][]
//[][===================[Memory]====================][]
#define ADR_BoneShot			0x907BA8
#define ADR_WUW				0xAEC6F4
#define ADR_QuickPlantDefuse		0xAE3718
#define ADR_SuperNoSpread		0x906BC8
#define ADR_Speed			0x906BC0
#define ADR_SpeedRoll			0x906D88
#define ADR_StaminaStart		0x8CF258
#define ADR_NoEndBanner			0x8D5320
#define ADR_STW				0x8C7AB4
#define ADR_WTW				0x8CE6F8
#define ADR_StaminaRoll			0x8CF264
#define ADR_WeaponGravity		0x906B80
#define ADR_AntiAFK			0xC2D944
//[][===============================================][]
//[][===================[Credits]===================][]
//[]                     AeroMan                     [] 
//[]                     Systomar                    []
//[]                     n4n033                      []
//[][===============================================][]
12/19/2014 07:20 wren00#887
#req OFS_DEVICEPTR
Thanks.
12/19/2014 09:14 Zn1337#888
#Request OFS_Boneshot
Thankyou :)
12/19/2014 15:44 Kazbah__#889
The devicepointer ofs never change if they dont change to a different directx
12/21/2014 21:35 Alliance™#890
Code:
typedef int(__stdcall *hsend)(SOCKET s, const char *buf, int len, int flags);
hsend osend;

int __stdcall msend(SOCKET s, const char *buf, int len, int flags)
{
	cout << "Hooked" << endl;
	return osend(s, buf, len, flags);
}

void Initialize()
{
	tool->console();
	
	HMODULE wsDll = NULL;
	while (!wsDll)
	{
		wsDll = GetModuleHandle("ws2_32.dll");
	}
	tool->DetourFunc((BYTE *)(DWORD)GetProcAddress(wsDll, "send"), (BYTE*)msend,5);
}
This is my code fou hook send function but idk why not work...someone can help me and show me where is error?
12/21/2014 23:06 +Yazzn#891
osend isn't initialized
12/22/2014 00:29 MRx86™#892
Quote:
Originally Posted by Alliance™ View Post
Code:
typedef int(__stdcall *hsend)(SOCKET s, const char *buf, int len, int flags);
hsend osend;

int __stdcall msend(SOCKET s, const char *buf, int len, int flags)
{
	cout << "Hooked" << endl;
	return osend(s, buf, len, flags);
}

void Initialize()
{
	tool->console();
	
	HMODULE wsDll = NULL;
	while (!wsDll)
	{
		wsDll = GetModuleHandle("ws2_32.dll");
	}
	tool->DetourFunc((BYTE *)(DWORD)GetProcAddress(wsDll, "send"), (BYTE*)msend,5);
}
This is my code fou hook send function but idk why not work...someone can help me and show me where is error?
Quote:
Originally Posted by Peter File View Post
osend isn't initialized

maybe he don't understand better showing an example could help more instead of what you have write..
but anyway you were right. i posted code with mistake removed.

here your mistake alliance.

Code:
typedef int(__stdcall *hsend)(SOCKET s, const char *buf, int len, int flags);
hsend osend;


osend = (hsend)  tool->DetourFunc((BYTE *)(DWORD)GetProcAddress(wsDll, "send"), (BYTE*)msend,5);
12/22/2014 00:42 Alliance™#893
Quote:
Originally Posted by GHTheBoss View Post
maybe he don't understand better showing an example could help more instead of what you have write..
but anyway you were right. i posted code with mistake removed.

here your mistake alliance.

Code:
typedef int(__stdcall *hsend)(SOCKET s, const char *buf, int len, int flags);
hsend osend;


osend = (hsend)  tool->DetourFunc((BYTE *)(DWORD)GetProcAddress(wsDll, "send"), (BYTE*)msend,5);
I try this first to post to forum, but not work this solution.Idk why :S
I need to initializate WSA?
12/22/2014 00:43 MRx86™#894
Quote:
Originally Posted by Alliance™ View Post
I try this first to post to forum, but not work this solution.Idk why :S
I need to initializate WSA?
the code which i posted is correctly osend need to be initiliazed if you keep crashing the problem is some other thing.
12/22/2014 00:57 Alliance™#895
Code:
tool->console();
	
	HMODULE wsDll = NULL;
	while (!wsDll)
	{
		wsDll = GetModuleHandle("ws2_32.dll");
	}

	// Initialize Winsock
	WSADATA wsaData;
	int iResult = WSAStartup(MAKEWORD(2, 2), &wsaData);
	if (iResult != 0) {
		cout << "WSAStartup failed: " << iResult << endl;
	}

	osend=(hsend)tool->DetourFunc((BYTE *)(DWORD)GetProcAddress(wsDll, "send"), (BYTE*)msend,5);
Not work.
I think the problem is windows 8.1 shit!
12/22/2014 10:59 MRx86™#896
Quote:
Originally Posted by Alliance™ View Post
Code:
tool->console();
	
	HMODULE wsDll = NULL;
	while (!wsDll)
	{
		wsDll = GetModuleHandle("ws2_32.dll");
	}

	// Initialize Winsock
	WSADATA wsaData;
	int iResult = WSAStartup(MAKEWORD(2, 2), &wsaData);
	if (iResult != 0) {
		cout << "WSAStartup failed: " << iResult << endl;
	}

	osend=(hsend)tool->DetourFunc((BYTE *)(DWORD)GetProcAddress(wsDll, "send"), (BYTE*)msend,5);
Not work.
I think the problem is windows 8.1 shit!

windows 8.1 has nothing to do with your code. can you post your detour.

are you sure that you initializzing your tool class ?

tool->DetourFunc

try this one



Code:

     void *  DetourCreate ( BYTE *src, const BYTE *dst, unsigned int len )
     {
	BYTE * jmp = reinterpret_cast<BYTE*>(malloc(len+5));
	DWORD dwBack;
	VirtualProtect(src,len,PAGE_EXECUTE_READWRITE,&dwBack);
	memcpy(jmp,src,len);	
	jmp   += len;
	jmp[0] = 0xE9;
	*reinterpret_cast<DWORD*>(jmp+1) = (DWORD)(src+len-jmp) - 5;
	src[0] = 0xE9;
       *reinterpret_cast<DWORD*>(src+1) = (DWORD)(dst-src)     - 5;
	VirtualProtect(src,len,dwBack,&dwBack);
	return jmp-len;
     }


    typedef int( * hsend ) ( SOCKET s, const char *buf, int len, int flags );
       hsend osend;

    int msend ( SOCKET s, const char *buf, int len, int flags ) 
    { 
            __asm pushad

	   cout << "Hooked" << endl;

            __asm popad

	   return osend(s, buf, len, flags);
    }


DWORD WINAPI Start ( LPVOID lpArg )
{
	HMODULE wsDll = NULL;
        do
	{
	     Sleep(300);
	    wsDll = GetModuleHandle("ws2_32.dll");

	 }while ( !wsDll );

	 WSADATA wsaData;

	int iResult = WSAStartup(MAKEWORD(2, 2), &wsaData);
	if (iResult != 0)
		cout << "WSAStartup failed: " << iResult << endl;


	DWORD ADRSend = (DWORD)GetProcAddress(wsDll,"send");
	if ( !ADRSend )
		cout << "Could not find (Send) function Address"<< endl;


	osend = (hsend) DetourCreate(reinterpret_cast<BYTE*>(ADRSend),reinterpret_cast<BYTE*>(msend),5);
        return EXIT_SUCCESS;
}


BOOL WINAPI DllMain ( HMODULE hDll, DWORD dwReason, LPVOID lpReserved )
{
	 if( dwReason == DLL_PROCESS_ATTACH )
	 { 	
		CreateThread(NULL,NULL,Start,NULL,NULL,NULL);
	 }
	 return TRUE;
}
i checked msdn the send function has no call convetion..
12/22/2014 15:18 Raz9r#897
Quote:
Originally Posted by GHTheBoss View Post
i checked msdn the send function has no call convetion..
It's cdecl.

Edit: I was wrong, see below.
12/22/2014 15:29 Cyno™#898
Quote:
Originally Posted by Raz9r View Post
It's cdecl.
its __stdcall
12/22/2014 17:37 MRx86™#899
Quote:
Originally Posted by Cyno™ View Post
its __stdcall
nope raz9r, it is right its __stdcall !
12/22/2014 18:47 +Yazzn#900
[Only registered and activated users can see links. Click Here To Register...]

WSAAPI -> FAR PASCAL -> __stdcall

And btw I don't think there's any reason to call WSAStartup yourself at all.