Packets

Huh, I don't really understand you... Nederlands graag.
Nederlands:
Als je met bijv MapleShark een packet sniffed, dan is de vraag hoe je deze omzet naar iets als een "MaplePacket" (zie spoiler)
Stel je sniffd :
PHP:
00 00 00 00 00 00 7C CE 8E 00 00 00 00 00 65 05 00 55 55 55 55 55 02 00 00 00 00 00 00 00 00 00 00 DE 37 59 AB A2 C8 01 12 00 00 00 00 01 01 01 01 A4 49 12 BC 19 A2 18 B7

Hoe maak je er dan het volgende van:
PHP:
00 00 00 00 00 00  
7C CE 8E 00  
00  
00  
00 00  
65  
05 00 55 55 55 55 55  
02 00 00 00 00 00 00 00  
00 00 00  
DE 37 59 AB A2 C8 01 12  
00 00 00 00  
01 //new v120? 
01 //new v120? 
01  
01  
A4 49 12 BC 19 A2 18 B7 

mplew.writeZeroBytes(6); 
mplew.writeInt(client.getAccID());  
mplew.write(0);  
mplew.write(0);  
mplew.writeShort(0);  
mplew.write(0);  
mplew.writeMapleAsciiString(client.getAccountName()); 
mplew.writeLong(2); 
mplew.writeZeroBytes(3); 
mplew.writeLong(0); 
mplew.writeInt(0); 
mplew.write(1); 
mplew.write(1); 
mplew.write(1);  
mplew.write(1);  
mplew.writeLong(0);

English:
If you for ex sniff a packet with MapleShark, then is the question : how to do turn this into a "MaplePacket" (see spoiler)


You got this of MapleShark :
PHP:
00 00 00 00 00 00 7C CE 8E 00 00 00 00 00 65 05 00 55 55 55 55 55 02 00 00 00 00 00 00 00 00 00 00 DE 37 59 AB A2 C8 01 12 00 00 00 00 01 01 01 01 A4 49 12 BC 19 A2 18 B7
the question is: how do turn it in this:
PHP:
00 00 00 00 00 00  
7C CE 8E 00  
00  
00  
00 00  
65  
05 00 55 55 55 55 55  
02 00 00 00 00 00 00 00  
00 00 00  
DE 37 59 AB A2 C8 01 12  
00 00 00 00  
01 //new v120? 
01 //new v120? 
01  
01  
A4 49 12 BC 19 A2 18 B7 

mplew.writeZeroBytes(6); 
mplew.writeInt(client.getAccID());  
mplew.write(0);  
mplew.write(0);  
mplew.writeShort(0);  
mplew.write(0);  
mplew.writeMapleAsciiString(client.getAccountName()); 
mplew.writeLong(2); 
mplew.writeZeroBytes(3); 
mplew.writeLong(0); 
mplew.writeInt(0); 
mplew.write(1); 
mplew.write(1); 
mplew.write(1);  
mplew.write(1);  
mplew.writeLong(0);
 
Upvote 0
Well, you guess thing. You will see some bytes coming back the whole time (like characterid). So it has to be an integer. Also it helps converting bytes to strings and numbers. Like when you convert an int (well you think it's an int) and you convert it then it might be an id in the client.

Basically it's guessing, when odinms was made they had a hard job haha.
 
Upvote 0
Well, you guess thing. You will see some bytes coming back the whole time (like characterid). So it has to be an integer. Also it helps converting bytes to strings and numbers. Like when you convert an int (well you think it's an int) and you convert it then it might be an id in the client.

Basically it's guessing, when odinms was made they had a hard job haha.

So basicly you keep comparing the same stuff and check what's different.
And when do you use mplew.write, mplew.writeInt, mplew.writeShort, mplew.writeAsciiString and etc?
 
Upvote 0
So basicly you keep comparing the same stuff and check what's different.
And when do you use mplew.write, mplew.writeInt, mplew.writeShort, mplew.writeAsciiString and etc?

The client reads the packet, so the only way to know the structure is looking into the client. IDA does that.
 
Upvote 0
Back