Kyl*_*ndt 11
非 SSL jabber 的主要默认端口是 5222。您可以使用 telnet 向其吐出一些 xml 并查看是否收到 XML 响应:
telnet suspectedServer 5222
<?xml version="1.0"?> <stream:stream to="foo.com" xmlns="jabber:client" xmlns:stream="http://etherx.jabber.org/streams" version="1.0">
Run Code Online (Sandbox Code Playgroud)
这当然可以为多个服务器和多个端口编写脚本,使用 nc (netcat) 编写脚本可能更容易。
对于需要 TLS 连接的 XMPP 服务器,请使用以下命令进行测试:-
openssl s_client -starttls xmpp -connect suspectedserver:5222
Run Code Online (Sandbox Code Playgroud)