阅读联机帮助页我认为应该可以以十六进制打印传入的字符。但它没有用。你知道我做错了什么吗?
这是相关的联机帮助页描述:
debug enable Debugging
netdata enable printing of hexadecimal network data (debugging)
prettydump enable output of "netdata" to user readable format (debugging)
options enable viewing of options processing (debugging)
termdata enable (debugging) toggle printing of hexadecimal terminal data
Run Code Online (Sandbox Code Playgroud)
这是 telnet 会话,您可以看到只打印了 ASCII 字符:
telnet> set netdata
Will print hexadecimal representation of network traffic.
telnet> set termdata
Will print hexadecimal representation of terminal traffic.
telnet> set debug
Will turn on socket level debugging.
telnet> open 192.168.128.121 4015
Trying 192.168.128.121...
Connected to 192.168.128.121.
Escape character is '^]'.
?@?±?@?¦?@?¦?@?±?@?¦?@?±?@?¦^]
Run Code Online (Sandbox Code Playgroud)
小智 6
这在我必须处理的 CentOS 系统上按预期工作
telnet> set termdata
Will print hexadecimal representation of terminal traffic.
telnet> open localhost 22
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
SSH-2.0-OpenSSH_5.3
> 0x0 5353482d322e302d4f70656e5353485f352e330a
Run Code Online (Sandbox Code Playgroud)
在 Ubuntu 系统上我得到和你一样的结果。
set termdata
Will print hexadecimal representation of terminal traffic.
telnet> open localhost 22
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
SSH-2.0-OpenSSH_5.9p1 Debian-5ubuntu1
Run Code Online (Sandbox Code Playgroud)
这可能是一个错误。
小智 5
伊恩是对的,追踪是有问题的。请参阅 ubuntu 包“telnet”中的 README.telnet。
然而,一个简单的解决方法是卸载“telnet”并安装“inetutils-telnet”,它可以按预期工作
归档时间: |
|
查看次数: |
4819 次 |
最近记录: |