XMPP之登录报文

刚把登录报文抓了分析,有很多报文,所以写了一小点报文

三次握手
C:
<stream:stream to="10.10.122.162" xmlns="jabber:client" xmlns:stream="http://etherx.jabber.org/streams" version="1.0"> S:
<stream:stream xmlns:stream="http://etherx.jabber.org/streams" xmlns="jabber:client" from="user-20160421db" id="2sc9b4del1" xml:lang="en" version="1.0"> C:TCP S:
<stream:features><mechanisms xmlns="urn:ietf:params:xml:ns:xmpp-sasl">
  <mechanism>PLAIN</mechanism>
  <mechanism>ANONYMOUS</mechanism>
  <mechanism>SCRAM-SHA-1</mechanism>
  <mechanism>CRAM-MD5</mechanism>
  <mechanism>DIGEST-MD5</mechanism>
  </mechanisms>
  <compression xmlns="http://jabber.org/features/compress">
    <method>zlib</method>
  </compression>
  <auth xmlns="http://jabber.org/features/iq-auth"/>
  <register xmlns="http://jabber.org/features/iq-register"/>
</stream:features> C:<auth mechanism="DIGEST-MD5" xmlns="urn:ietf:params:xml:ns:xmpp-sasl"></auth> S:
<challenge xmlns="urn:ietf:params:xml:ns:xmpp-sasl">
  cmVhbG09InVzZXItMjAxNjA0MjFkYiIsbm9uY2U9IitQVHd6WlBFZENQendvVVE1SXJxK2FHdDhZQm1VUnJrZm9WdVpZaWMiLHFvcD0iYXV0aCIsY2hhcnNldD11dGYtOCxhbGdvcml0aG09bWQ1LXNlc3M=
</challenge> C:
<response xmlns="urn:ietf:params:xml:ns:xmpp-sasl">
    Y2hhcnNldD11dGYtOCx1c2VybmFtZT0ienhsMiIscmVhbG09InVzZXItMjAxNjA0MjFkYiIsbm9uY2U9IitQVHd6WlBFZENQendvVVE1SXJxK2FHdDhZQm1VUnJrZm9WdVpZaWMiLG5jPTAwMDAwMDAxLGNub2  5jZT0iaWk4bVBhczBFeFRUSjdRbWppdUNIQnpISnRLL0NKR0VoeG5wQVpiVCIsZGlnZXN0LXVyaT0ieG1wcC91c2VyLTIwMTYwNDIxZGIiLG1heGJ1Zj02NTUzNixyZXNwb25zZT05OGE0YWI0YTgwZGRkYzMzYTJ  kMGJkOWE0NDRlY2ZjOSxxb3A9YXV0aCxhdXRoemlkPSJ6eGwyIg==
</response> S:
<success xmlns="urn:ietf:params:xml:ns:xmpp-sasl">
  cnNwYXV0aD0xZTQwYTI3MjMxNWMwNjNhNzE1NjJjOGFkNzMyZTU4Yg==
</success> C:
<stream:stream to="user-20160421db" xmlns="jabber:client" xmlns:stream="http://etherx.jabber.org/streams" version="1.0"> S:
<stream:stream xmlns:stream="http://etherx.jabber.org/streams" xmlns="jabber:client" from="user-20160421db" id="2sc9b4del1" xml:lang="en" version="1.0"> C:
<iq id="M6Im9-0" type="set">
  <bind xmlns="urn:ietf:params:xml:ns:xmpp-bind">
    <resource>Spark</resource>
  </bind>
</iq> S:
<iq type="result" id="M6Im9-0" to="user-20160421db/2sc9b4del1">
  <bind xmlns="urn:ietf:params:xml:ns:xmpp-bind">
    <jid>zxl2@user-20160421db/Spark</jid>
  </bind>
</iq> C:
<iq id="M6Im9-1" type="set">
  <session xmlns="urn:ietf:params:xml:ns:xmpp-session"/>
</iq> S:
<iq type="result" id="M6Im9-1" to="zxl2@user-20160421db/Spark"/> C:
<iq id="M6Im9-2" type="get">
  <query xmlns="jabber:iq:roster"></query>
</iq> S:
<iq type="result" id="M6Im9-2" to="zxl2@user-20160421db/Spark">
  <query xmlns="jabber:iq:roster"/>
</iq> C:
<iq id="M6Im9-3" to="user-20160421db" type="get">
  <query xmlns="http://jabber.org/protocol/disco#items"></query>
</iq> S:
<iq type="result" id="M6Im9-3" from="user-20160421db" to="zxl2@user-20160421db/Spark">
  <query xmlns="http://jabber.org/protocol/disco#items">
    <item jid="conference.user-20160421db" name=""/>
    <item jid="pubsub.user-20160421db" name="Publish-Subscribe service"/>
    <item jid="search.user-20160421db" name="User Search"/>
  </query>
</iq> C:TCP C:
<iq id="M6Im9-4" type="get">
  <sharedgroup xmlns="http://www.jivesoftware.org/protocol/sharedgroup"></sharedgroup>
</iq> S:
<iq type="result" id="M6Im9-4" to="zxl2@user-20160421db/Spark">
  <sharedgroup xmlns="http://www.jivesoftware.org/protocol/sharedgroup"/>
</iq> C:
<iq id="M6Im9-5" from="zxl2@user-20160421db/Spark" type="get">
  <vCard xmlns='vcard-temp'/>
</iq> S:
<iq id="M6Im9-5" from="zxl2@user-20160421db/Spark" type="get"><vCard xmlns='vcard-temp'/></iq>

  

转载于:https://www.cnblogs.com/xiaolonghome/p/6648980.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值