IP高级分析接口
接口说明
IP 高级分析接口用于聚合查询指定 IP 的多维情报信息,包括风险摘要、威胁标签、反向 DNS、IP WHOIS、Quake 资产、TLS 证书、关联样本和公开报告。
请求地址
https://api.f.360.cn/advanced/ip
请求方法
POST
请求参数
| 参数名 | 类型 | 位置 | 必选 | 示例值 | 说明 |
|---|---|---|---|---|---|
value | string | Body | 是 | 172.96.136.31 | 需要查询的 IPv4/IPv6 地址 |
响应参数
基础响应字段
| 参数名 | 类型 | 说明 |
|---|---|---|
code | int | 响应状态码,200 表示成功 |
message | string | 响应消息 |
data.result | object | IP 高级分析结果 |
meta | object / null | 扩展元信息 |
data.result 字段
| 参数名 | 类型 | 说明 |
|---|---|---|
ip | string | 查询的 IP 地址 |
summary | object | IP 风险摘要、归属地和网络画像信息 |
tag_list | list | IP 标签列表;为空时返回空列表 |
rdns | list | 反向 DNS 解析记录列表 |
ip_whois | object | IP WHOIS 信息;无数据时字段值可能为空字符串或 null |
quake | list | Quake IP 资产服务信息,最多返回 20 条 |
cert | list | TLS/SSL 证书列表;无数据时返回空列表 |
samples | list | 关联通信样本摘要,最多返回 10 条 |
reports | list | 关联公开报告列表;无数据时返回空列表 |
summary 字段
| 参数名 | 类型 | 说明 |
|---|---|---|
confidence | string / null | 置信度,例如 unknown |
risk | string / null | 风险等级,例如 unknown、safe、low |
geo_info | object | 地理位置和网络归属摘要,常见字段包含 province、city、country、asn、as、operator |
block_impact | int / float / null | 封禁影响评估数值;例如 -1 表示未知或未评估 |
user_type | string | 用户或资产类型,可能为空字符串 |
threat_type | list | 威胁类型列表;为空时返回空列表 |
anonymous_type | string | 匿名代理类型,可能为空字符串 |
network_type | list | 网络类型列表,例如 Used |
honeypot_hit | bool / null | 是否命中蜜罐 |
rdns 字段
| 参数名 | 类型 | 说明 |
|---|---|---|
time_first | int / string | 首次发现时间,实际返回可能为 Unix 时间戳 |
time_last | int / string | 最近发现时间,实际返回可能为 Unix 时间戳 |
rrname | string | 解析域名 |
rrtype | string | DNS 记录类型,例如 A、AAAA |
rdata | string | 记录值,通常为查询 IP |
count | int | 命中次数 |
ip_whois 字段
| 参数名 | 类型 | 说明 |
|---|---|---|
inetnum | string | IP 段或网络编号 |
server | string | WHOIS 服务 |
net_type | string | 网络分配类型 |
net_name | string | 网络名称 |
parent_net | string | 父级网络 |
source | string | WHOIS 来源,可能为空字符串 |
end_ip | string | 结束 IP |
org_name | string | 所属组织,可能为空字符串 |
last_modified | string | 最后更新时间 |
country | string | 国家/地区代码,可能为空字符串 |
object_class_name | string | WHOIS 对象类型 |
ip_version | string | IP 版本,例如 v4 |
status | string / null | 分配状态,例如 active |
quake 字段
| 参数名 | 类型 | 说明 |
|---|---|---|
domain | string / null | 资产关联域名,可能为 null |
ip | string | 资产 IP |
asn | int / string / null | ASN |
transport | string | 传输协议 |
port | int | 端口 |
time | string | 资产记录时间 |
hostname | string | 主机名,可能为空字符串 |
org | string | 组织 |
service | object | 服务信息,当前包含 name |
components | list | 组件信息列表;每项包含产品层级、类型、厂商、中文/英文产品名、产品目录、版本等 |
location | object | Quake 地理位置和场景信息,包含中英文国家/省市、country_code、asname、isp、gps、scene 等 |
cert 字段
| 参数名 | 类型 | 说明 |
|---|---|---|
subject_CN | string | 证书主体 CN |
subject | string | 证书主体 |
issuer | string | 证书签发者 |
validity_status | string | 证书有效性状态 |
trusted_status | string | 证书信任状态 |
start | string | 证书生效时间 |
end | string | 证书过期时间 |
SAN | list | 证书备用名称列表 |
sources | list | 证书来源列表 |
endpoints | list | 观测到的 IP:端口列表 |
md5 | string | 证书 MD5 指纹 |
sha1 | string | 证书 SHA1 指纹 |
sha256 | string | 证书 SHA256 指纹 |
samples 字段
| 参数名 | 类型 | 说明 |
|---|---|---|
file_name | string | 样本文件名,可能为空字符串 |
file_size | int / string | 样本大小(Byte);未知时可能为空字符串 |
file_type | string | 文件类型 |
md5 | string | MD5 |
sha1 | string | SHA1 |
sha256 | string | SHA256 |
first_time | string | 首次发现时间 |
level | string / null | 样本风险等级,例如 safe、unknown |
virus_name | string / null | 病毒名 |
reports 字段
| 参数名 | 类型 | 说明 |
|---|---|---|
title | string | 报告标题 |
author | string | 报告作者 |
tags | list | 报告标签 |
url | string | 报告链接 |
update_time | string | 报告更新时间 |
请求示例
支持cUrl、Python、Java、PHP、Go语言的请求,示例如下
#!/usr/bin/env bash
set -euo pipefail
APPID="" # apikey
SECRET="" # salt
URL="https://api.f.360.cn/advanced/ip"
BODY='{"value":"172.96.136.31"}'
NONCE=$(printf '%08d' $((RANDOM % 100000000)))
TIMESTAMP=$(date +%s)
BODY_MD5=$(printf '%s' "$BODY" | openssl dgst -md5 -hex | awk '{print $NF}')
SIGNATURE=$(printf '%s' "${BODY_MD5}${APPID}${NONCE}${TIMESTAMP}${SECRET}" | openssl dgst -md5 -hex | awk '{print $NF}')
SIGNATURE=${SIGNATURE:16}
curl --location --request POST "$URL" \
--header "Content-Type: application/json" \
--header "X-360-Key: ${APPID}" \
--header "X-360-Nonce: ${NONCE}" \
--header "X-360-Timestamp: ${TIMESTAMP}" \
--header "X-360-Signature: ${SIGNATURE}" \
--data "${BODY}"import hashlib
import json
import random
import time
import requests
APPID = "" # apikey
SECRET = "" # salt
def make_headers(appid, secret, body=""):
headers = {}
headers["X-360-Key"] = appid
headers["X-360-Nonce"] = str(random.randint(0, 99999999)).zfill(8)
headers["X-360-Timestamp"] = str(int(time.time()))
s = (
hashlib.md5(body.encode("utf8")).hexdigest()
+ headers["X-360-Key"]
+ headers["X-360-Nonce"]
+ headers["X-360-Timestamp"]
+ secret
)
md5 = hashlib.md5(s.encode("utf8")).hexdigest()
headers["X-360-Signature"] = md5[16:]
headers["Content-Type"] = "application/json"
return headers
def do_post(url, body):
res = requests.post(
url,
data=json.dumps(body), # noqa: F821
headers=make_headers(APPID, SECRET, json.dumps(body)),
)
print(res.text)
if __name__ == "__main__":
# 请求地址
url = "https://api.f.360.cn/advanced/ip"
# 查询参数
params = {"value": "172.96.136.31"}
do_post(url, params)import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.nio.charset.StandardCharsets;
import java.security.MessageDigest;
import java.util.concurrent.ThreadLocalRandom;
public class Demo {
static String md5(String input) throws Exception {
byte[] digest = MessageDigest.getInstance("MD5")
.digest(input.getBytes(StandardCharsets.UTF_8));
StringBuilder sb = new StringBuilder();
for (byte b : digest) {
sb.append(String.format("%02x", b & 0xff));
}
return sb.toString();
}
public static void main(String[] args) throws Exception {
String appid = ""; // apikey
String secret = ""; // salt
String url = "https://api.f.360.cn/advanced/ip";
String body = "{\"value\":\"172.96.136.31\"}";
String nonce = String.format("%08d", ThreadLocalRandom.current().nextInt(100000000));
String timestamp = String.valueOf(System.currentTimeMillis() / 1000);
String signature = md5(md5(body) + appid + nonce + timestamp + secret).substring(16);
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create(url))
.header("Content-Type", "application/json")
.header("X-360-Key", appid)
.header("X-360-Nonce", nonce)
.header("X-360-Timestamp", timestamp)
.header("X-360-Signature", signature)
.POST(HttpRequest.BodyPublishers.ofString(body, StandardCharsets.UTF_8))
.build();
HttpClient client = HttpClient.newHttpClient();
HttpResponse<String> response = client.send(
request, HttpResponse.BodyHandlers.ofString(StandardCharsets.UTF_8));
System.out.println(response.body());
}
}<?php
// apikey
$appid = "";
// salt
$secret = "";
$url = 'https://api.f.360.cn/advanced/ip';
$body = json_encode(['value' => '172.96.136.31'], JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES);
$nonce = str_pad((string) random_int(0, 99999999), 8, "0", STR_PAD_LEFT);
$timestamp = (string) time();
$signature = substr(md5(md5($body) . $appid . $nonce . $timestamp . $secret), 16);
$ch = curl_init($url);
$options = [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-360-Key: {$appid}",
"X-360-Nonce: {$nonce}",
"X-360-Timestamp: {$timestamp}",
"X-360-Signature: {$signature}",
],
];
$options[CURLOPT_POST] = true;
$options[CURLOPT_POSTFIELDS] = $body;
curl_setopt_array($ch, $options);
$response = curl_exec($ch);
if ($response === false) {
echo curl_error($ch), PHP_EOL;
} else {
echo $response, PHP_EOL;
}
curl_close($ch);package main
import (
"bytes"
"crypto/md5"
"encoding/hex"
"fmt"
"io"
"math/rand"
"net/http"
"time"
)
func md5Hex(s string) string {
sum := md5.Sum([]byte(s))
return hex.EncodeToString(sum[:])
}
func main() {
appid := "" // apikey
secret := "" // salt
url := "https://api.f.360.cn/advanced/ip"
body := []byte(`{"value":"172.96.136.31"}`)
nonce := fmt.Sprintf("%08d", rand.Intn(100000000))
timestamp := fmt.Sprintf("%d", time.Now().Unix())
signature := md5Hex(md5Hex(string(body)) + appid + nonce + timestamp + secret)[16:]
req, err := http.NewRequest(http.MethodPost, url, bytes.NewReader(body))
if err != nil {
panic(err)
}
req.Header.Set("Content-Type", "application/json")
req.Header.Set("X-360-Key", appid)
req.Header.Set("X-360-Nonce", nonce)
req.Header.Set("X-360-Timestamp", timestamp)
req.Header.Set("X-360-Signature", signature)
resp, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
respBody, err := io.ReadAll(resp.Body)
if err != nil {
panic(err)
}
fmt.Println(string(respBody))
}返回示例
{
"code": 200,
"message": "Success",
"data": {
"result": {
"ip": "172.96.136.31",
"summary": {
"confidence": "unknown",
"risk": "unknown",
"geo_info": {
"province": "Texas",
"city": "Dallas",
"country": "United States",
"asn": 395092,
"as": "SHOCK-1",
"operator": "Shock Hosting LLC"
},
"block_impact": -1,
"user_type": "",
"threat_type": [],
"anonymous_type": "",
"network_type": [
"Used"
],
"honeypot_hit": false
},
"tag_list": [],
"rdns": [
{
"time_first": 1776468829,
"time_last": 1777497061,
"rrname": "gidosdelicacy.com",
"rrtype": "A",
"rdata": "172.96.136.31",
"count": 25
}
],
"ip_whois": {
"inetnum": "NET-172-96-136-0-1",
"server": "whois.arin.net",
"net_type": "DIRECT ALLOCATION",
"net_name": "SH-335",
"parent_net": "NET-172-0-0-0-0",
"source": "",
"end_ip": "172.96.139.255",
"org_name": "",
"last_modified": "2017-10-17T15:55:22-04:00",
"country": "",
"object_class_name": "ip network",
"ip_version": "v4",
"status": "active"
},
"quake": [
{
"domain": null,
"ip": "172.96.136.31",
"asn": 395092,
"transport": "tcp",
"port": 995,
"time": "2026-04-28T16:54:51.080Z",
"hostname": "tx-s1.serverpanel.com",
"org": "Shock Hosting LLC",
"service": {
"name": "pop3/ssl"
},
"location": {
"country_en": "United States",
"country_cn": "美国",
"country_code": "US",
"province_en": "Texas",
"city_en": "Dallas",
"isp": "Shock Hosting LLC",
"asname": "SHOCK-1",
"scene_en": "Used",
"gps": [
-96.795894,
32.781745
]
}
}
],
"cert": [],
"samples": [
{
"file_name": "",
"file_size": 6261616,
"file_type": "pe_exe_x86",
"md5": "78fc0052d63a8b68d7000f47f9aa81d8",
"sha1": "9567f025a68eff7d22503a98101177505ea26fef",
"sha256": "950e4bcf1841481b53e2c8c7774be2f1a09c20be5f8aedceb8ac65b05d6cbb70",
"first_time": "2019-06-24 00:00:00",
"level": "safe",
"virus_name": null
}
],
"reports": []
}
},
"meta": null
}