Register for your free account! | Forgot your password?

You last visited: Today at 13:50

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

Advertisement



OpenSource

Discussion on OpenSource within the Kal Hacks, Bots, Cheats & Exploits forum part of the Kal Online category.

Reply
 
Old   #1




 
bloodx's Avatar
 
elite*gold: 55
Join Date: Mar 2006
Posts: 4,582
Received Thanks: 1,537
OpenSource

I just started this Thread for all to post Source Codes/Snippes/Packets what ever.

Looks like some more People now know how to work with the Public Sources.

Here a little "Base"
bloodx is offline  
Thanks
6 Users
Old 02/24/2012, 00:27   #2
 
hoseta's Avatar
 
elite*gold: 0
Join Date: Jan 2008
Posts: 310
Received Thanks: 50
good release thanks, public source's are always good book for learning :]
hoseta is offline  
Old 02/24/2012, 01:43   #3




 
bloodx's Avatar
 
elite*gold: 55
Join Date: Mar 2006
Posts: 4,582
Received Thanks: 1,537
IngameChat Hook
thx to NOOR/Syron
PHP Code:
void __stdcall MyChatBox(charrw)
{
    if (
strcmp(rw,"/Test") == 0)
    {
        
//do your stuff..
    
}
}
DWORD MyChatBack;
void __declspecnaked MyChatHook()
{
    
__asm
    
{
            
add        esp,4
            mov     eax
esp
            push    eax
            call    MyChatBox
            jmp MyChatBack
;
    }
}
BYTE pChatBoxHook[] = {0x83,0xC4,0x04,0x85,0xC0,0x74,0x02,0xEB,0x26,0x8B,0x55,0xF8,0x52,0x68,0x00,0x00,0x00,0x00,0x6A,0x11,0xE80x000x00,0x00,0x00};
    
charChatBoxHook "xxxxxxxxxxxxxx????xxx????";

    
MyChatBack=CFunction::dwFindPattern(0x00400000,0x00700000,pChatBoxHook,ChatBoxHook);
    
CFunction::Intercept(INST_JMP,MyChatBack,reinterpret_cast<DWORD>(MyChatHook),9);
    
MyChatBack += 0x09
bloodx is offline  
Thanks
5 Users
Old 02/24/2012, 10:34   #4
 
elite*gold: 0
Join Date: Feb 2008
Posts: 1,102
Received Thanks: 185
@above
the right thing i needed thanks alot

ty to NOOR too
pamz12 is offline  
Old 02/24/2012, 16:19   #5
 
Roronoa Z.'s Avatar
 
elite*gold: 0
Join Date: Nov 2011
Posts: 269
Received Thanks: 87
da hat wohl jmd ne vorliebe für reinterpret_cast gefunden ;D
Roronoa Z. is offline  
Old 02/24/2012, 16:22   #6




 
bloodx's Avatar
 
elite*gold: 55
Join Date: Mar 2006
Posts: 4,582
Received Thanks: 1,537
wozu C-Casts benutzten :P
bloodx is offline  
Old 02/24/2012, 17:13   #7
 
RunzelEier's Avatar
 
elite*gold: 0
Join Date: Dec 2010
Posts: 1,196
Received Thanks: 682
geht schneller und macht das gleiche :P
RunzelEier is offline  
Old 02/25/2012, 18:16   #8
 
hoseta's Avatar
 
elite*gold: 0
Join Date: Jan 2008
Posts: 310
Received Thanks: 50
could some1 help me with recv npc ID ?,
which recv packet i need to use?, have no idea, and i didint try to work with send yet.
hoseta is offline  
Old 02/25/2012, 18:24   #9
 
Kealy's Avatar
 
elite*gold: 0
Join Date: Dec 2009
Posts: 204
Received Thanks: 360
Quote:
Originally Posted by bloodx View Post
((*reinterpret_cast<DWORD*>(0x004921F4 + 1)) + (0x004921F4 + 1) + 4)
Quote:
Originally Posted by bloodx View Post
#include <everything.h>
Quote:
Quote:
Originally Posted by Roronoa Z. View Post
da hat wohl jmd ne vorliebe für reinterpret_cast gefunden ;D
Quote:
Originally Posted by bloodx View Post
wozu C-Casts benutzten :P
Quote:
Originally Posted by bloodx View Post
if (strcmp(rw,"/Test") == 0)
wozu std::string benutzen ?
Quote:
Originally Posted by bloodx View Post
DWORD MyChatBack;
void __declspec( naked ) MyChatHook()
{
__asm
{
add esp,4
mov eax, esp
push eax
call MyChatBox
jmp MyChatBack;
}
}


Lolwut.
Besides the horrible reinterpret_casts, and the pattern search, this looks so fucking much like ZeroTen's ugly source.
Kealy is offline  
Thanks
1 User
Old 02/25/2012, 19:01   #10




 
bloodx's Avatar
 
elite*gold: 55
Join Date: Mar 2006
Posts: 4,582
Received Thanks: 1,537
Quote:
Originally Posted by Kealy View Post

Lolwut.
Besides the horrible reinterpret_casts, and the pattern search, this looks so ******* much like ZeroTen's ugly source.
Yeah I diddn't checked the includes already had know there are useless one's. c&p from a other Project I had left here.

thx for tip with std::string I will change it for sure.


uhm nah it's not ZeroTen's source.
bloodx is offline  
Old 02/25/2012, 19:57   #11
 
elite*gold: 42
Join Date: Jun 2008
Posts: 5,426
Received Thanks: 1,888
Quote:
Originally Posted by hoseta View Post
could some1 help me with recv npc ID ?,
which recv packet i need to use?, have no idea, and i didint try to work with send yet.
should be 0x34.
MoepMeep is offline  
Thanks
2 Users
Old 02/25/2012, 20:21   #12
 
Kealy's Avatar
 
elite*gold: 0
Join Date: Dec 2009
Posts: 204
Received Thanks: 360
Quote:
Originally Posted by bloodx View Post
Yeah I diddn't checked the includes already had know there are useless one's. c&p from a other Project I had left here.

thx for tip with std::string I will change it for sure.


uhm nah it's not ZeroTen's source.
Baah, 'k.
Now I look like the bad guy <:

So, if you want to gear up on efficiency a bit, you should read some , and see how you can use it.
It's there to be used.

Also, like RunzelEier already said, using reinterpret_cast will do exactly the same as C-style cast, it just makes the code more confusing overall, if you overuse it.
And in the end, type-casting doesn't exist in ASM (unless you change from signed/unsigned or change the container width).

You should also learn some , to have a clear understanding of calling conventions and what they imply, the stack and how it reacts upon push/pop, et cetera.
Detouring functions using direct JMP's toward declspec(naked) functions is just a bad design. (that's how ZeroTen does it)
You shouldn't do that unless it's absolutely necessary.
It is always better to reserve a few bytes ahead, and push the necessary variables on the stack, and then call your hook, this way, you can create your own local variables, and use whichever calling convention you like, without having to worry where to jump back.
And it will look a lot better. (because yes, people should care about style)

Detouring class functions should be linked toward __fastcall hooks, and those hooks should NOT be in a class, not even static. It is better to leave them in a namespace, to keep things ordered.
The reason I'm saying this, is because forcing calling conventions on member functions will confuse the compiler, and cause undefined behaviour. (like moving edx into ecx in a __fastcall member function).

Declaring class instances using extern and using static member functions are also a bad design.
The "extern" keyword might be the "approved" way to declare globals, but that's not something you should rely on.
Classes are meant to be used for object-oriented programming, not to be used as a wrapper.
Therefore, static members should only be used within a class if you use a singleton patterning.

So, that's pretty much it =]
Kealy is offline  
Thanks
4 Users
Old 02/25/2012, 20:30   #13
 
elite*gold: 0
Join Date: Sep 2011
Posts: 5
Received Thanks: 9
hi it is
ilQr is offline  
Old 02/25/2012, 21:08   #14
 
hoseta's Avatar
 
elite*gold: 0
Join Date: Jan 2008
Posts: 310
Received Thanks: 50
Quote:
Originally Posted by MoepMeep View Post
should be 0x34.
@MoepMeep, big thanks getting id work fine.

but is there a way to get correct name of npc?

hoseta is offline  
Old 02/25/2012, 22:14   #15
 
Kealy's Avatar
 
elite*gold: 0
Join Date: Dec 2009
Posts: 204
Received Thanks: 360
Read it from message.dat ?
Kealy is offline  
Thanks
1 User
Reply


Similar Threads Similar Threads
LaTale OpenSource
09/22/2014 - Private Server - 11 Replies
If anybody is interested in making their own Latale Private Server here are some files that I found to get started on your server. LaTaleServer.rar *Must know how to code in C#
[Aion] OpenSource C++
06/16/2012 - Private Server - 7 Replies
Heey liebe Elitepvpers-Community Letztens habe ich nach einem Aion Emulator gesucht, und nur Aion Galaxy Emu für die Spielversion 2.7 gefunden. Diese Emu ist in Java geschrieben. Ich persönlich mag Java gar nicht, vor allem im Bereich der Emulatoren Entwicklung. Daher wollte ich fragen, ob sich ein paar Leute finden würden um eine Aion Core auf C++ zu coden. Ich dachte an ACE als Socket Library, Mysql als DB, Github für den Source Code. Vom Aufbau her, dachte ich an Trinitycore....
[S] Opensource WoW-Core in C#!
08/13/2011 - WoW Private Server - 6 Replies
Hi, ich suche ein komplettes World of Warcraft Repack, das zum einen Open-Source ist und zum anderen zu 100% in C# und SQL geschrieben! Welche Version es ist, ist mir vollkommen egal, denn ich will mich einfach mal mit der Materie auseinandersetzen. Danke schonmal :)
OpenSource-Server
05/12/2010 - Metin2 Private Server - 27 Replies
Hi, morgen beginnt das verlängerte Wochenende für viele. Deshalb starte ich morgen ein neues kleines Projekt. Einen OpenSource-Metin2-Server. Ich zahle einen kleinen Server (max. 100 Spieler). Die Files dieses Server sind öffentlich, einzige Ausnahme: Account-DB. Itemshop wird es natürlich nicht geben! Vielleicht gibt es ja ein paar nette Leute, die Lust hätten zu helfen. :) Der Servername wird "Syrka" (Syrka.net) lauten. MfG,
WowSharp wird Opensource!
06/29/2007 - World of Warcraft - 34 Replies
Today is a big day in the history of WoWSharp, most of it bad, some of it good. In the past 9 months since development started, WoWSharp has been a milestone in WoW-bot development. First starting out with WoWRadar and WoWFisher, then other utilities like WoWBot, SharpSeer, WoWPartyBot, where created. Everyone knows that since about a bit over a month, Blizzard has been using the WardenClient to detect 3rd party utilities. This WardenClient has put the World of Warcraft hacking on its...



All times are GMT +2. The time now is 13:50.


Powered by vBulletin®
Copyright ©2000 - 2024, 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 ©2024 elitepvpers All Rights Reserved.