fetion(飞信)http协议-登录【转贴】

本文转自:http://blog.dormforce.net/bluef/category/fetion%E5%BC%80%E5%8F%91%E6%89%8B%E6%9C%AD/

 

 

重新抓了包,就像网上的分析一样,飞信的http协议需要分步骤进行

1. SIPP
2. R fetion.com.cn SIP-C/2.0 (一)
3. SIPP (返回nonce)
4. R fetion.com.cn SIP-C/2.0 (二, 提交 response)
5. SIPP (成功则返回200)

以下为登录截取的数据包.不包括上篇文章 一开始的获取登录信息部分.

pre:获取ssic

GET /ssiportal/SSIAppSignIn.aspx?mobileno=13438038606&pwd=xxxxxx HTTP/1.1
User-Agent: IIC2.0/PC 3.1.0480
Host: nav.fetion.com.cn
Accept: */*

RESPONSE:

HTTP/1.1 200 OK
Date: Wed, 02 Apr 2008 17:00:44 GMT
Server: Microsoft-IIS/6.0
X-Powered-By: ASP.NET
X-AspNet-Version: 2.0.50727
Set-Cookie: ssic=DQgHAAC4LBm5JTVMiw07p410tR5khlW0DUQOohtFXsdm02ytY4z5AKY8kZ/My2AaeNqxeDCyGx0ljWWtZA7kbD+nArEtrCPz6dj5KQLQJ06N6Z5NEQ==; path=/
Cache-Control: private
Content-Type: text/html; charset=utf-8
Content-Length: 198

<?xml version=”1.0″ encoding=”utf-8″ ?><results status-code=”200″><user uri=”sip:[email protected];p=381″ mobile-no=”13438038606″ user-status=”101″><credentials></credentials></user></results>

以下正式登陆:

1.SIPP
POST h**UnReg**.130.44.194/ht/sd.aspx?t=i&i=1 HTTP/1.1
User-Agent: IIC2.0/PC 2.3.0180
Pragma: xz4BBcVc7cb3392-ac94-48f7-9e6c-9cb651f00bb1
Content-Type: application/oct-stream
Host: 221.130.44.194
Cookie: ssic=DQgHAAC4LBm5JTVMiw07p410tR5khlW0DUQOohtFXsdm02ytY4z5AKY8kZ/My2AaeNqxeDCyGx0ljWWtZA7kbD+nArEtrCPz6dj5KQLQJ06N6Z5NEQ==
Content-Length: 4
Proxy-Connection: Keep-Alive

RESPONSE:

SIPP

HTTP/1.1 200 OK
Date: Thu, 03 Apr 2008 09:39:56 GMT
Server: Microsoft-IIS/6.0
X-Powered-By: ASP.NET
X-AspNet-Version: 2.0.50727
Cache-Control: private
Content-Type: application/oct-stream
Content-Length: 4
X-Cache: MISS from localhost.localdomain
Proxy-Connection: close

SIPP

2. R fetion.com.cn SIP-C/2.0 (一)

POST http://221.130.44.194/ht/sd.aspx?t=s&i=2 HTTP/1.1
User-Agent: IIC2.0/PC 2.3.0180
Pragma: xz4BBcVc7cb3392-ac94-48f7-9e6c-9cb651f00bb1
Content-Type: application/oct-stream
Host: 221.130.44.194
Cookie: ssic=DQgHAAC4LBm5JTVMiw07p410tR5khlW0DUQOohtFXsdm02ytY4z5AKY8kZ/My2AaeNqxeDCyGx0ljWWtZA7kbD+nArEtrCPz6dj5KQLQJ06N6Z5NEQ==
Content-Length: 323
Proxy-Connection: Keep-Alive

R fetion.com.cn SIP-C/2.0
F: 586013569
I: 1
Q: 1 R
L: 253

<args><device type=”PC” version=”151″ client-version=”2.3.0180″ /><caps value=”simple-im;im-session;temp-group” /><events value=”contact;permission;system-message” /><user-info attributes=”all” /><presence><basic value=”400″ desc=”" /></presence></args>SIPP

RESPONSE:

HTTP/1.1 200 OK
Date: Thu, 03 Apr 2008 09:40:02 GMT
Server: Microsoft-IIS/6.0
X-Powered-By: ASP.NET
X-AspNet-Version: 2.0.50727
Cache-Control: private
Content-Type: application/oct-stream
Content-Length: 4
X-Cache: MISS from localhost.localdomain
Proxy-Connection: close

SIPP

3. SIPP (返回nonce)

POST http://221.130.44.194/ht/sd.aspx?t=s&i=3 HTTP/1.1
User-Agent: IIC2.0/PC 2.3.0180
Pragma: xz4BBcVc7cb3392-ac94-48f7-9e6c-9cb651f00bb1
Content-Type: application/oct-stream
Host: 221.130.44.194
Cookie: ssic=DQgHAAC4LBm5JTVMiw07p410tR5khlW0DUQOohtFXsdm02ytY4z5AKY8kZ/My2AaeNqxeDCyGx0ljWWtZA7kbD+nArEtrCPz6dj5KQLQJ06N6Z5NEQ==
Content-Length: 4
Proxy-Connection: Keep-Alive

SIPP

RESPONSE:

HTTP/1.1 200 OK
Date: Thu, 03 Apr 2008 09:40:10 GMT
Server: Microsoft-IIS/6.0
X-Powered-By: ASP.NET
X-AspNet-Version: 2.0.50727
Cache-Control: private
Content-Type: application/oct-stream
Content-Length: 131
X-Cache: MISS from localhost.localdomain
Proxy-Connection: close

SIP-C/2.0 401 Unauthorized
I: 1
Q: 1 R
W: Digest algorithm=”MD5-sess;SHA1-sess”,nonce=”192621755903CAB815CC7F032D575B2E”

SIPP

4. R fetion.com.cn SIP-C/2.0 (二, 提交 response)

POST http://221.130.44.194/ht/sd.aspx?t=s&i=4 HTTP/1.1
User-Agent: IIC2.0/PC 2.3.0180
Pragma: xz4BBcVc7cb3392-ac94-48f7-9e6c-9cb651f00bb1
Content-Type: application/oct-stream
Host: 221.130.44.194
Cookie: ssic=DQgHAAC4LBm5JTVMiw07p410tR5khlW0DUQOohtFXsdm02ytY4z5AKY8kZ/My2AaeNqxeDCyGx0ljWWtZA7kbD+nArEtrCPz6dj5KQLQJ06N6Z5NEQ==
Content-Length: 420
Proxy-Connection: Keep-Alive

R fetion.com.cn SIP-C/2.0
F: 586013569
I: 1
Q: 2 R
A: Digest response=”608AD0C973C17EC265C8E1C7E524236B”,cnonce=”7C400D0A6FF876E853D6B2B84299FFD3″
L: 253

<args><device type=”PC” version=”151″ client-version=”2.3.0180″ /><caps value=”simple-im;im-session;temp-group” /><events value=”contact;permission;system-message” /><user-info attributes=”all” /><presence><basic value=”400″ desc=”" /></presence></args>SIPP

RESPONSE:

HTTP/1.1 200 OK
Date: Thu, 03 Apr 2008 09:40:17 GMT
Server: Microsoft-IIS/6.0
X-Powered-By: ASP.NET
X-AspNet-Version: 2.0.50727
Cache-Control: private
Content-Type: application/oct-stream
Content-Length: 4
X-Cache: MISS from localhost.localdomain
Proxy-Connection: close

SIPP

5. SIPP (成功则返回200)

POST http://221.130.44.194/ht/sd.aspx?t=s&i=5 HTTP/1.1
User-Agent: IIC2.0/PC 2.3.0180
Pragma: xz4BBcVc7cb3392-ac94-48f7-9e6c-9cb651f00bb1
Content-Type: application/oct-stream
Host: 221.130.44.194
Cookie: ssic=DQgHAAC4LBm5JTVMiw07p410tR5khlW0DUQOohtFXsdm02ytY4z5AKY8kZ/My2AaeNqxeDCyGx0ljWWtZA7kbD+nArEtrCPz6dj5KQLQJ06N6Z5NEQ==
Content-Length: 4
Proxy-Connection: Keep-Alive

SIPP

RESPONSE:

HTTP/1.1 200 OK
Date: Thu, 03 Apr 2008 09:40:24 GMT
Server: Microsoft-IIS/6.0
X-Powered-By: ASP.NET
X-AspNet-Version: 2.0.50727
Cache-Control: private
Content-Type: application/oct-stream
Content-Length: 1002
X-Cache: MISS from localhost.localdomain
Proxy-Connection: close

SIP-C/2.0 200 OK
I: 1
Q: 2 R
X: 600
L: 948

<results><client public-ip=”222.169.72.238″><custom-config version=”152″>H4sIAAAAAAAEAO29B2AcSZYlJi9tynt/SvVK1+B0oQiAYBMk2JBAEOzBiM3mkuwdaUcjKasqgcplVmVdZhZAzO2dvPfee++999577733ujudTif33/8/XGZkAWz2zkrayZ4hgKrIHz9+fB8/Ih6fVMvLvG6ytqiWr/O2LZYXR49fz6ur51mbN+0XedNkF3lz9KZe54/vRr7gxm+KBX2WLVanBOz6i+bCa9//7vHpss3rN9XrfDnThv4nj4/XbfUqX5XXp8tsUuazo2dZ2VCj3ueu5dlylr872vHayCeP70YH+EVVzV7O66zBAJq2xof/xR/1J/+Xf9Tf/J/9/X/R+PFd/ch81cyL9nd1n94NXjc9FvjD9s9/Pa+WF6+/eG26FbQf3+18/Phk3bTVIq9f1nmTL6cMJ/LZF1mx/G6xnFVX9s3P62q9enL9RTXLMXj/z8dPi2ZVZvY7/0+esy+XZbHMiTxtNm3pj2tD5viX/M7TvM2KsvFbmo/4+y+qOjcfOA7wPyXi9YdB095Utf3z+Cq7/nJ5NitzBeJ94H35RbFcEyse3fcbmA+13etpnefL1xmxQADL//zxl+fnGK32oGMLPwzbfLta183RXqeRfPr4ybqhDp6ty1I60X57HxNtwmG/KVYdusgsvKja4vwacxj8/fhF5f/93Xm+RB/a3cCXj1/kVyq6Ckabdz8m6MEHPfDxbx/f7Y3i/wHUiujwYwQAAA==</custom-config></client><user-info personal-info-version=”12″ contact-version=”56″ permission-version=”10″/><presence result=”200″/></results>SIPP

到这里就算登录成功.后面就可以进行比如获取好友列表,发送信息等操作了.

 

 

--------------------------------------------------------

 

除了发
R fetion.com.cn SIP-C/2.0
F: 565248767
I: 1
Q: 4 R
还要发
S fetion.com.cn SIP-C/2.0/r/n"
F: 111111111
I: 4
Q: 1 S
N: GetContactPermission
L: 1111

<args><permissions all="1" objects="all" /></args>

来维持在线状态。

----------------------------------------------------------

你可能感兴趣的:(Algorithm,c,user,Path,encoding,attributes)