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!

¨[HeavenMS] Delete localhost check on Serverconstants and/or getHello

Junior Spellweaver
Joined
Sep 20, 2019
Messages
108
Reaction score
8
Hi, as the title says i'm trying to use a different locahost in Heavenms but i cant manage to make it work, since keep showing me the popup "the client is outdated", and i dont know how to find the version of the localhost i'm trying to use because i dont know what's is supposed to be the adress that shows the version of the localhost, so i think is way easier to somehow delete the check in the source that force you to use the needed localhost.

Here is Heavenms constants:

PHP:
 public static short VERSION = 83;

Mapleserverhandler:

Code:
public void sessionOpened(IoSession session) {        
       String remoteHost;        
       try {            
             remoteHost = ((InetSocketAddress) session.getRemoteAddress()).getAddress().getHostAddress();   
                    
            if (remoteHost == null) {                
                remoteHost = "null";            
            }        
   } catch (NullPointerException npe) {        
          remoteHost = "null";        
   }               

    session.setAttribute(MapleClient.CLIENT_REMOTE_ADDRESS, remoteHost);               
   
    if (!Server.getInstance().isOnline()) {            
       MapleSessionCoordinator.getInstance().closeSession(session, true);            
       return;        
    }               
        
            if (!isLoginServerHandler()) {            
                  if (Server.getInstance().getChannel(world, channel) == null) {   
                      MapleSessionCoordinator.getInstance().closeSession(session, true);                
                      return;            
                  }        
                } else {            
                       if (!MapleSessionCoordinator.getInstance().canStartLoginSession(session)) {                
                            return;            
                       }    
                    
                        FilePrinter.print(FilePrinter.SESSION, "IoSession with " + session.getRemoteAddress() + " opened on " + sdf.format(Calendar.getInstance().getTime()), false);        
      }        

       byte ivRecv[] = {70, 114, 122, 82};        
       byte ivSend[] = {82, 48, 120, 115};        
       ivRecv[3] = (byte) (Math.random() * 255);        
       ivSend[3] = (byte) (Math.random() * 255);        
       MapleAESOFB sendCypher = new MapleAESOFB(ivSend, (short) (0xFFFF - ServerConstants.VERSION));
       MapleAESOFB recvCypher = new MapleAESOFB(ivRecv, (short) ServerConstants.VERSION);        
       MapleClient client = new MapleClient(sendCypher, recvCypher, session);        
       client.setWorld(world);        
       client.setChannel(channel);        
       client.setSessionId(sessionId.getAndIncrement()); // Generates a reasonable session id.       
        session.write(MaplePacketCreator.getHello(ServerConstants.VERSION, ivSend, ivRecv));       
         session.setAttribute(MapleClient.CLIENT_KEY, client);    
}


And the getHello

PHP:
public static byte[] getHello(short mapleVersion, byte[] sendIv, byte[] recvIv) {
            final MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter(8);
            mplew.writeShort(0x0E);
            mplew.writeShort(mapleVersion);
            mplew.writeShort(1);
            mplew.write(49);
            mplew.write(recvIv);
            mplew.write(sendIv);
            mplew.write(8);
            return mplew.getPacket();
        }

I aim to use any localhost with the source removing the VERSION check that only let me open the client having the right localhost.. Is it possible? and if it is, how?

Thanks in advance and please go easy on me.
 
Last edited:
Discord: .z41n
[VIP] Member
Joined
Aug 3, 2008
Messages
172
Reaction score
26
You are trying to use a different version localhost with v83 HeavenMS?

If so, you need to update the RECV and SEND opcodes to make that if the version you're trying to use.

i.e.:

yOegN5x - ¨[HeavenMS] Delete localhost check on Serverconstants  and/or getHello - RaGEZONE Forums
 

Attachments

You must be registered for see attachments list
Upvote 0
Junior Spellweaver
Joined
Sep 20, 2019
Messages
108
Reaction score
8
And how or where can i find the correct opcodes in a localhost? Using IDA i suppose but how to find them?

PD: im a super noob at these stuff (learning).
 
Last edited:
Upvote 0
Discord: .z41n
[VIP] Member
Joined
Aug 3, 2008
Messages
172
Reaction score
26
The issue is that, in most sources, the opcodes are labeled differently than how Nexon has them. So even if you had a fully named IDB, you'll have to go through each to confirm you're in the right location.

You haven't stated which localhost version you're trying to use instead of the v83, but I would suggest you look into other public repacks to see if there is a different naming convention being used (ensuring of course that the source version matches with the localhost version).

Once you find that repack, hopefully their opcodes in the source are NOT_NAMED_LIKE_THIS and will hopefully be NamedLikeThis (should be more like Nexon).
 
Upvote 0
Back
Top