Register for your free account! | Forgot your password?

Go Back   elitepvpers > Coders Den > C/C++
You last visited: Today at 02:33

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



my code is wrong?? C++

Discussion on my code is wrong?? C++ within the C/C++ forum part of the Coders Den category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Aug 2010
Posts: 4
Received Thanks: 0
my code is wrong?? C++

I Play game Point Blank, its game disabled altab function, i create some DLL for hack that...and i can do it for several times 3-4 menit, after that Hackshield detected ass hack function ... pliz help me to modify this code....i am not really know about CC++

Code:
//----------------------------------------------------------------------------------------//

#include <windows.h>
#include "main.h"
#include "addys.h"

LPTSTR i3exec = "PointBlank.i3exec";

HANDLE Handle_Of_Thread_1, Handle_Of_Thread_2 = 0;
int Data_Of_Thread_1 = 1;
int Data_Of_Thread_2 = 2;
bool pertamax=true;

DWORD OldProtection;
void MEMwrite(void *adr, void *ptr, int size)
{
	VirtualProtect(adr,size,PAGE_EXECUTE_READWRITE, &OldProtection);
	memcpy(adr,ptr,size);
	VirtualProtect(adr,size,OldProtection, &OldProtection);
}

void PATCH(void) 
{
	
	if (pertamax) {
		DWORD adrNoDC1, adrNoDC2, adrAmmo, adrWall = 0;
		// cari base address i3exec
		DWORD dwI3EXEC = (DWORD)GetModuleHandleA(i3exec);
		
		// base + ofs_nodc1
		adrNoDC1 = dwI3EXEC + (DWORD)OFS_NODC1;
		// patch nodc1
		MEMwrite((void *)(adrNoDC1),(void*)(PBYTE)"\x00", 1);
		// base + ofs_nodc2
		adrNoDC2 = dwI3EXEC + (DWORD)OFS_NODC2;
		// patch nodc2
		MEMwrite((void *)(adrNoDC2),(void*)(PBYTE)"\x00", 1);

		// base + ofs_ammo
		adrAmmo = dwI3EXEC + (DWORD)OFS_AMMO;
		// patch ammo
		// hilangkan // untuk aktifin unlimited ammo
		// karena kadang patch ini work, kadang nggak
		//MEMwrite((void *)(adrAmmo),(void*)(PBYTE)"\xC3", 1);

		// base + ofs_wall
		adrWall = dwI3EXEC + (DWORD)OFS_WALL;
		// patch wall
		// hilangkan // untuk aktifin tembus tembok
		// karena kadang patch ini work, kadang nggak
		//MEMwrite((void *)(adrWall),(void*)(PBYTE)"\xC3", 1);

		
		MessageBeep(0);
		pertamax=false;
		// we're done
		//CloseHandle(Handle_Of_Thread_2);
	}
}

DWORD WINAPI theLoop(LPVOID param)
{
	while (1) {
		DWORD dwI3EXEC = (DWORD)GetModuleHandleA(i3exec);
		if (dwI3EXEC!=0) 
		{
			PATCH();
		}
		//setelah proses patch berhasil, kita bisa close thread theLoop, biar hemat resource
		if (GetAsyncKeyState(VK_INSERT)&1) {
			CloseHandle(Handle_Of_Thread_2);
			MessageBeep(1);
			return(0);
		}
		Sleep(50);
	}
	return (0);
}

// disable AHNS_DETECT_BLA_BLA in pointblank.exe
// parah nih PB, goyangin mouse dikit pada saat hs loading
// dapat ini dari BC.log "HShield Error AHNHS_ACTAPC_DETECT_AUTOMOUSE"
DWORD WINAPI theLoopEXE(LPVOID param)
{
	while (1) {
		DWORD adrBlaBlaBla = 0;
		// cari base address pb.exe
		DWORD dwEXE = (DWORD)GetModuleHandleA("PointBlank.exe");
		static int pb;
		if (dwEXE>0) 
		{
			adrBlaBlaBla = dwEXE + (DWORD)OFS_DETECT_BLA_BLA;
			// patch with RET, stupid mouse, macro, etc etc detection
			MEMwrite((void *)(adrBlaBlaBla),(void*)(PBYTE)"\xC3", 1);
			CloseHandle(Handle_Of_Thread_1);
			return (0);
		}
		Sleep(50);
	}
	return (0);
}

BOOL WINAPI DllMain ( HMODULE hDll, DWORD dwReason, LPVOID lpReserved )
{
	// ngurangin beban kerja dll
	DisableThreadLibraryCalls(hDll);
	if (dwReason == DLL_PROCESS_ATTACH) {	
		Handle_Of_Thread_1 = CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)theLoopEXE,	&Data_Of_Thread_1, 0, NULL);
		Handle_Of_Thread_2 = CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)theLoop,		&Data_Of_Thread_2, 0, NULL);
		if ( Handle_Of_Thread_1 == NULL) ExitProcess(Data_Of_Thread_1);
		if ( Handle_Of_Thread_2 == NULL) ExitProcess(Data_Of_Thread_2);
	}
	return TRUE;
}
gosicks is offline  
Old 10/02/2010, 15:13   #2
 
elite*gold: 1
Join Date: Aug 2010
Posts: 758
Received Thanks: 106
I Think thats Right???
DreeeaMz™ is offline  
Reply


Similar Threads Similar Threads
B> DriftCity CBS Code | S> War Rock Code / Bounty Bay Code etc.
10/05/2010 - Trading - 1 Replies
Hi, wie schon im Titel beschrieben. In der CBS vom November gab es Bonusodes für mehrere Spiele. Ich benötige DriftCity Codes. Kann sonst für alle anderen Spiele die Codes biten, einige auch doppelt. Hier eine Liste der Spiele und Bonusaktionen: - (2x) War Rock - (2x) War of Titans - (2x) World of Warcraft - (1x) Warhammer Online - (1x) Bounty Bay online
What is wrong with this code?
02/20/2010 - CO2 Private Server - 20 Replies
Hey I'm making a custom quest but when it comes to the part to get the reward, it don't show and it don't give me the reward. Please tell me how to fix this code or what's wrong with it. #region Killer case 67436: { if (Control == 0) {
what is the wrong with this code help me
10/21/2009 - CO2 Private Server - 4 Replies
6001 27 ToxicFog 1 0 1 4 0 0 30010 0 0 3 4 10 8796093022208 0 5400 70 2 0 20 300 0 0 0 0 50 0 0 0 0 3 905 Upgrade~after~lvl~70 Continually~reduce~10%~of~target`s~current ~HP~each~time.~20~times~in~1~minute.~I neffective~when~the~target`s~HP~reaches~ 1.~Stamina~Cost:~50.~The~lower~battle~po wer~than~the~target`s,~the~less~accuracy . NULL NULL poisoncast sound\Ninjamagic-04A.wav 800 poisonattack NULL poisonblast.tme poisonfog01 0 0 i need to know what is the wrong with this code to run...
Whats wrong with this code?
07/02/2009 - CO2 Private Server - 9 Replies
someone help me please i put this code in everything works except /drop bigscroll any1 see anything wrong? EDIT: bigscroll is for dbscrolls



All times are GMT +1. The time now is 02:33.


Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2026 elitepvpers All Rights Reserved.