SNAC(17,02)  CLI_MD5_LOGIN 

Client use this snac to login to server (md5 login sequence). Server should reply via SNAC(17,03), containing BOS address/cookie or errorcode. Password hash creating:

You'll need password, authkey from SNAC(17,07) and RFC 1321 md5 routines:

   #define AIM_MD5_STRING "AOL Instant Messenger (SM)"

   /* calculate md5-hash to send to server */
   md5_init(&state);
   md5_append(&state, (const md5_byte_t *)authkey, strlen(authkey));
   md5_append(&state, (const md5_byte_t *)passwd, strlen(passwd));
   md5_append(&state, (const md5_byte_t *)AIM_MD5_STRING, strlen(AIM_MD5_STRING));
   md5_finish(&state, (md5_byte_t *)auth_hash);
 
   /* Now we ready send to server auth_hash array (16 bytes long) */


 00 17   word   SNAC family
 00 02   word   SNAC subtype
 00 00   word   SNAC flags
 xx xx xx xx   dword   SNAC request-id
 00 01   word   TLV.Type(0x01) - screen name
 xx xx   word   TLV.Length
 xx ..   string   Screen name
 00 03   word   TLV.Type(0x03) - client id string
 xx xx   word   TLV.Length
 xx ..   string   Client id string (name, version)
 00 25   word   TLV.Type(0x25) - password md5 hash
 00 10   word   TLV.Length
 xx xx xx xx
 xx xx xx xx
 xx xx xx xx
 xx xx xx xx
  array   password md5 hash
 00 16   word   TLV.Type(0x16) - client id
 00 02   word   TLV.Length
 xx xx   word   Client id number
 00 17   word   TLV.Type(0x17) - client major version
 00 02   word   TLV.Length
 xx xx   word   Client major version
 00 18   word   TLV.Type(0x18) - client minor version
 00 02   word   TLV.Length
 xx xx   word   Client minor version
 00 19   word   TLV.Type(0x19) - client lesser version
 00 02   word   TLV.Length
 xx xx   word   Client lesser version
 00 1A   word   TLV.Type(0x1A) - client build number
 00 02   word   TLV.Length
 xx xx   word   Client build number
 00 14   word   TLV.Type(0x14) - distribution number
 00 04   word   TLV.Length
 xx xx xx xx   dword   Distribution number
 00 0F   word   TLV.Type(0x0F) - client language (2 symbols)
 xx xx   word   TLV.Length
 xx ..   string   Client language
 00 0E   word   TLV.Type(0x0E) - client country (2 symbols)
 xx xx   word   TLV.Length
 xx ..   string   Client country
 00 0F   word   TLV.Type(0x4A) - SSI use flag
 00 01   word   TLV.Length
 xx   char   SSI flag: 1 - SSI only, 0 - family 0x03
 May contain other tlv from the following list

Example SNAC dump with flap header:

  2A 02 50 0F 00 95 00 17  00 02 00 00 00 00 00 00 *.P.............
  00 01 00 07 36 32 31 38  38 39 35 00 25 00 10 77 ....6218895.%..w
  D2 88 A0 1B 2E 22 D0 8A  75 A6 34 DD 7C 7C A9 00 ....."..u.4.....
  4C 00 00 00 03 00 2D 41  4F 4C 20 49 6E 73 74 61 L.....-AOL Insta
  6E 74 20 4D 65 73 73 65  6E 67 65 72 2C 20 76 65 nt Messenger, ve
  72 73 69 6F 6E 20 35 2E  31 2E 33 30 33 36 2F 57 rsion 5.1.3036/W
  49 4E 33 32 00 16 00 02  01 09 00 17 00 02 00 05 IN32............
  00 18 00 02 00 01 00 19  00 02 00 00 00 1A 00 02 ................
  0B DC 00 14 00 04 00 00  00 D2 00 0F 00 02 65 6E ..............en
  00 0E 00 02 75 73 00 4A  00 01 01                ....us.J...


  Main | Basic | Login | Snaclist | Sequences | Misc | Changes | Credits | Terms