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>

  

posted on 2017-03-30 22:31  丨丿丶  阅读(720)  评论(0编辑  收藏  举报