简体   繁体   中英

tcp xmpp malformed packet node.js

I'm trying to recreate an xmpp server for a game that was shutdown years ago but I have an issue with receiving packets.

The first 2 packets I receive are fine but when it gets to the third one it looks malformed, is this normal? If so could I get the payload out of this packet? I'm using the net module in Node.JS

Output:

Received Packet: <?xml version="1.0" ?><stream:stream to="127.0.0.1" xmlns="jabber:client" xmlns:stream="http://etherx.jabber.org/streams" version="1.0" xml:lang="en">

Sent Packet: <stream:stream xmlns='jabber:client' xml:lang='en' xmlns:stream='http://etherx.jabber.org/streams' from='127.0.0.1' id='12345' version='1.0'><stream:features><starttls xmlns='urn:ietf:params:xml:ns:xmpp-tls'/></stream:features>

Received Packet: <starttls xmlns="urn:ietf:params:xml:ns:xmpp-tls"/>

Sent Packet: <proceed xmlns="urn:ietf:params:xml:ns:xmpp-tls"/>

Received Packet: ▬♥☺S☺O♥☺b��u�?�w��∟�s �Gt;/%T�P���m�(985▬‼32/♣♦§↕ ¶♠♥☺§st☻☻F

<proceed/>之后,您的连接正在使用 TLS(参见 RFC 6120 的相关部分),因此您收到的数据是加密的,您显然不会解密。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM