Changeset 862371b for libfaim/auth.c
- Timestamp:
- Jun 29, 2003, 1:47:04 PM (21 years ago)
- Branches:
- master, barnowl_perlaim, debian, owl, release-1.10, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
- Children:
- e016fc2
- Parents:
- 03ad7b2
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libfaim/auth.c
r5e53c4a r862371b 1 1 /* 2 * Deals with the authorizer (group 0x0017=23, and old-style non-SNAC login). 2 * Family 0x0017 - Authentication. 3 * 4 * Deals with the authorizer for SNAC-based login, and also old-style 5 * non-SNAC login. 3 6 * 4 7 */ … … 148 151 149 152 /* 150 * Part two of the ICQ hack. Note the ignoring of the key and clientinfo. 151 */ 152 static int goddamnicq2(aim_session_t *sess, aim_conn_t *conn, const char *sn, const char *password) 153 { 154 static const char clientstr[] = {"ICQ Inc. - Product of ICQ (TM) 2000b.4.65.1.3281.85"}; 155 static const char lang[] = {"en"}; 156 static const char country[] = {"us"}; 153 * Part two of the ICQ hack. Note the ignoring of the key. 154 */ 155 static int goddamnicq2(aim_session_t *sess, aim_conn_t *conn, const char *sn, const char *password, struct client_info_s *ci) 156 { 157 157 aim_frame_t *fr; 158 158 aim_tlvlist_t *tl = NULL; … … 169 169 aim_encode_password(password, password_encoded); 170 170 171 aimbs_put32(&fr->data, 0x00000001); 171 aimbs_put32(&fr->data, 0x00000001); /* FLAP Version */ 172 172 aim_addtlvtochain_raw(&tl, 0x0001, strlen(sn), sn); 173 173 aim_addtlvtochain_raw(&tl, 0x0002, strlen(password), password_encoded); 174 aim_addtlvtochain_raw(&tl, 0x0003, strlen(clientstr), clientstr); 175 aim_addtlvtochain16(&tl, 0x0016, 0x010a); /* cliend ID */ 176 aim_addtlvtochain16(&tl, 0x0017, 0x0004); /* major version */ 177 aim_addtlvtochain16(&tl, 0x0018, 0x0041); /* minor version */ 178 aim_addtlvtochain16(&tl, 0x0019, 0x0001); /* point version */ 179 aim_addtlvtochain16(&tl, 0x001a, 0x0cd1); /* build */ 174 175 if (ci->clientstring) 176 aim_addtlvtochain_raw(&tl, 0x0003, strlen(ci->clientstring), ci->clientstring); 177 aim_addtlvtochain16(&tl, 0x0016, (fu16_t)ci->clientid); 178 aim_addtlvtochain16(&tl, 0x0017, (fu16_t)ci->major); 179 aim_addtlvtochain16(&tl, 0x0018, (fu16_t)ci->minor); 180 aim_addtlvtochain16(&tl, 0x0019, (fu16_t)ci->point); 181 aim_addtlvtochain16(&tl, 0x001a, (fu16_t)ci->build); 180 182 aim_addtlvtochain32(&tl, 0x0014, 0x00000055); /* distribution chan */ 181 aim_addtlvtochain_raw(&tl, 0x000f, strlen( lang),lang);182 aim_addtlvtochain_raw(&tl, 0x000e, strlen(c ountry),country);183 aim_addtlvtochain_raw(&tl, 0x000f, strlen(ci->lang), ci->lang); 184 aim_addtlvtochain_raw(&tl, 0x000e, strlen(ci->country), ci->country); 183 185 184 186 aim_writetlvchain(&fr->data, &tl); … … 277 279 */ 278 280 if (sess->flags & AIM_SESS_FLAGS_XORLOGIN) 279 return goddamnicq2(sess, conn, sn, password );281 return goddamnicq2(sess, conn, sn, password, ci); 280 282 281 283 … … 290 292 aim_encode_password_md5(password, key, digest); 291 293 aim_addtlvtochain_raw(&tl, 0x0025, 16, digest); 294 295 /* 296 * Newer versions of winaim have an empty type x004c TLV here. 297 */ 292 298 293 299 if (ci->clientstring) … … 305 311 * to use SSI. 306 312 */ 307 if (0) 308 aim_addtlvtochain8(&tl, 0x004a, 0x01); 313 aim_addtlvtochain8(&tl, 0x004a, 0x01); 309 314 310 315 aim_writetlvchain(&fr->data, &tl); … … 473 478 ; /* no idea what this is */ 474 479 480 /* 481 * URL to change password. 482 */ 483 if (aim_gettlv(tlvlist, 0x0054, 1)) 484 info.chpassurl = aim_gettlv_str(tlvlist, 0x0054, 1); 475 485 476 486 if ((userfunc = aim_callhandler(sess, rx->conn, snac ? snac->family : 0x0017, snac ? snac->subtype : 0x0003))) … … 481 491 free(info.errorurl); 482 492 free(info.email); 493 free(info.chpassurl); 483 494 free(info.latestrelease.name); 484 495 free(info.latestrelease.url); … … 539 550 return 0; 540 551 } 541
Note: See TracChangeset
for help on using the changeset viewer.