Hey,
i want to know how to marage to different codes, and how to compile it...
im using dev c++ but i cant get the complation work
how do i complaile, and how do i marage 2 different codes?
thanks
Hey,
i want to know how to marage to different codes, and how to compile it...
im using dev c++ but i cant get the complation work
how do i complaile, and how do i marage 2 different codes?
thanks
merge code from 2 projects into one?
merge code from two files into one?
link 2 files into one exe/dll?
Explain better what you need to do.
All problems in computer science can be solved by another level of indirection,
except for the problem of too many layers of indirection.
– David J. Wheeler
OK,
I have 2 codes, and i wanna marage them into one and make a dll from them.
thos are the codes:
Code 1:
Code:// Include #include <windows.h> //Globals unsigned char NametagsOne[2] = {0x90, 0x90}; unsigned char NametagsTwo[6] = {0x90, 0x90, 0x90, 0x90, 0x90, 0x90}; unsigned char NametagsOneOrig[2] = {0x74, 0x25}; // 0042E28E |. 74 25 |JE SHORT iw3mp.0042E2B5 unsigned char NametagsTwoOrig[6] = {0x0F, 0x85, 0xCE, 0x00, 0x00, 0x00}; // 0042E26C |. 0F85 CE000000 |JNZ iw3mp.0042E340 BOOL WINAPI DllMain (HINSTANCE hModule, DWORD dwAttached, LPVOID lpvReserved) { if (dwAttached == DLL_PROCESS_ATTACH) { unsigned long Protection; VirtualProtect((void*)0x42E28E, 2, PAGE_READWRITE, &Protection); memcpy((void*)0x0042E28E, (const void*)NametagsOne, 2); VirtualProtect((void*)0x42E28E, 2, Protection, 0); VirtualProtect((void*)0x42E26C, 6, PAGE_READWRITE, &Protection); memcpy((void*)0x0042E26C, (const void*)NametagsTwo, 6); VirtualProtect((void*)0x42E26C, 6, Protection, 0); return 1; } return 3142; }
Code 2:
Code://Includes #include <windows.h> HANDLE CallOfDuty4 = GetCurrentProcess(); BYTE NoRecoil[] = {0x75, 0x12}; // 00457DFF 75 12 JNZ SHORT iw3mp.00457E13 BOOL WINAPI DllMain (HINSTANCE hModule, DWORD dwAttached, LPVOID lpvReserved) { if (dwAttached == DLL_PROCESS_ATTACH) { WriteProcessMemory(CallOfDuty4, (void*)0x00457DFF, &NoRecoil, 2, 0); } return 1; }
Last edited by lironf18; 02-29-2008 at 04:17 PM.
And what is the difference between these 2 codes?
All problems in computer science can be solved by another level of indirection,
except for the problem of too many layers of indirection.
– David J. Wheeler
oops -.-
edited
dammit, i tryed till now with guides to compaile, even without maraging both of them with no luck -.-
can anyone please marage it and make the dll for me and upload it here? i just got sick of it =/
@lironf18,
These "codes" are nothing more than game hacks for Call of Duty 4. BTW, are you related to elmutt the other wannabe game hacker? Possibly a distant cousin or something?
But anyway, here's your compilable DLL. It's essentially garbage and will probably get you punkbusted. I'll quote another member of this board by saying "Is that code? It looks like unreadable hash of mashed tomato juice to me!"
Code:// Filename: myDll.cpp // Compile: cl.exe /LD mydll.cpp #include <windows.h> unsigned char NametagsOne[2] = {0x90, 0x90}; unsigned char NametagsTwo[6] = {0x90, 0x90, 0x90, 0x90, 0x90, 0x90}; unsigned char NametagsOneOrig[2] = {0x74, 0x25}; // 0042E28E |. 74 25 |JE SHORT iw3mp.0042E2B5 unsigned char NametagsTwoOrig[6] = {0x0F, 0x85, 0xCE, 0x00, 0x00, 0x00}; // 0042E26C |. 0F85 CE000000 |JNZ iw3mp.0042E340 void beginHacking() { unsigned long Protection; HANDLE CallOfDuty4 = GetCurrentProcess(); BYTE NoRecoil[] = {0x75, 0x12}; // 00457DFF 75 12 JNZ SHORT iw3mp.00457E13 WriteProcessMemory(CallOfDuty4, (void*)0x00457DFF, &NoRecoil, 2, 0); VirtualProtect((void*)0x42E28E, 2, PAGE_READWRITE, &Protection); memcpy((void*)0x0042E28E, (const void*)NametagsOne, 2); VirtualProtect((void*)0x42E28E, 2, Protection, 0); VirtualProtect((void*)0x42E26C, 6, PAGE_READWRITE, &Protection); memcpy((void*)0x0042E26C, (const void*)NametagsTwo, 6); VirtualProtect((void*)0x42E26C, 6, Protection, 0); } BOOL WINAPI DllMain( HINSTANCE hInstance, DWORD dwReason, LPVOID _Reserved ) { switch( dwReason ) { case DLL_PROCESS_ATTACH: HINSTANCE g_hInst = hInstance; beginHacking(); return true; break; } return true; }
mm i dont wanna be hacker and i dont call my self hacker, i just want hacks for cod.
can anyone please tell me what i do with this?
So if you don't want to "crack" things, what are you doing with code that modifies memory of another process?
By the way, IMO, "hacking" is the wrong term here, as hacking is really a form of advanced/skilled programming, whilst cracking is the term for "breaking someone elses code", which is clearly what this code is attempting to do.
--
Mats
Compilers can produce warnings - make the compiler programmers happy: Use them!
Please don't PM me for help - and no, I don't do help over instant messengers.
this code is public, i didnt steal it or w/e
did i ask too much to learn on how to compile?
i know its simple, so please some one just tell me how get it works
No, but you are attempting to subvert a game into doing things differently - I don't know what the code does in itself, but the general concept of injecting "your own"[1] code into another application is "cracking", and should not be discussed on this forum according to the forum rules that you said you'd obey when you signed up to the forum [even if you just clicked yes without reading them, they still apply to you] - this thread should be locked/deleted.
[1] Or code you found somewhere on the web, got from a friend, etc.
--
Mats
Compilers can produce warnings - make the compiler programmers happy: Use them!
Please don't PM me for help - and no, I don't do help over instant messengers.
omg, why its so hard to help? so what, i dont want to learn c++, i just want to learn how to compile cant you live with that?
for what is this forum exsist if you arnt helping?
This forum exists to help people learn how to program, not to help people cheat (either at homework or video games). Get lost.omg, why its so hard to help? so what, i dont want to learn c++, i just want to learn how to compile cant you live with that?
for what is this forum exsist if you arnt helping?
I guess the comparison would be to ask "How do I make heroin?" on a chemistry forum...
If you were to ask a genuine question on how to achieve something useful [you may think cheating in a game is useful - that's your decision, but in my mind it's not, and I'm the one you are asking to help you].
--
Mats
Compilers can produce warnings - make the compiler programmers happy: Use them!
Please don't PM me for help - and no, I don't do help over instant messengers.
i got my help allrdy and im good, this forum sucks. cya.