diff options
-rw-r--r-- | protocols/msn/msn.c | 1 | ||||
-rw-r--r-- | protocols/msn/msn.h | 11 | ||||
-rw-r--r-- | protocols/msn/ns.c | 4 | ||||
-rw-r--r-- | protocols/msn/soap.c | 15 | ||||
-rw-r--r-- | protocols/msn/soap.h | 13 |
5 files changed, 31 insertions, 13 deletions
diff --git a/protocols/msn/msn.c b/protocols/msn/msn.c index 4de2d822..ef70fe0c 100644 --- a/protocols/msn/msn.c +++ b/protocols/msn/msn.c @@ -105,6 +105,7 @@ static void msn_logout( struct im_connection *ic ) g_free( md->grouplist ); g_free( md->tokens[0] ); g_free( md->tokens[1] ); + g_free( md->tokens[2] ); g_free( md->lock_key ); g_tree_destroy( md->domaintree ); diff --git a/protocols/msn/msn.h b/protocols/msn/msn.h index d788260c..8abe6875 100644 --- a/protocols/msn/msn.h +++ b/protocols/msn/msn.h @@ -48,8 +48,13 @@ #define MSNP11_PROD_ID "PROD01065C%ZFN6F" */ -#define MSNP11_PROD_KEY "RG@XY*28Q5QHS%Q5" -#define MSNP11_PROD_ID "PROD0113H11T8$X_" +#define MSNP11_PROD_KEY "ILTXC!4IXB5FB*PX" +//PK}_A_0N_K%O?A9S" +#define MSNP11_PROD_ID "PROD0119GSJUC$18" +//PROD0114ES4Z%Q5W" +#define MSNP_VER "MSNP15" +#define MSNP_BUILD "8.5.1288" +//"8.1.0178" #define MSN_SB_NEW -24062002 @@ -78,7 +83,7 @@ struct msn_data struct msn_handler_data *handler; int trId; - char *tokens[2]; + char *tokens[3]; char *lock_key; GSList *msgq, *grpq; diff --git a/protocols/msn/ns.c b/protocols/msn/ns.c index 2d40b47b..4ae8693d 100644 --- a/protocols/msn/ns.c +++ b/protocols/msn/ns.c @@ -73,7 +73,7 @@ gboolean msn_ns_connected( gpointer data, gint source, b_input_condition cond ) md->handler->fd = md->fd; md->handler->rxq = g_new0( char, 1 ); - g_snprintf( s, sizeof( s ), "VER %d MSNP15 CVR0\r\n", ++md->trId ); + g_snprintf( s, sizeof( s ), "VER %d %s CVR0\r\n", ++md->trId, MSNP_VER ); if( msn_write( ic, s, strlen( s ) ) ) { ic->inpa = b_input_add( md->fd, B_EV_IO_READ, msn_ns_callback, ic ); @@ -113,7 +113,7 @@ static int msn_ns_command( gpointer data, char **cmd, int num_parts ) if( strcmp( cmd[0], "VER" ) == 0 ) { - if( cmd[2] && strncmp( cmd[2], "MSNP15", 5 ) != 0 ) + if( cmd[2] && strncmp( cmd[2], MSNP_VER, 5 ) != 0 ) { imcb_error( ic, "Unsupported protocol" ); imc_logout( ic, FALSE ); diff --git a/protocols/msn/soap.c b/protocols/msn/soap.c index bb664861..0fb36bb4 100644 --- a/protocols/msn/soap.c +++ b/protocols/msn/soap.c @@ -177,10 +177,12 @@ static xt_status msn_soap_passport_sso_token( struct xt_node *node, gpointer dat p->text ) sd->secret = g_strdup( p->text ); - if( *id == '1' ) - md->tokens[0] = g_strdup( node->text ); - else if( *id == '2' ) - md->tokens[1] = g_strdup( node->text ); + *id -= '1'; + if( *id >= 0 && *id <= 2 ) + { + g_free( md->tokens[(int)*id] ); + md->tokens[(int)*id] = g_strdup( node->text ); + } return XT_HANDLED; } @@ -309,12 +311,13 @@ static int msn_soap_oim_build_request( struct msn_soap_req_data *soap_req ) struct msn_data *md = ic->proto_data; char *display_name_b64; - display_name_b64 = tobase64( ic->displayname ); + display_name_b64 = tobase64( set_getstr( &ic->acc->set, "display_name" ) ); soap_req->url = g_strdup( SOAP_OIM_SEND_URL ); soap_req->action = g_strdup( SOAP_OIM_SEND_ACTION ); soap_req->payload = g_markup_printf_escaped( SOAP_OIM_SEND_PAYLOAD, - ic->acc->user, display_name_b64, oim->to, "bla", //md->passport_token, + ic->acc->user, display_name_b64, MSNP_VER, MSNP_BUILD, + oim->to, md->tokens[2], MSNP11_PROD_ID, md->lock_key ? md->lock_key : "", oim->number, oim->number, oim->msg ); diff --git a/protocols/msn/soap.h b/protocols/msn/soap.h index 9eb1caef..f3231e91 100644 --- a/protocols/msn/soap.h +++ b/protocols/msn/soap.h @@ -110,6 +110,15 @@ "</wsp:AppliesTo>" \ "<wsse:PolicyReference xmlns=\"http://schemas.xmlsoap.org/ws/2003/06/secext\" URI=\"MBI\"></wsse:PolicyReference>" \ "</wst:RequestSecurityToken>" \ + "<wst:RequestSecurityToken Id=\"RST3\">" \ + "<wst:RequestType>http://schemas.xmlsoap.org/ws/2004/04/security/trust/Issue</wst:RequestType>" \ + "<wsp:AppliesTo>" \ + "<wsa:EndpointReference>" \ + "<wsa:Address>messengersecure.live.com</wsa:Address>" \ + "</wsa:EndpointReference>" \ + "</wsp:AppliesTo>" \ + "<wsse:PolicyReference xmlns=\"http://schemas.xmlsoap.org/ws/2003/06/secext\" URI=\"MBI_SSL\"></wsse:PolicyReference>" \ + "</wst:RequestSecurityToken>" \ "</ps:RequestMultipleSecurityTokens>" \ "</Body>" \ "</Envelope>" @@ -118,13 +127,13 @@ int msn_soap_passport_sso_request( struct im_connection *ic, const char *policy, #define SOAP_OIM_SEND_URL "https://ows.messenger.msn.com/OimWS/oim.asmx" -#define SOAP_OIM_SEND_ACTION "http://messenger.msn.com/ws/2004/09/oim/Store" +#define SOAP_OIM_SEND_ACTION "http://messenger.live.com/ws/2006/09/oim/Store2" #define SOAP_OIM_SEND_PAYLOAD \ "<?xml version=\"1.0\" encoding=\"utf-8\"?>" \ "<soap:Envelope xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\">" \ "<soap:Header>" \ - "<From memberName=\"%s\" friendlyName=\"=?utf-8?B?%s?=\" xml:lang=\"nl-nl\" proxy=\"MSNMSGR\" xmlns=\"http://messenger.msn.com/ws/2004/09/oim/\" msnpVer=\"MSNP13\" buildVer=\"8.0.0328\"/>" \ + "<From memberName=\"%s\" friendlyName=\"=?utf-8?B?%s?=\" xml:lang=\"nl-nl\" proxy=\"MSNMSGR\" xmlns=\"http://messenger.msn.com/ws/2004/09/oim/\" msnpVer=\"%s\" buildVer=\"%s\"/>" \ "<To memberName=\"%s\" xmlns=\"http://messenger.msn.com/ws/2004/09/oim/\"/>" \ "<Ticket passport=\"%s\" appid=\"%s\" lockkey=\"%s\" xmlns=\"http://messenger.msn.com/ws/2004/09/oim/\"/>" \ "<Sequence xmlns=\"http://schemas.xmlsoap.org/ws/2003/03/rm\">" \ |