[Tutorial] How to make a MapleStory Redirector.

Page 1 of 3 123 LastLast
Results 1 to 15 of 38
  1. #1
    I'm overrated. Fraysa is offline
    MemberRank
    Apr 2008 Join Date
    4,891Posts

    [Tutorial] How to make a MapleStory Redirector.

    How to make a MapleStory Redirector.

    Introduction.

    After mine got leaked (but I don't really mind), I decided to give something to the community. It's already been released - so why not explain how it's done? It all started a few months ago, when a friend asked me to make one. I had no idea how to do so, so I done a bit of research and got great help from Diamondo. As of today, I understand how they work and how to make them. It's pretty easy if you catch the idea. In this tutorial, I will explain how to make one yourself. No, this won't freely get you a redirector if you don't know what you're doing.

    Requirements.

    • Microsoft Visual Studio 2012 (.. or Visual C# Express).
    • The ability & will to learn, and not just leech.


    Understanding the Context.

    Spoiler:

    Before we even start creating the Redirector, we have to understand what everything means, so we can learn about our tools before we actually use them!

    A packet is an array of bytes, used to transfer data between the client and the server. Each packets represents data, there are no "useless" packets. Of course, as a server, we don't take care of certain packets because they're simply not necessarily needed for us (Ex. Character creation date).

    A client is an executable file used to connect the user to the server. "The GUI is a projection of the packets", like Moogra once said.

    A server is the location where the source code is hosted, and it manages the information and data received by the clients and holds the database information.

    Handshake is a common name of a packet to indicate the connection was accepted by the server. The client connects to a certain IP and sends the hello packet. Once the server receives it, the handshake packet is sent and then the client knows the connection has established. The client tries 3 times before giving up if it failed.



    Communication between Client and Server.

    Spoiler:

    What is a Redirector, actually? A Redirector is a "bridge", to help the client send data to the server back and forth. We need this, because localhosts are no longer available, so we are actually overriding this by loopbacking MapleStory to localhost and connecting to the server as if we were the actual client.

    All packets that are sent from the client are re-encrypted and sent back to server, and vice-versa. Here is a little visualization I made to help you better understand the concept.


    The arrows are indicating the data being passed through the
    redirector to the server. It applies vice-versa as well.



    Part 1: The Basics.

    Spoiler:

    I will be using Microsoft Visual Studio 2012 and C# for this project. This can be done in any language, but I prefer C#. Start by creating a new project, named whatever you want - but I prefer "MapleClient". Make it a WinForms application (.. as you will probably make it a launcher in the future).

    Click for Image.

    The next thing to do is add a library to make the communication. You can either use MapleLib or Diamondo's MWLR Logging files. I use Diamondo's, as I like them better in their context, and he also recommended them. But both works fine.
    Note: Code may differ if you are using MapleLib. I added them all under a folder named "Connection".

    Click for Image.


    Part 2: Server and Client classes.

    Spoiler:

    To make an actual connection to the server, we need to inherit the Session class, which provides us with methods to receive and send data to a connection (whether it's local or remote). That means we will have to create two classes. One for the client, so we can accept the MapleStory's connection and send packets from it to the server - and one for the server, so we can connect to the server and send packets from it to the client.

    We will start with the Server. Don't forget to inherit the Session class and import your Connection folder.

    Click for Image.

    There are 3 base constructors for the Session class. We will be using the one that accepts arguments of an IP, a Port and a Type Name. The Type Name is a name given for a Session to differ it from others, to make it more organized. I created the class and just used the keyword base to connect to the given IP and Port. I used the Type Name "Server", of course. I also imported some of the methods of the inherited class: OnDisconnect, which is called when the server is disconnected (Manually or not), OnPacketInbound, which is called when a packet is received from the server, and OnHandshakeInbound, which is called when the Handshake packet is received from the Server.

    Click for Image.

    To access the Server's instance, we will need to store it somewhere. You can simply add a line in Program class to store it, making it static, of course.

    Click for Image.

    Client! That's the next class we will be making. Create this class, and on the constructor, the base requires a socket to be applied - add it in the argument of the constructor and also make a new instance of Program.Server.

    The client's instance is created once a connection is accepted (MapleStory's original client). The moment we are creating a new Client instance, we are connecting to the server to make the actual bridge. Don't forget to add the base methods! No need for Handshake as we're not getting one..

    Click for Image.

    To accept a connection from the MapleStory client, we obviously need to listen on the desired port (8484). To do that, declare a static TcpListener variable, and add a method named Listen to start the listener and accept a new socket. Oh and.. don't foget the async EndAccept.

    Click for Image.

    We are creating a new TcpListener instance to listen for connections on Port 8484 from any IP (The MapleStory login port). The async callback will be EndAccept method, which will get the Socket from the listener and apply it to the new Client instance. You may also add debug messages, such as "Listening on Port 8484, Accepted connection on Port 8484" and so on.. Oh and! You're probably wondering what "Instance" is. It's just a variable of a Client so I can quickly access the instance from other classes (Just like what I did with the Server in Program class).


    Part 3: Transferring the Data.

    Spoiler:

    To send the data received from client to server, and vice-versa, we will have to use the overridden methods now. Let's start with Client. Send the received packet to the Server just like so.

    The OnPacketInbound method is called when data is received (a packet). We are not touching the packet, we're sending it straight to the server, as if we were the original client. Remember you can also read the opcode so you can make different stuff.

    Click for Image.

    Do the same with the Server now. For the OnHandshakeInbound method, we will send it to the client using base keyword (The Session class already applies it for us, and already has a SendHandshake method (-: ).

    Click for Image.

    We are done! Almost.. now, what's left to do is listen for the MapleStory connection! The rest will be done for us. You can do it in the Form's Load Event. Not only listen - but to also initialize GMSKeys (A class Diamondo created to obtain MapleStory keys from a remote txt file).

    Click for Image.


    Credits:

    • Fraysa - Writing and creating the tutorial.
    • Diamondo25 - Great help.
    • Unknown - Motivation.. I think.


    Demo Project Download.

    Please post any questions here, I'd love to answer!

    Last edited by Fraysa; 16-09-13 at 03:10 PM.


  2. #2
    Nexon's undercover nugyyman is offline
    MemberRank
    Feb 2010 Join Date
    IsraelLocation
    541Posts

    Re: [Tutorial] How to make a MapleStory Redirector.

    This is great.
    I appreciate those tutorials over the releases. Good job!

  3. #3
    Account Upgraded | Title Enabled! ngnam87 is offline
    MemberRank
    Mar 2013 Join Date
    666Posts

    Re: [Tutorial] How to make a MapleStory Redirector.

    i wonder that how Extalia did their client that can bypass and ppl can login use NX screen :-<

  4. #4
    I'm overrated. Fraysa is offline
    MemberRank
    Apr 2008 Join Date
    4,891Posts

    Re: [Tutorial] How to make a MapleStory Redirector.

    Quote Originally Posted by ngnam87 View Post
    i wonder that how Extalia did their client that can bypass and ppl can login use NX screen :-<
    Extalia are using an unpacked client that nops a few things to make it bypass Hackshield and of course the auth server.

  5. #5
    Account Upgraded | Title Enabled! ngnam87 is offline
    MemberRank
    Mar 2013 Join Date
    666Posts

    Re: [Tutorial] How to make a MapleStory Redirector.

    Quote Originally Posted by Fraysa View Post
    Extalia are using an unpacked client that nops a few things to make it bypass Hackshield and of course the auth server.
    so you mean that we cannot use Extalia's unpacked file like MapleStoryU ???
    please tell if it possible !!!

  6. #6
    BloopBloop Hilia is offline
    MemberRank
    Aug 2012 Join Date
    905Posts

    Re: [Tutorial] How to make a MapleStory Redirector.

    Quote Originally Posted by Fraysa
    Haaaaaaai
    I don't want to be in the fucking credits xD



    Quote Originally Posted by ngnam87 View Post
    so you mean that we cannot use Extalia's unpacked file like MapleStoryU ???
    please tell if it possible !!!
    The MapleStoryU.exe is a unpacket maplestory client (MapleStoryU).
    The ExtaliaMs.exe injects their dll, what does insert the IP,removes HS,BlackChiper. The DLL is coded in Delphi and is packet xD.

    In other words, you are fucked without the dll.
    Last edited by Hilia; 15-09-13 at 01:02 PM.

  7. #7
    I'm overrated. Fraysa is offline
    MemberRank
    Apr 2008 Join Date
    4,891Posts

    Re: [Tutorial] How to make a MapleStory Redirector.

    Quote Originally Posted by Hilia View Post

    I don't want to be in the fucking credits xD





    The MapleStoryU.exe is a unpacket maplestory client (MapleStoryU).
    The ExtaliaMs.exe injects their dll, that does insert the IP,removes HS,BlackChiper. The DLL is coded in Delphi and is packet xD.

    In other words, you are fucked without the dll.
    Done (-:

  8. #8
    I'm overrated. Fraysa is offline
    MemberRank
    Apr 2008 Join Date
    4,891Posts

    Re: [Tutorial] How to make a MapleStory Redirector.

    Updated main post, re-organized a few things.

    Come on guys, this isn't getting enough views than I thought it would! This just proves that nobody here wants to learn.. lol.

  9. #9
    Apprentice yonioz5 is offline
    MemberRank
    Sep 2013 Join Date
    15Posts

    Re: [Tutorial] How to make a MapleStory Redirector.

    Sorry for bothering is not there here full written client? i just need the client and everything will be fine... please

  10. #10
    How cool is that? sonnyeb is offline
    MemberRank
    Oct 2012 Join Date
    /f425/Location
    393Posts

    Re: [Tutorial] How to make a MapleStory Redirector.

    Quote Originally Posted by yonioz5 View Post
    Sorry for bothering is not there here full written client? i just need the client and everything will be fine... please
    and hence the purpose of this tutorial, to teach you how to make one.

  11. #11
    Apprentice yonioz5 is offline
    MemberRank
    Sep 2013 Join Date
    15Posts

    Re: [Tutorial] How to make a MapleStory Redirector.

    i know, but i do not know how to use the visual and etc.... can you give me ready and tell me how to change the ip? thanks

  12. #12
    I'm overrated. Fraysa is offline
    MemberRank
    Apr 2008 Join Date
    4,891Posts

    Re: [Tutorial] How to make a MapleStory Redirector.

    Quote Originally Posted by yonioz5 View Post
    i know, but i do not know how to use the visual and etc.... can you give me ready and tell me how to change the ip? thanks
    Then this thread is not for you, I'm sorry. I'm not spoonfeeding by giving a full client - I'm trying to teach people how it's done.

  13. #13
    Apprentice yonioz5 is offline
    MemberRank
    Sep 2013 Join Date
    15Posts

    Re: [Tutorial] How to make a MapleStory Redirector.

    Quote Originally Posted by Fraysa View Post
    Then this thread is not for you, I'm sorry. I'm not spoonfeeding by giving a full client - I'm trying to teach people how it's done.
    AT V55- 117.2 we had client it was more easily we needed just to change the ip and it would work.
    now i would never used this visual and this TUT does not teach us how to make a Redirector.
    If you could make a video and explain it there it would be better.
    Thank you anyways...

  14. #14
    Account Upgraded | Title Enabled! ngnam87 is offline
    MemberRank
    Mar 2013 Join Date
    666Posts

    Re: [Tutorial] How to make a MapleStory Redirector.

    Quote Originally Posted by Fraysa View Post
    Then this thread is not for you, I'm sorry. I'm not spoonfeeding by giving a full client - I'm trying to teach people how it's done.
    from your Tut i wonder that should i make a full client and release it for leecher 0_o
    i really want to learn, i like you
    but almost ppl don't, will Rz help them ??!

  15. #15
    Flow even is offline
    MemberRank
    Nov 2012 Join Date
    BaniLocation
    610Posts

    Re: [Tutorial] How to make a MapleStory Redirector.

    Very useful. I am bookmarking this for when I update to the current version.
    Quote Originally Posted by ngnam87 View Post
    from your Tut i wonder that should i make a full client and release it for leecher 0_o
    i really want to learn, i like you
    but almost ppl don't, will Rz help them ??!
    Do not do it, let them learn how to.
    Quote Originally Posted by yonioz5 View Post
    AT V55- 117.2 we had client it was more easily we needed just to change the ip and it would work.
    now i would never used this visual and this TUT does not teach us how to make a Redirector.
    If you could make a video and explain it there it would be better.
    Thank you anyways...
    This thread is sufficient enough.



Page 1 of 3 123 LastLast

Advertisement