返回首页

端口扫描

检测公网主机指定 TCP/UDP 端口状态,单次扫描一个端口。

正常 APPLICATION 免费

接口信息

接口地址 https://api3.mhimg.cn/api/Api_network
返回格式 JSON
请求方式 GET
请求示例 https://api3.mhimg.cn/view/api/Api_network?host=cn.bing.com&port=80

请求参数说明

名称必填类型说明
host 是 string 需要扫描的目标主机,可以是公网域名或公网 IP。
port 是 integer 目标端口号,范围 1 到 65535。
protocol 否 string 扫描协议:tcp 或 udp,默认 tcp。

返回参数说明

名称类型说明
ip string 目标主机解析出的公网 IP 地址。
port integer 被扫描的端口号。
port_status string 端口状态:open、closed 或 timeout。UDP 无响应时为 timeout,不代表端口确定关闭。
protocol string 实际扫描协议:tcp 或 udp。
code string 错误码:INVALID_ARGUMENT 或 SCAN_FAILED。错误响应字段。
details object 参数错误详情或错误上下文。错误响应字段。
message string 错误说明。错误响应字段。

返回示例

{
    "ip": "1.2.3.4",
    "port": 80,
    "port_status": "open",
    "protocol": "tcp"
}