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:
Mapleserverhandler:
And the getHello
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.
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: