Imma Noob

Posts 1–15 of 16 · Page 1 of 2
Imma Noob
AS the title stats I'm a noob - well in c++, but I've recently committted to learning this trite, BORING, OOOOVVVER FF'CCKKIING USSSEEEEED

**pant*pant*pant** anyway it's extremely widely used, and for the purpose of incorporating other's source into my shit I need to learn it, so real quick can someone tell me how to

(A) Get to an address via pointers eg: ((cshell.dll+blahblahblah)+93)+A39 --this is just a random address, but it gets the idea across.

(B) Change the value contained at the address - using a byte array would preferable - (I'm assuming if I wanted to make it say 33 99 01 I could just do something like
Code:
((DWORD)0x019933);
, but I'm probably wrong

(C) How to declare what a given value should be red as = eg floats, strings, byte, word, dword, qword, hex -- From what I can tell from the sources you can simply do something along the lines of
Code:
((float)100);
again I'm probably wrong

If someone could answer these questions I could figure out enough on my own to make my first c++ based hack (the only reason I'm asking you guys is because all my searching led to unexplained gibberish.

Btw if anyone has knows of a tutorial that goes through c++ precisely and quickly I would be much indebted - crap that spends 3 pages on if and else or some garbadge like that isn't any good, I would prefer something just explains something then moves on
here's a simple way

Code:
(A)DWORD dwCShell = GetModuleHandleA("CShell.dll");

DWORD ptr1 = *(DWORD*)(dwCShell + blahblah);
DWORD ptr2 = *(DWORD*)(ptr1 + 0x93);
DWORD ptr3 = *(DWORD*)(ptr2 + 0xA39);

(B)*(DWORD*)adr = 0x019933;

(C)*(float*)ptr3 = 100.0f;
Quote Originally Posted by UltraPGNoob View Post
here's a simple way

Code:
DWORD dwCShell = GetModuleHandleA("CShell.dll");

DWORD ptr1 = *(DWORD*)(dwCShell   hblahbla);
DWORD ptr2 = *(DWORD*)(ptr1   0x93);
DWORD ptr3 = *(DWORD*)(ptr2   0xA39);

*(float*)ptr3 = 100.0f;


i see you are a good coder
hmm actually i think it would be
DWORD dwCShell = (DWORD)GetModuleHandleA("CShell.dll");
instead of
DWORD dwCShell = GetModuleHandleA("CShell.dll");
but im not really a good coder
Quote Originally Posted by Crandon View Post
i see you are a good coder
ty but thats basic memory edition.

Quote Originally Posted by wtfhaksftw View Post
hmm actually i think it would be
DWORD dwCShell = (DWORD)GetModuleHandleA("CShell.dll");
instead of
DWORD dwCShell = GetModuleHandleA("CShell.dll");
but im not really a good coder
by default GetModuleHandleA is a HANDLE type u need to convert it to DWORD

and A stands for ASCII if u use standard one u'll have to convert ur text string
Quote Originally Posted by UltraPGNoob View Post
here's a simple way

Code:
(A)DWORD dwCShell = GetModuleHandleA("CShell.dll");

DWORD ptr1 = *(DWORD*)(dwCShell + blahblah);
DWORD ptr2 = *(DWORD*)(ptr1 + 0x93);
DWORD ptr3 = *(DWORD*)(ptr2 + 0xA39);

(B)*(DWORD*)adr = 0x019933;

(C)*(float*)ptr3 = 100.0f;
Maybe it's just my compiler but shouldn't it be:

Code:
(A)DWORD dwCShell = (DWORD)GetModuleHandleA("CShell.dll");
?
Quote Originally Posted by tdct View Post


Maybe it's just my compiler but shouldn't it be:

Code:
(A)DWORD dwCShell = (DWORD)GetModuleHandleA("CShell.dll");
?
oh my bad i forgot DWORD conversion.^^

ure right.
Quote Originally Posted by UltraPGNoob View Post
oh my bad i forgot DWORD conversion.^^

ure right.
Gosh darnit I still cannot get any results, do I need some sort of command to give myself read/write privileges, or can anyone find where I am going astray the message box works just fine, as well the link, but there is no change what so ever in game (Maybe this will help you diagnose my problem, but I'm using cheat engine pointers, do they need to be changed in someway to suit this - although I don't see why they would

Code:
// WeaponHackBeta2.cpp : Defines the exported functions for the DLL application.
//

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

using namespace std;


DWORD dwCShell = (DWORD)GetModuleHandleA("CShell.dll");


void main() {
Sleep(1000);

bool awmred = true;
bool reddragon = true;


if (awmred) {
	DWORD Awm1 = *(DWORD*)(dwCShell + 0x0090A4B8); //The only reason I'm letting this addy slide is because it's already been (unfortuantly) revealed in other sources =P
	DWORD Awm2 = *(DWORD*)(Awm1 + nonya);
	DWORD Awm3 = *(DWORD*)(Awm2 + nonya);
	*(DWORD*)Awm3 = 0x019933;
	//awm
}

if (reddragon) {
	DWORD RedDragon1 = *(DWORD*)(dwCShell + 0x0090A4B8);
	DWORD RedDragon2 = *(DWORD*)(RedDragon1 + nonya);
	DWORD RedDragon3 = *(DWORD*)(RedDragon2 + nonya);
	*(DWORD*)RedDragon3 = 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00; //This isn't the real byte array, I don't want you guys doing an array serach :)
	//RedDragon	
}


}



BOOL WINAPI DllMain ( HMODULE hDll, DWORD dwReason, LPVOID lpReserved ) {
 DisableThreadLibraryCalls(hDll);
 if ( dwReason == DLL_PROCESS_ATTACH ) {
	 MessageBoxA (0, "Made by Tdct", "Own Forever", 0);
	 system("start http://www.mpgh.net/forum/175-crossfire-hacks/247202-beta-weapon-hack.html");
 }
 return true;
}
hmm u forgot CreateThread

Code:
BOOL WINAPI DllMain ( HMODULE hDll, DWORD dwReason, LPVOID lpReserved ) {
 DisableThreadLibraryCalls(hDll);
 if ( dwReason == DLL_PROCESS_ATTACH ) {
	 MessageBoxA (0, "Made by Tdct", "Own Forever", 0);
	 system("start http://www.mpgh.net/forum/175-crossfire-hacks/247202-beta-weapon-hack.html"); 
         CreateThread(NULL,NULL,(LPTHREAD_START_ROUTINE)main,NULL,NULL,NULL);
 }
 return true;
}
Lol Guys that's what I said...
I'll try that, lol thats a command for a different language as well, I guess that might be why I don't remember hearing it in any c++ tutorial - unless your wrong that is
well u're using an incomplete weapon hack method.

you're just setting the model file name + the texture file name.

is it finished or you're planning to add some other things?
Quote Originally Posted by UltraPGNoob View Post
well u're using an incomplete weapon hack method.

you're just setting the model file name + the texture file name.

is it finished or you're planning to add some other things?
No that was intended to be a test so I know that I'm not doing something awfully wrong, the idea was to compile it, inject it, login see the obvious change, then finish it up once I'm content of it functionallity, no I'm planning to find a way to somehow record a section of addresses eg
0x00400000 - 0x00450000, then paste it into another section, but so far I can only do it with 50% functionality because of all the jumps that where created via the method I used: that is part of the reason I'm trying to learn c++ to find a way to do that efficiently but the test failed there was no change in game
well gl to what u do

if u need help tell me.
Posts 1–15 of 16 · Page 1 of 2
This thread is closed for replies.

Tags for this Thread

None

Talk with us