Oke well I've got a new problem right now. (I didn't want to create a new thread so sorry for the double post)
I'm trying to read the packet size and the opcode but my reader returns in the 4th, 5th and the 7th packet wrong values. the 4th shows a wrong opcode the 5th are both values wrong and the 7th is the size wrong.
This is how it looks like:
[Only registered and activated users can see links. Click Here To Register...]
as you can see the 4th packet says opcode = ffff9000 which should be 9000 only.
this is a little code snippet of my reader which I use to read the size and opcode. I got these from Jmerlin's sremu2 for just testing if it works.
Code:
template <typename T>
T reading(byte* stream, int& pos, int len)
{
if((int)(pos + sizeof(T)) > (int)len)
return (T)0;
T val = *(T*)&stream[pos];
pos += sizeof(T);
return val;
}
short packetReader::readWord(){
return reading<short>(_buffer,_cur,_size);
}
I'm using this readWord function for the packet size and opcode. I assume that correct.
owh and by the way I'm printing the size and opcode like this:
Code:
packetReader reader((byte*)data, size);
short psize = reader.readWord() + 6;
short opcode = reader.readWord();
short security = reader.readWord();
printf("packet size: %d\n", psize);
printf("opcode: %.4x\n", opcode);
I hope someone could help me with this problem.
thank you:)
EDIT: @lesderid Yeah I saw your packet documentation it's great:) But I would like to have something which I can use and update because your documentation would be incorrect if joymax changes something. and I need something to sniff ingame without using a loader or something like that. because most of the packet sniffers are build in loaders so you don't get the first few packets at startup and you have to wait for a new release if joymax updates their opcodes and with this one I ain't got those problems.
btw sorry for my english:P