5. Detailed client packet analysis

This section goes through the individual packets that the client can send.

5.1. The KEEP_ALIVE packet

The keep alive packet contains no data. The low command bytes contain the sequence number. This sequence number always seems to start at 4. A keep alive packet must be sent every 60 seconds. Each time it is sent the sequence number is increased by one.

5.2. The REGISTER packet

A client must send this packet if they wish to register a new account with mig33.

Table 6. REGISTER contents

LengthContent (if fixed)NameDescription
2 bytes00 04MARK_CELLUsed to mark the beginning of a cellphone telephone number string.
4 bytesxx xx xx xxCELLNUM_LENThe length of a celular phone number (include country code)
variable CELLNUMThe cellphone number without dashes or dots. Example 1-310-555-5554 would be "13105555554"
2 bytes00 03MARK_PASSWORDUsed to mark the beginning of a password string block.
4 bytesxx xx xx xxPASSWORD_LENThe length of the password you wish to use during registration.
variable PASSWORDThe password
2 bytes00 02MARK_USERNAMEUsed to mark the beginning of a username string block
4 bytesxx xx xx xxUSERNAME_LENThe length of the username you are registering.
variable USERNAMEThe username you are registering.
2 bytes00 01X1Unknown. Ending marker?
4 bytes00 00 00 01UNKNOWN_LENUnknown but always 00 00 00 01.
1 byte01X5Unknown. Always 01.

5.3. The LOGIN_1 packet

The initial packet sent to a server.

Table 7. LOGIN_1 contents

LengthContent (if fixed)NameDescription
2 bytes00 09X1Unknown marker.
4 bytes00 00 00 04X2Unknown.
4 bytes00 00 00 01X3Unknown.
2 bytes00 08MARK_PLATThe marker for the platform block of the packet
4 bytesxx xx xx xxTEXT_LEN1The length of the J2ME platform string
variable J2ME_PLATThe J2ME platform. Some examples in the wild:
  • MPP

  • Nokia6300/04.71

  • Unknown

  • j2me

2 bytes00 07MARK_VERSTRINGThe marker for the mig33 version string.
4 bytes00 00 00 09TEXT_LEN29 for the length of "J2MEv2.04" or "J2MEv3.00" or "J2MEv3.02" or "J2MEv3.05".
9 bytesxx xx xx xx xx xx xx xx xxMIDLET_VERSIONThe bytes of the string "J2MEv2.04" or "J2MEv3.00" or "J2MEv3.02" or "J2MEv3.05"
2 bytes00 05MARK_USERNAMEThe marker for the username string.
4 bytesxx xx xx xxTEXT_LEN3the length of your username.
variable USERNAMEthe bytes of your username.
2 bytes00 03MARK_VERSIONMarker for the version number as a short.
4 bytes00 00 00 02VERSION_NUM_LENThe length of the version number. sizeof(uint16_t).
2 bytesxx xxVERSION_NUMThe version number in a short. It should be either:
  • 00 CC (204)

  • 01 2C (300)

  • 01 2E (302)

  • 01 31 (305)

2 bytes00 02X9Unknown.
4 bytes00 00 00 01X10Unknown.
1 bytexxX1101 for version 204, 02 for version 300 and above.
2 bytes00 01X12Unknown
4 bytes00 00 00 02SIZE_X14Size of X14 in bytes.
2 bytes00 01X14Unknown but always 00 01.

5.4. The LOGIN_RESP packet

The login response to challenge packet sent by server.

Table 8. LOGIN_RESP contents

LengthContent (if fixed)NameDescription
2 bytes00 01MARK_HASHCODEA marker used to indicate that this block is for the hash code.
4 bytes00 00 00 04HASHCODE_LENThe length of the hash code
4 bytesxx xx xx xxHASHCODEThe 4 byte calculated hash code of the server's HASH_STRING concatenated with the client's password.

HASHCODE is calclated by taking the server's HASH_STRING, then concatenating it with the client's password (in all lowercase) and running it through a hash code function. The function is the same used from Java's String hashCode() method.

5.5. The GET_CLIST packet

Get contact list. It has no parameters.

5.6. The SEND_MSG packet

This packet is created to send a message to a mig33 entity (either a chat room or contact).

Table 9. SEND_MSG contents

LengthContent (if fixed)NameDescription
2 bytes00 08MARK_MSGA marker to indicate that this block contains the message.
4 bytesxx xx xx xxMSG_LENThe length of the message you are going to send
variable MSGA string containing the message to send
2 bytes00 06X2Unknown.
4 bytes00 00 00 02X3Unknown.
2 bytes00 01X4Unknown.
2 bytes00 04MARK_DESTINATIONA marker to indicate that this block contain the destination entity.
4 bytesxx xx xx xxDESTINATION_LENThe length of the destination's name
variable DESTINATIONThe name of the destination. Either a chat room or mig33 contact
2 bytes00 03X6Unknown
4 bytes00 00 00 01X7Unknown
1 byte03X8Unknown
2 bytes00 02MARK_USERA marker used to indicate that this block contains your username.
4 bytesxx xx xx xxUSER_NAME_LENThe length of your user name.
variable USER_NAMEYour user name
2 bytes00 01X10Unknown.
4 bytes00 00 00 01X11Unknown.
1 byte01X12Unknown.

5.7. The SEND_PIC_REQUEST packet

This packet is created to ask the mig33 server to set up a picture exchange.

Table 10. SEND_PIC_REQUEST contents

LengthContent (if fixed)NameDescription
2 bytes00 01MARK_UNKNOWNA marker to indicate that this is an unknown block.
4 bytes00 00 00 01UNKNOWN_LENAn unknown length. Always 1 byte
1 bytexxUNKNOWNThe only thing I've seen is 0x06