接口地址:https://www.myshengong.com/api/openapi.portscanner/isopen
返回格式:JSON
请求方式:POST
请求示例:https://www.myshengong.com/api/openapi.portscanner/isopen?host=目标IP&port=要扫描检测的端口号
接口备注:检测目标禁止127.0.0.1和localhost
请求参数说明:
名称 | 类型 | 必填 | 默认值 | 说明 |
---|
apikey | string | 是 | 无 | 用户中心免费获取APIKEY |
host | string | 是 | 无 | 检测的目标IP,可以是域名,如:www.baidu.com |
port | int | 是 | 无 | 检测端口号,如:3306 |
返回参数说明:
名称 | 类型 | 说明 |
---|
code | 1 | 1成功,0失败 |
msg | string | 返回消息 |
time | string | 返回时间unixtime |
data | object | 返回数据 |
data.target | string | 检测目标 |
data.port | string | 检测端口 |
data.result | string | 带格式化后的结果 |
data.isopen | bool | true=开放,false=关闭 |
返回示例:
{
"code": 1,
"msg": "扫描完成",
"time": "1742795760",
"data": {
"target": "8.8.8.8",
"port": "3306",
"result": "端口关闭",
"isopen": false
}
}