Python中 如何使用telnet 检测端口是否通

import import

tn=telnetlib.Telnet(host,port)
不报异常则该端口是通的,可结合try进行使用im

相关文章
相关标签/搜索