博客
关于我
TCP端口测试简法
阅读量:597 次
发布时间:2019-03-12

本文共 1573 字,大约阅读时间需要 5 分钟。

  1. telnet法
TCP端口开了$ echo "" | telnet 123.1.2.3 8100Trying 123.1.2.3...Connected to 123.1.2.3.Escape character is '^]'.Connection closed by foreign host.TCP端口关了$ echo "" | telnet 123.1.2.3 8101Trying 123.1.2.3...telnet: connect to address 123.1.2.3: Connection refused

如果希望带源地址测试,可以

telnet -b source_ip destanation_ip port
  1. nc法
TCP端口开了$ nc -nzv 123.1.2.3 7205       Ncat: Version 7.50 ( https://nmap.org/ncat )Ncat: Connected to 123.1.2.3:7205.Ncat: 0 bytes sent, 0 bytes received in 0.03 seconds.TCP端口关了$ nc -nzv 123.1.2.3 7206Ncat: Version 7.50 ( https://nmap.org/ncat )Ncat: Connection timed out.

如果希望带源地址测试,可以

nc -s source_ip -zv destanation_ip port
  1. nmap法
TCP端口开了$ nmap -Pn -sT 123.1.2.3 -p 8100Starting Nmap 6.40 ( http://nmap.org ) at 2019-09-29 12:12 CSTNmap scan report for nothing.attdns.com (123.1.2.3)Host is up (0.0067s latency).PORT     STATE SERVICE8100/tcp open  xprint-serverNmap done: 1 IP address (1 host up) scanned in 0.07 secondsTCP端口关了$ nmap -Pn -sT 123.1.2.3 -p 8101Starting Nmap 6.40 ( http://nmap.org ) at 2019-09-29 12:12 CSTNmap scan report for nothing.attdns.com (123.1.2.3)Host is up.PORT     STATE    SERVICE8101/tcp filtered unknownNmap done: 1 IP address (1 host up) scanned in 2.08 secondsTCP端口开了啥$ nmap -Pn -sT 123.1.2.3 -p 8000-8300Starting Nmap 6.40 ( http://nmap.org ) at 2019-09-29 12:11 CSTNmap scan report for nothing.attdns.com (123.1.2.3)Host is up (0.0083s latency).Not shown: 299 filtered portsPORT     STATE SERVICE8081/tcp open  blackice-icecap8100/tcp open  xprint-serverNmap done: 1 IP address (1 host up) scanned in 10.00 seconds

转载地址:http://ssjxz.baihongyu.com/

你可能感兴趣的文章
Mysql 自定义函数
查看>>
mysql 行转列 列转行
查看>>
Mysql 表分区
查看>>
mysql 表的操作
查看>>
mysql 视图,视图更新删除
查看>>
MySQL 触发器
查看>>
mysql 让所有IP访问数据库
查看>>
mysql 记录的增删改查
查看>>
MySQL 设置数据库的隔离级别
查看>>
MySQL 证明为什么用limit时,offset很大会影响性能
查看>>
Mysql 语句操作索引SQL语句
查看>>
MySQL 误操作后数据恢复(update,delete忘加where条件)
查看>>
MySQL 调优/优化的 101 个建议!
查看>>
mysql 转义字符用法_MySql 转义字符的使用说明
查看>>
mysql 输入密码秒退
查看>>
mysql 递归查找父节点_MySQL递归查询树状表的子节点、父节点具体实现
查看>>
mysql 通过查看mysql 配置参数、状态来优化你的mysql
查看>>
mysql 里对root及普通用户赋权及更改密码的一些命令
查看>>
Mysql 重置自增列的开始序号
查看>>
mysql 锁机制 mvcc_Mysql性能优化-事务、锁和MVCC
查看>>