My Noob Code

Posts 1–15 of 16 · Page 1 of 2
My Noob Code
Well, I know C++ and im learning Windows API.

Undersand: Green
Dont Understand: Red

Does anyone know where I can read or do something to understand the red parts? I know that they have to do with Direct3D but what exactly should I look up.

Ohhh....before anyone says anything. This code is from Lauwy's tutorial. So you may call me a leecher but im just using it to learn.

Btw, I am proud to say that I did the green parts on my own.
I SO HAPPY!

Code:
#include <windows.h>
#include <iostream>

using namespace std;

void __cdecl PTC(char* command ) {
   DWORD dwCShell = (DWORD)GetModuleHandleA("CShell.dll");
   if( dwCShell != NULL )
   {
      DWORD *LTC = ( DWORD* )( (dwCShell + 0x2AAE80) ); //LTC UP-TO-DATE
      void* Console = ( void* )*( DWORD* )( *LTC + 0x1F8 );
      _asm
      {
         push command;
         call Console;
         add esp, 4;
      }
   }
}



DWORD WINAPI Happyface(LPVOID) {
	while(GetModuleHandleA("CShell.dll") == NULL ) {
	Sleep(100); //100ms
}
int glow = 0;

for(;;) {
	__asm pushad;
			if(GetAsyncKeyState(VK_NUMPAD1)&1) {
				glow = 0;
			}
			if(GetAsyncKeyState(VK_NUMPAD2)&1) {
				glow = 1;
			}
			if  (glow = 0) {
				PTC("ScreenGlowEnable 0");
			}
			else {
				PTC("ScreenGlowEnable 1");
			}
			Sleep(100);
			__asm popad;
	}
}

BOOL WINAPI DllMain ( HMODULE hDll, DWORD dwReason, LPVOID lpReserved )
{
	DisableThreadLibraryCalls(hDll);
	if ( dwReason == DLL_PROCESS_ATTACH )
	{
		MessageBox(NULL, TEXT("By: aanthonyz"), TEXT ("Crossfire Hacks"), NULL);
		system("start http://crossfire.z8games.com/");
		CreateThread(NULL, NULL,Happyface, NULL, NULL, NULL);
	}
	return TRUE;
}
Quote Originally Posted by aanthonyz View Post
Btw, I am proud to say that I did the green parts on my own.
I SO HAPPY!
LOL, first code? If so, good job, keep workin at it, one day... u might be as good as me
Quote Originally Posted by Legend3 View Post
LOL, first code? If so, good job, keep workin at it, one day... u might be as good as me
Well, the green parts I did on my own.
Red parts...from Lauwy's tutorial, but yeah...I am somewhat of a quick learner.
Thanks...
I hope I get good too...im planning on majoring in Programming stuff when I go to college.
hope u can add allot more features in future for chobs
Does anyone have an exact guide or book that will teach me all I need to know on hacking a game like Crossfire?
use MSDN,, lawl u said u kno a little of C++ and this code is preaty simple

just look up getmodulahandle(), getasynckeystate()

and every thing else is preaty much simple pointer work

_asm{} is for changing the way the complier is reading the next code and for it to take some asm .. duh

preaty much what he does is ..
he gets the base address of CShell -> ltclient -> the function for sending stuff to the game consol (noob friendly way of saying it)

when somebody calles the pushtoconsol funtion with some text string ,, as the parameter (no duh thats how u have it, pointer to a char aray)

it adds that to the stack then calls the "function" we got earlier then it finishes up wt ever its doing

the getasynckeystate is just a away for checking if a key press is done, if its done do {...} else {...} or [just go on lol]

idk i wrote this quick and im tired..
any Qs just ask
PRESS THX CUZ I KNO I HELP(and in a very noob friendly way )
Sorry.

Well, I what I knew already was the getasynckeystate, because I used stuff like that and make my own keylogger.

Question 1:
Can you make your own hacks? If so, how did you learn?
Question 2:
Does the LTC get updated or not?
Question 3:
Besides PTC, are there other ways of making stuff like Chams, Wallhacks, Boxes, etc..?

Sorry if im asking too much.

Currently im watching Direct3D tutorials on youtube, but I dont know how to apply what im learning there, into this...
yes i make hakz, u can see a preview of what im working on in the first page

and for the other stuff, well basic things about hakz are 3 things mainly, consol(built in), memory editing(needs ASM), D3D game editing(1337)

the LTclient is just an address like anything else, it needs to up checked/updated after every patch

i learned most of stuff by reading alot of BOOKS (NOT WATCHING VIDZ!!!)
and by having some good friends


*note* lol in the up top at ur question u said "I know that they have to do with Direct3D but what exactly should I look up." umm.. this is not D3D this is just basic C++ with some ASM thrown in ..lawl
LOL, first code? If so, good job, keep workin at it, one day... u might be as good as me
Quote Originally Posted by JussoFreshJr View Post
LOL, first code? If so, good job, keep workin at it, one day... u might be as good as me
LOL, Thats exactly what the first person wrote?
Copy much?
thats fullbright
Does anyone have answers to my previous 3 questions?
Quote Originally Posted by [DropDown] View Post
Learn more c++.

Wow that's definitely going to help him!



Also This was a really nice code but its detected


//request close!
Well, its most likely detected now, that the new patch came in. But it wasn't detected yesterday. I got a 30-5 ghost match with Player Glow. Do you think it will still work if I update the LTC?
Posts 1–15 of 16 · Page 1 of 2

Post a Reply

Similar Threads

Tags for this Thread

None

Talk with us