1
# -*- coding: utf-8 -*-
3
# This file is part of emesene.
5
# Emesene is free software; you can redistribute it and/or modify
6
# it under the terms of the GNU General Public License as published by
7
# the Free Software Foundation; either version 2 of the License, or
8
# (at your option) any later version.
10
# emesene is distributed in the hope that it will be useful,
11
# but WITHOUT ANY WARRANTY; without even the implied warranty of
12
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
# GNU General Public License for more details.
15
# You should have received a copy of the GNU General Public License
16
# along with emesene; if not, write to the Free Software
17
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
20
# userName, passport, ticket
21
passport = '''<?xml version="1.0" encoding="UTF-8"?>
22
<Envelope xmlns="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wsse="http://schemas.xmlsoap.org/ws/2003/06/secext" xmlns:saml="urn:oasis:names:tc:SAML:1.0:assertion" xmlns:wsp="http://schemas.xmlsoap.org/ws/2002/12/policy" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/03/addressing" xmlns:wssc="http://schemas.xmlsoap.org/ws/2004/04/sc" xmlns:wst="http://schemas.xmlsoap.org/ws/2004/04/trust">
24
<ps:AuthInfo xmlns:ps="http://schemas.microsoft.com/Passport/SoapServices/PPCRL" Id="PPAuthInfo">
25
<ps:HostingApp>{7108E71A-9926-4FCB-BCC9-9A9D3F32E423}</ps:HostingApp>
26
<ps:BinaryVersion>4</ps:BinaryVersion>
27
<ps:UIVersion>1</ps:UIVersion>
28
<ps:Cookies></ps:Cookies>
29
<ps:RequestParams>AQAAAAIAAABsYwQAAAAzMDg0</ps:RequestParams>
32
<wsse:UsernameToken Id="user">
33
<wsse:Username>%s</wsse:Username>
34
<wsse:Password>%s</wsse:Password>
39
<ps:RequestMultipleSecurityTokens xmlns:ps="http://schemas.microsoft.com/Passport/SoapServices/PPCRL" Id="RSTS">
40
<wst:RequestSecurityToken Id="RST0">
41
<wst:RequestType>http://schemas.xmlsoap.org/ws/2004/04/security/trust/Issue</wst:RequestType>
43
<wsa:EndpointReference>
44
<wsa:Address>http://Passport.NET/tb</wsa:Address>
45
</wsa:EndpointReference>
47
</wst:RequestSecurityToken>
48
<wst:RequestSecurityToken Id="RST1">
49
<wst:RequestType>http://schemas.xmlsoap.org/ws/2004/04/security/trust/Issue</wst:RequestType>
51
<wsa:EndpointReference>
52
<wsa:Address>messenger.msn.com</wsa:Address>
53
</wsa:EndpointReference>
55
<wsse:PolicyReference URI="?%s"></wsse:PolicyReference>
56
</wst:RequestSecurityToken>
57
</ps:RequestMultipleSecurityTokens>
61
membershipList = '''<?xml version='1.0' encoding='utf-8'?>
62
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
63
<soap:Header xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
64
<ABApplicationHeader xmlns="http://www.msn.com/webservices/AddressBook">
65
<ApplicationId xmlns="http://www.msn.com/webservices/AddressBook">09607671-1C32-421F-A6A6-CBFAA51AB5F4</ApplicationId>
66
<IsMigration xmlns="http://www.msn.com/webservices/AddressBook">false</IsMigration>
67
<PartnerScenario xmlns="http://www.msn.com/webservices/AddressBook">Initial</PartnerScenario>
68
</ABApplicationHeader>
69
<ABAuthHeader xmlns="http://www.msn.com/webservices/AddressBook">
70
<ManagedGroupRequest xmlns="http://www.msn.com/webservices/AddressBook">false</ManagedGroupRequest>
73
<soap:Body xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
74
<FindMembership xmlns="http://www.msn.com/webservices/AddressBook">
75
<serviceFilter xmlns="http://www.msn.com/webservices/AddressBook">
76
<Types xmlns="http://www.msn.com/webservices/AddressBook">
77
<ServiceType xmlns="http://www.msn.com/webservices/AddressBook">Messenger</ServiceType>
78
<ServiceType xmlns="http://www.msn.com/webservices/AddressBook">Invitation</ServiceType>
79
<ServiceType xmlns="http://www.msn.com/webservices/AddressBook">SocialNetwork</ServiceType>
80
<ServiceType xmlns="http://www.msn.com/webservices/AddressBook">Space</ServiceType>
81
<ServiceType xmlns="http://www.msn.com/webservices/AddressBook">Profile</ServiceType>
84
<View xmlns="http://www.msn.com/webservices/AddressBook">Full</View>
87
</soap:Envelope>\r\n'''
89
addressBook = '''<?xml version="1.0" encoding="utf-8"?>
90
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
92
<ABApplicationHeader xmlns="http://www.msn.com/webservices/AddressBook">
93
<ApplicationId>09607671-1C32-421F-A6A6-CBFAA51AB5F4</ApplicationId>
94
<IsMigration>false</IsMigration>
95
<PartnerScenario>Initial</PartnerScenario>
96
</ABApplicationHeader>
97
<ABAuthHeader xmlns="http://www.msn.com/webservices/AddressBook">
98
<ManagedGroupRequest>false</ManagedGroupRequest>
102
<ABFindAll xmlns="http://www.msn.com/webservices/AddressBook">
103
<abId>00000000-0000-0000-0000-000000000000</abId>
104
<abView>Full</abView>
105
<lastChange>0001-01-01T00:00:00.0000000-08:00</lastChange>
108
</soap:Envelope>\r\n'''
110
dynamicItems = '''<?xml version="1.0" encoding="utf-8"?>
111
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
113
<ABApplicationHeader xmlns="http://www.msn.com/webservices/AddressBook">
114
<ApplicationId>09607671-1C32-421F-A6A6-CBFAA51AB5F4</ApplicationId>
115
<IsMigration>false</IsMigration>
116
<PartnerScenario>Initial</PartnerScenario>
117
</ABApplicationHeader>
118
<ABAuthHeader xmlns="http://www.msn.com/webservices/AddressBook">
119
<ManagedGroupRequest>false</ManagedGroupRequest>
123
<ABFindAll xmlns="http://www.msn.com/webservices/AddressBook">
124
<abId>00000000-0000-0000-0000-000000000000</abId>
125
<abView>Full</abView>
126
<lastChange>0001-01-01T00:00:00.0000000-08:00</lastChange>
127
<dynamicItemView>Gleam</dynamicItemView>
128
<dynamicItemLastChange>0001-01-01T00:00:00.0000000-08:00</dynamicItemLastChange>
131
</soap:Envelope>\r\n'''
133
# the first parameter Should be replaced with the group ID
134
# the secont parameter should specify the member by contactId
135
# POST /abservice/abservice.asmx HTTP/1.1
136
# SOAPAction: http://www.msn.com/webservices/AddressBook/ABGroupContactAdd
137
# Host: omega.contacts.msn.com
139
oldaddUserToGroup = '''<?xml version="1.0" encoding="utf-8"?>
140
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
141
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
142
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
143
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">'
145
<ABApplicationHeader xmlns="http://www.msn.com/webservices/AddressBook">
146
<ApplicationId>09607671-1C32-421F-A6A6-CBFAA51AB5F4</ApplicationId>
147
<IsMigration>false</IsMigration>
148
<PartnerScenario>Timer</PartnerScenario>
149
</ABApplicationHeader>
150
<ABAuthHeader xmlns="http://www.msn.com/webservices/AddressBook">
151
<ManagedGroupRequest>false</ManagedGroupRequest>
155
<ABGroupContactAdd xmlns="http://www.msn.com/webservices/AddressBook">
156
<abId>00000000-0000-0000-0000-000000000000</abId>
164
<contactId>%s</contactId>
169
</soap:Envelope>\r\n'''
171
moveUserToGroup = '''<?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"><soap:Header><ABApplicationHeader xmlns="http://www.msn.com/webservices/AddressBook"><ApplicationId>09607671-1C32-421F-A6A6-CBFAA51AB5F4</ApplicationId><IsMigration>false</IsMigration><PartnerScenario>Timer</PartnerScenario></ABApplicationHeader><ABAuthHeader xmlns="http://www.msn.com/webservices/AddressBook"><ManagedGroupRequest>false</ManagedGroupRequest></ABAuthHeader></soap:Header><soap:Body><ABGroupContactAdd xmlns="http://www.msn.com/webservices/AddressBook"><abId>00000000-0000-0000-0000-000000000000</abId><groupFilter><groupIds><guid>%s</guid></groupIds></groupFilter><contacts><Contact><contactId>%s</contactId></Contact></contacts></ABGroupContactAdd></soap:Body></soap:Envelope>'''
174
deleteUserFromGroup = '''<?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"><soap:Header><ABApplicationHeader xmlns="http://www.msn.com/webservices/AddressBook"><ApplicationId>09607671-1C32-421F-A6A6-CBFAA51AB5F4</ApplicationId><IsMigration>false</IsMigration><PartnerScenario>Timer</PartnerScenario></ABApplicationHeader><ABAuthHeader xmlns="http://www.msn.com/webservices/AddressBook"><ManagedGroupRequest>false</ManagedGroupRequest></ABAuthHeader></soap:Header><soap:Body><ABGroupContactDelete xmlns="http://www.msn.com/webservices/AddressBook"><abId>00000000-0000-0000-0000-000000000000</abId><contacts><Contact><contactId>%s</contactId></Contact></contacts><groupFilter><groupIds><guid>%s</guid></groupIds></groupFilter></ABGroupContactDelete></soap:Body></soap:Envelope>'''
176
addUserToGroup = '''<?xml version="1.0" ?>
177
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
179
<ABApplicationHeader xmlns="http://www.msn.com/webservices/AddressBook">
181
09607671-1C32-421F-A6A6-CBFAA51AB5F4
189
</ABApplicationHeader>
190
<ABAuthHeader xmlns="http://www.msn.com/webservices/AddressBook">
191
<ManagedGroupRequest>
193
</ManagedGroupRequest>
197
<ABGroupContactAdd xmlns="http://www.msn.com/webservices/AddressBook">
199
00000000-0000-0000-0000-000000000000
207
<Contact xmlns="http://www.msn.com/webservices/AddressBook">
209
<passportName>%s</passportName>
210
<isSmtp>false</isSmtp>
211
<isMessengerUser>true</isMessengerUser>
215
<groupContactAddOptions>
216
<fGenerateMissingQuickName>
218
</fGenerateMissingQuickName>
219
</groupContactAddOptions>
224
changeNick='''<?xml version="1.0" encoding="utf-8"?>
225
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
228
<ABApplicationHeader xmlns="http://www.msn.com/webservices/AddressBook">
229
<ApplicationId>09607671-1C32-421F-A6A6-CBFAA51AB5F4</ApplicationId>
230
<IsMigration>false</IsMigration>
231
<PartnerScenario>Timer</PartnerScenario>
232
</ABApplicationHeader>
233
<ABAuthHeader xmlns="http://www.msn.com/webservices/AddressBook">
234
<ManagedGroupRequest>false</ManagedGroupRequest>
239
<ABContactUpdate xmlns="http://www.msn.com/webservices/AddressBook">
240
<abId>00000000-0000-0000-0000-000000000000</abId>
242
<Contact xmlns="http://www.msn.com/webservices/AddressBook">
244
<contactType>%s</contactType>
245
<displayName>%s</displayName>
247
<propertiesChanged>DisplayName</propertiesChanged>
252
</soap:Envelope>\r\n'''
255
renameContact = '<?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"><soap:Header><ABApplicationHeader xmlns="http://www.msn.com/webservices/AddressBook"><ApplicationId>09607671-1C32-421F-A6A6-CBFAA51AB5F4</ApplicationId><IsMigration>false</IsMigration><PartnerScenario>Timer</PartnerScenario></ABApplicationHeader><ABAuthHeader xmlns="http://www.msn.com/webservices/AddressBook"><ManagedGroupRequest>false</ManagedGroupRequest></ABAuthHeader></soap:Header><soap:Body><ABContactUpdate xmlns="http://www.msn.com/webservices/AddressBook"><abId>00000000-0000-0000-0000-000000000000</abId><contacts><Contact xmlns="http://www.msn.com/webservices/AddressBook"><contactId>%s</contactId><contactInfo><annotations><Annotation><Name>AB.NickName</Name><Value>%s</Value></Annotation></annotations></contactInfo><propertiesChanged>Annotation </propertiesChanged></Contact></contacts></ABContactUpdate></soap:Body></soap:Envelope>'
257
# the first %s is Allow or Block, the second is the passport mail
258
# POST /abservice/SharingService.asmx HTTP/1.1
259
# SOAPAction: http://www.msn.com/webservices/AddressBook/AddMember
260
# Host: omega.contacts.msn.com
261
addMember='''<?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"><soap:Header><ABApplicationHeader xmlns="http://www.msn.com/webservices/AddressBook"><ApplicationId>09607671-1C32-421F-A6A6-CBFAA51AB5F4</ApplicationId><IsMigration>false</IsMigration><PartnerScenario>%s</PartnerScenario></ABApplicationHeader><ABAuthHeader xmlns="http://www.msn.com/webservices/AddressBook"><ManagedGroupRequest>false</ManagedGroupRequest></ABAuthHeader></soap:Header><soap:Body><AddMember xmlns="http://www.msn.com/webservices/AddressBook"><serviceHandle><Id>0</Id><Type>Messenger</Type><ForeignId></ForeignId></serviceHandle><memberships><Membership><MemberRole>%s</MemberRole><Members><Member xsi:type="PassportMember" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><Type>Passport</Type><State>Accepted</State><PassportName>%s</PassportName></Member></Members></Membership></memberships></AddMember></soap:Body></soap:Envelope>'''
263
contactAdd = '''<?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"><soap:Header><ABApplicationHeader xmlns="http://www.msn.com/webservices/AddressBook"><ApplicationId>09607671-1C32-421F-A6A6-CBFAA51AB5F4</ApplicationId><IsMigration>false</IsMigration><PartnerScenario>ContactSave</PartnerScenario></ABApplicationHeader><ABAuthHeader xmlns="http://www.msn.com/webservices/AddressBook"><ManagedGroupRequest>false</ManagedGroupRequest></ABAuthHeader></soap:Header><soap:Body><ABContactAdd xmlns="http://www.msn.com/webservices/AddressBook"><abId>00000000-0000-0000-0000-000000000000</abId><contacts><Contact xmlns="http://www.msn.com/webservices/AddressBook"><contactInfo><passportName>%s</passportName><isMessengerUser>true</isMessengerUser></contactInfo></Contact></contacts><options><EnableAllowListManagement>true</EnableAllowListManagement></options></ABContactAdd></soap:Body></soap:Envelope>'''
264
contactRemove = '''<?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"><soap:Header><ABApplicationHeader xmlns="http://www.msn.com/webservices/AddressBook"><ApplicationId>09607671-1C32-421F-A6A6-CBFAA51AB5F4</ApplicationId><IsMigration>false</IsMigration><PartnerScenario>Timer</PartnerScenario></ABApplicationHeader><ABAuthHeader xmlns="http://www.msn.com/webservices/AddressBook"><ManagedGroupRequest>false</ManagedGroupRequest></ABAuthHeader></soap:Header><soap:Body><ABContactDelete xmlns="http://www.msn.com/webservices/AddressBook"><abId>00000000-0000-0000-0000-000000000000</abId><contacts><Contact><contactId>%s</contactId></Contact></contacts></ABContactDelete></soap:Body></soap:Envelope>'''
266
# the first %s is Allow or Block, the second is the passport mail
267
# POST /abservice/SharingService.asmx HTTP/1.1
268
# SOAPAction: http://www.msn.com/webservices/AddressBook/DeleteMember
269
# Host: omega.contacts.msn.com
270
deleteMember='''<?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"><soap:Header><ABApplicationHeader xmlns="http://www.msn.com/webservices/AddressBook"><ApplicationId>09607671-1C32-421F-A6A6-CBFAA51AB5F4</ApplicationId><IsMigration>false</IsMigration><PartnerScenario>%s</PartnerScenario></ABApplicationHeader><ABAuthHeader xmlns="http://www.msn.com/webservices/AddressBook"><ManagedGroupRequest>false</ManagedGroupRequest></ABAuthHeader></soap:Header><soap:Body><DeleteMember xmlns="http://www.msn.com/webservices/AddressBook"><serviceHandle><Id>0</Id><Type>Messenger</Type><ForeignId></ForeignId></serviceHandle><memberships><Membership><MemberRole>%s</MemberRole><Members><Member xsi:type="PassportMember" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><Type>Passport</Type><State>Accepted</State><PassportName>%s</PassportName></Member></Members></Membership></memberships></DeleteMember></soap:Body></soap:Envelope>'''
272
# %s is the group name
273
# POST /abservice/abservice.asmx HTTP/1.1
274
# SOAPAction: http://www.msn.com/webservices/AddressBook/ABGroupAdd
275
# Host: by6.omega.contacts.msn.com
277
addGroup='''<?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"><soap:Header><ABApplicationHeader xmlns="http://www.msn.com/webservices/AddressBook"><ApplicationId>09607671-1C32-421F-A6A6-CBFAA51AB5F4</ApplicationId><IsMigration>false</IsMigration><PartnerScenario>Timer</PartnerScenario></ABApplicationHeader><ABAuthHeader xmlns="http://www.msn.com/webservices/AddressBook"><ManagedGroupRequest>false</ManagedGroupRequest></ABAuthHeader></soap:Header><soap:Body><ABGroupAdd xmlns="http://www.msn.com/webservices/AddressBook"><abId>00000000-0000-0000-0000-000000000000</abId><groupAddOptions><fRenameOnMsgrConflict>false</fRenameOnMsgrConflict></groupAddOptions><groupInfo><GroupInfo><name>%s</name><groupType>C8529CE2-6EAD-434d-881F-341E17DB3FF8</groupType><fMessenger>false</fMessenger><annotations><Annotation><Name>MSN.IM.Display</Name><Value>1</Value></Annotation></annotations></GroupInfo></groupInfo></ABGroupAdd></soap:Body></soap:Envelope>'''
281
# POST /abservice/abservice.asmx HTTP/1.1
282
# SOAPAction: http://www.msn.com/webservices/AddressBook/ABGroupDelete
283
# Host: by6.omega.contacts.msn.com
285
deleteGroup='''<?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"><soap:Header><ABApplicationHeader xmlns="http://www.msn.com/webservices/AddressBook"><ApplicationId>09607671-1C32-421F-A6A6-CBFAA51AB5F4</ApplicationId><IsMigration>false</IsMigration><PartnerScenario>Timer</PartnerScenario></ABApplicationHeader><ABAuthHeader xmlns="http://www.msn.com/webservices/AddressBook"><ManagedGroupRequest>false</ManagedGroupRequest></ABAuthHeader></soap:Header><soap:Body><ABGroupDelete xmlns="http://www.msn.com/webservices/AddressBook"><abId>00000000-0000-0000-0000-000000000000</abId><groupFilter><groupIds><guid>%s</guid></groupIds></groupFilter></ABGroupDelete></soap:Body></soap:Envelope>'''
288
# POST abservice/abservice.asmx HTTP/1.1
289
# SOAPAction: http://www.msn.com/webservices/AddressBook/ABGroupUpdate
290
# Host: omega.contacts.msn.com/
292
renameGroup='''<?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"><soap:Header><ABApplicationHeader xmlns="http://www.msn.com/webservices/AddressBook"><ApplicationId>09607671-1C32-421F-A6A6-CBFAA51AB5F4</ApplicationId><IsMigration>false</IsMigration><PartnerScenario>Timer</PartnerScenario></ABApplicationHeader><ABAuthHeader xmlns="http://www.msn.com/webservices/AddressBook"><ManagedGroupRequest>false</ManagedGroupRequest></ABAuthHeader></soap:Header><soap:Body><ABGroupUpdate xmlns="http://www.msn.com/webservices/AddressBook"><abId>00000000-0000-0000-0000-000000000000</abId><groups><Group><groupId>%s</groupId><groupInfo><name>%s</name></groupInfo><propertiesChanged>GroupName </propertiesChanged></Group></groups></ABGroupUpdate></soap:Body></soap:Envelope>'''
296
# memberName,friendlyName,ver,buildVer,to,passport,appid,lockKey,seqNum,runId,content,
297
send_message = '''<?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="$memberName" friendlyName="$friendlyName" xml:lang="en-US" proxy="MSNMSGR" xmlns="http://messenger.msn.com/ws/2004/09/oim/" msnpVer="$ver" buildVer="$buildVer"/><To memberName="$to" xmlns="http://messenger.msn.com/ws/2004/09/oim/"/><Ticket passport="$passport" appid="$appid" lockkey="$lockKey" xmlns="http://messenger.msn.com/ws/2004/09/oim/"/><Sequence xmlns="http://schemas.xmlsoap.org/ws/2003/03/rm"><Identifier xmlns="http://schemas.xmlsoap.org/ws/2002/07/utility">http://messenger.msn.com</Identifier><MessageNumber>$seqNum</MessageNumber></Sequence></soap:Header><soap:Body><MessageType xmlns="http://messenger.msn.com/ws/2004/09/oim/">text</MessageType><Content xmlns="http://messenger.msn.com/ws/2004/09/oim/">MIME-Version: 1.0\r\nContent-Type: text/plain; charset=UTF-8\r\nContent-Transfer-Encoding: base64\r\nX-OIM-Message-Type: OfflineMessage\r\nX-OIM-Run-Id: {$runId}\r\nX-OIM-Sequence-Num: $seqNum\r\n\r\n$content</Content></soap:Body></soap:Envelope>'''
300
retreive_message = '''<?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><PassportCookie xmlns="http://www.hotmail.msn.com/ws/2004/09/oim/rsi"><t>$t</t><p>$p</p></PassportCookie></soap:Header><soap:Body><GetMessage xmlns="http://www.hotmail.msn.com/ws/2004/09/oim/rsi"><messageId>$mid</messageId><alsoMarkAsRead>false</alsoMarkAsRead></GetMessage></soap:Body></soap:Envelope>'''
303
delete_message = '''<?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><PassportCookie xmlns="http://www.hotmail.msn.com/ws/2004/09/oim/rsi"><t>$t</t><p>$p</p></PassportCookie></soap:Header><soap:Body><DeleteMessages xmlns="http://www.hotmail.msn.com/ws/2004/09/oim/rsi"><messageIds><messageId>$mid</messageId></messageIds></DeleteMessages></soap:Body></soap:Envelope>'''
305
#POST /contactcard/contactcardservice.asmx HTTP/1.1
307
#SOAPAction: "http://www.msn.com/webservices/spaces/v1/GetXmlFeed"
308
#Content-Type: text/xml; charset=utf-8
309
#Content-Length: 2117
310
#User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 2.0.50727; Windows Live Messenger 8.1.0178)
311
#Host: cid-580B3F2402D4CDA4.cc.services.spaces.live.com
312
#Connection: Keep-Alive
313
#Cache-Control: no-cache
314
#Cookie: sc_stgclstbl_107=NzcwNTc1NjNjNDQyN2Q5NTE6d092QXNtdnJpUEJSeUxMNDNYTGRQQUViYzg5ZFFQUjJZRDdZWExVQm9XSmIvRlVkVGdURzJGRkI4dXM1QVFiVWdmMXBxTVBPREpIWFJEeXNlbTd5YWo0a3B4dEFqS0J3WERxcjZnWG8vZ3JCSkpqTms4cFN5VVJFNlk3d1RCU1hodnd1eGtmNDFPUWtVT01mYVg2NnJjWmd5NHBKK0hURlJiaUFnNTBBYjFBVm52T3hTeldRUVdJRkRxOEp4N1RDQThNeGN5T080VVJialFzTXVXdEdqYUxyN1B1UjRtTGZveDRRbDBHMXdlektkL0xuYzRQTytBPT0=; sc_identity_107=NGIyNzk5NWRlM2JkYTllODE6alJIOThQVU81Q0ZKOUlaMmkzekh0RjBLeUdkLzVJMnk0OExKeXBkdFBJVGpHNFZHUFR4aHZwemVrRkhrVGFlVkFUaURjRFZJQzErK0VKdlY4Q29qV2tuQ0kwSTFFME1mQnNHMVlPaUhDZ0k9; MUID=3A2C3E4B415C4C838835C3E5C8F46A38; ANON=A=307459359A8E113A91ADF680FFFFFFFF&E=5b8&W=6; NAP=V=1.5&E=55e&C=-8KnBX0ub9dkbKx1pzYK5iyQ3m0FIWFPCTZ-V_Pt7tS8Nan1ZV2Dxg&W=6
316
#t,p,cid,storageAuthCache,market
317
space='''<?xml version="1.0" ?>
318
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
320
<AuthTokenHeader xmlns="http://www.msn.com/webservices/spaces/v1/">
327
<GetXmlFeed xmlns="http://www.msn.com/webservices/spaces/v1/">
329
<cid xmlns="http://www.msn.com/webservices/spaces/v1/">
335
<market xmlns="http://www.msn.com/webservices/spaces/v1/">
339
<maxElementCount xmlns="http://www.msn.com/webservices/spaces/v1/">
342
<maxCharacterCount xmlns="http://www.msn.com/webservices/spaces/v1/">
345
<maxImageCount xmlns="http://www.msn.com/webservices/spaces/v1/">
353
</updateAccessedTime>
355
1753-01-01T00:00:00.0000000-00:00
358
1753-01-01T00:00:00.0000000-00:00
360
<contactProfileLastViewed>
361
1753-01-01T00:00:00.0000000-00:00
362
</contactProfileLastViewed>
366
</refreshInformation>
371
#url "http://storage.msn.com/storageservice/schematizedstore.asmx"
372
#action "http://www.msn.com/webservices/storage/w10/GetItemVersion"
375
schematizedStore = '''<?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><StorageApplicationHeader xmlns="http://www.msn.com/webservices/storage/w10"><ApplicationID>Messenger Client 7.0</ApplicationID></StorageApplicationHeader><StorageUserHeader xmlns="http://www.msn.com/webservices/storage/w10"><Puid>0</Puid><UserAuthCache></UserAuthCache><IPAddress/></StorageUserHeader></soap:Header><soap:Body><GetItemVersion xmlns="http://www.msn.com/webservices/storage/w10"><spaceVersionRequests>
376
<SpaceVersionRequest><SpaceHandle><RelationshipName>MySpace</RelationshipName><Alias><NameSpace>MyStuff</NameSpace><Name>%s</Name></Alias></SpaceHandle><LastModifiedDate>2004-01-01T00:00:00.0000000-08:00</LastModifiedDate></SpaceVersionRequest></spaceVersionRequests><spaceRequestFilter><SpaceFilterAttributes>Annotation</SpaceFilterAttributes><FilterValue>1</FilterValue></spaceRequestFilter></GetItemVersion></soap:Body></soap:Envelope>'''
379
getMailData = '''<?xml version="1.0" encoding="utf-8"?>
380
<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/">
382
<PassportCookie xmlns="http://www.hotmail.msn.com/ws/2004/09/oim/rsi">
388
<GetMetadata xmlns="http://www.hotmail.msn.com/ws/2004/09/oim/rsi" />