Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

[Tutorial] C++ DLL injection for Main Server

Junior Spellweaver
Joined
May 14, 2008
Messages
146
Reaction score
3
Re: [Guide] C++ DLL injection for Main Server

Oo don't understand any thing in the C++ or programing XD lol
but may be its good
 

ToF

Master Summoner
Joined
Jun 12, 2007
Messages
513
Reaction score
170
Re: [Guide] C++ DLL injection for Main Server

i started to read c++ this week.. (at home)

im still reading about:


#include <iostream>

int main()

using namespace std;

cout <<

return 0;

endl;

and what functions they have..

somethimes its very boring but i think when i know a bit more it will be much easyer to understand...
 
Junior Spellweaver
Joined
Oct 4, 2006
Messages
148
Reaction score
3
Re: [Guide] C++ DLL injection for Main Server

how can i make that i can select stuff from a listbox?? i mean that i can copy and past the text that is in the listbox and use it on a other place.
ore on what other why i could do it beter .
i hoop that your understand my ugly englische XD but i do my best ;)
 
Arrogant Wizard
Loyal Member
Joined
Mar 30, 2007
Messages
745
Reaction score
34
Re: [Guide] C++ DLL injection for Main Server

I would prefer if you would find a tutorial rather than asking here, it's not very related to the thread.

Also, I don't get a clue of what you're saying. Find a tutorial in your native language would do better.
 
Junior Spellweaver
Joined
Sep 19, 2006
Messages
146
Reaction score
0
Re: [Guide] C++ DLL injection for Main Server

which version of visual c++ i need?
idownloaded Microsoft Visual C++ 6.0 Standard Edition
but it look other then your version on the ss :-O
 
Junior Spellweaver
Joined
Sep 16, 2006
Messages
187
Reaction score
0
Re: [Guide] C++ DLL injection for Main Server

get visual studio 2005/8 express
or microsoft visual studio 2008 standart/professional
 

ToF

Master Summoner
Joined
Jun 12, 2007
Messages
513
Reaction score
170
Re: [Guide] C++ DLL injection for Main Server

i got visual c++ 2008 pro =D
 
Newbie Spellweaver
Joined
Jan 25, 2007
Messages
44
Reaction score
0
Re: [Guide] C++ DLL injection for Main Server

u knw man for this tut i will be back into kalonline server dev and client dev and thanks alot it helped realy ^^ god bless you ^^
 
Skilled Illusionist
Joined
May 14, 2008
Messages
335
Reaction score
45
Re: [Guide] C++ DLL injection for Main Server

Sorry for bumping an old thread, but seeing as it's not even on the second page, I'm not going to worry about it...

I'm trying to do this basically for fun, and to learn more C++.

I'm apparently calling something wrong, because when I start the main server with this DLL hooked, it throws an exception. I know it is this code, because when I take this out, it works. I tried simplifying the process (probably inefficiently because I suck at C++) and it still doesn't work.

PHP:
void KalHook::ShowInfo(LPCSTR text)
    {
        DWORD infoAddress;
        

        infoAddress = 0x00432860; 
        
        __asm {
             push 1
             push text
             call infoAddress
             add esp,8

        }
    };

PHP:
    void KalHook::Attach()
    {
	   this->ShowInfo("Hi");
    }

PHP:
public:
        void Attach();
        void Detach();
        void ShowInfo(LPCSTR text);

If I've done something glaringly obvious, let me know. I really barely know this language.

I'm using VS 2005 Standard. The server can start okay as long as this code is not in the DLL.

Thanks.

-V
 
Skilled Illusionist
Joined
Oct 31, 2008
Messages
341
Reaction score
294
Re: [Guide] C++ DLL injection for Main Server

ShowInfo = notice? xD
when not u forgot the color of the ShowInfo ;)
 
Skilled Illusionist
Joined
May 14, 2008
Messages
335
Reaction score
45
Re: [Guide] C++ DLL injection for Main Server

I thought this was to put a message in the server console...?

What I did is took DeathArt's code and removed the color select parameter that specifies which color to use. Instead, I'm just specifying the function to call in asm. So I've actually simplified it, to no avail.

Any ideas? ><

-V
 
Arrogant Wizard
Loyal Member
Joined
Mar 30, 2007
Messages
745
Reaction score
34
Re: [Guide] C++ DLL injection for Main Server

As BloodX said , the colour is a reqiure parameter.
 
Skilled Illusionist
Joined
May 14, 2008
Messages
335
Reaction score
45
Re: [Guide] C++ DLL injection for Main Server

I've been struggling with implementing the menu adding code TDA posted back on page 2. It seems to me I'm following the guide to the letter, but I could be messing up in the actual implementation ( or... copy / paste). How am I supposed go about it?

If anyone (including TDA?) would be willing to help me out on this, I'd very much appreciate it.

-V

EDIT: Here are all the source files -
 
Arrogant Wizard
Loyal Member
Joined
Mar 30, 2007
Messages
745
Reaction score
34
Re: [Guide] C++ DLL injection for Main Server

KalHooks.cpp:26

Code:
HWND hWnd = FindWindow(NULL,TEXT("MainSvr"));

You 100% sure your application have the correct title? It's finding it based on the name of the window (Taskbar / Title Frame).

Else you have to use Spy++ to find the HWND for it. But I think that changes for each start up.
 
Skilled Illusionist
Joined
May 14, 2008
Messages
335
Reaction score
45
Re: [Guide] C++ DLL injection for Main Server

KalHooks.cpp:26

Code:
HWND hWnd = FindWindow(NULL,TEXT("MainSvr"));

You 100% sure your application have the correct title? It's finding it based on the name of the window (Taskbar / Title Frame).

Else you have to use Spy++ to find the HWND for it. But I think that changes for each start up.

I'm definitely not 100% sure. I had tried putting in something like "MainSvr on port 30001" (which matched the name of the window), in addition to putting in a string to match the title definition in MainConfig.txt.

Any suggestion as to what I should try? Thanks for helping out. :):

By the way... I looked for you on MSN but I'm pretty sure you blocked me after I asked you a stupid question about SwordCrypt a little over a year ago. :blushing:

-V
 
Arrogant Wizard
Loyal Member
Joined
Mar 30, 2007
Messages
745
Reaction score
34
Re: [Guide] C++ DLL injection for Main Server

We resolved the problem to a missing sleep() in Varis' code. I forgot to documentate that it's essencial, as the takes a few seconds before the stuff loads.

And a picture of my dev-enviroment for the lulz.

DeathArt - [Tutorial]  C++ DLL injection for Main Server - RaGEZONE Forums
 
Initiate Mage
Joined
Jul 4, 2009
Messages
1
Reaction score
0
Anyone would care to share the FindPattern() function? Would save me some time.
Thanks.
 
Newbie Spellweaver
Joined
Sep 12, 2007
Messages
5
Reaction score
0
Hey,sorry that i pushed a old theard.
When i create the project than i get only errors. Its in german but i hope some one will help me:

1. error LNK2001: Nicht aufgel
 
Back
Top