SaFly Guard™

产品简介

SaFly Guard™ 多模块 Web 分析系统,其主要功能包括请求安全性分析(Web 防火墙)、URL 地址分析、 IP 综合性分析、访客欺诈分析。SaFly Guard™ 多维分析访客,生成访客综合健康报告,准确拦截包括 XSS 攻击、 SQL 注入攻击内的多种攻击方式,多语言定位 IP 以及精准识别搜索引擎、拦截恶意访客访客,有效预防在线欺诈、减少交易退款情况并降低安全风险。

接口调用

请求接口:
接口 HTTP 地址:http://api.oranme.com/api/saflyguard/
接口 HTTPS 地址:https://tls.waf.name/api/saflyguard/
请求方式:GET & POST
支持格式:JSON (JavaScript Object Notation)
评级模式:参数 mode 为 visitor (GET, 默认)

模式简介:访客综合评级模式,所提交参数为需要被检测的网站访客的相关信息,SaFly Guard™ 将返回访客评级,不会返回其他信息。

请求模板
请求模板1:http://api.oranme.com/api/saflyguard/?ip=访客 IP 地址&url=访客访问的 URL Base64 编码&user_agent=访客 USER AGENT Base64 编码&attributes=附加属性&apidomain=API Domain&salt=随机数&sign=签名
请求模板2:http://api.oranme.com/api/saflyguard/?ip=访客 IP 地址&url=访客访问的 URL Base64 编码&user_agent=访客 USER AGENT Base64 编码&attributes=附加属性&apidomain=API Domain&apikey=API KEY
请求参数
名称类型必填请求方式说明
*ArrayPOST访客 POST, Cookie 等请求
ipStringGET访客 IP 地址
urlStringGET访客访问的 URL Base64 编码
user_agentStringGET访客 USER AGENT Base64 编码
attributesArrayGET附加属性,Json 格式
附加属性 – attributes
名称说明实施例
siw加载 SaFly Interact WAF™ 拦截规则&attributes={“siw”:1}
allow_ip放行指定 IP 地址&attributes={“allow_ip”:[“1.2.3.4″,”8.8.8.8″,”8.8.4.4”]}
block_ip拦截指定 IP 地址&attributes={“block_ip”:[“1.2.3.5″,”8.8.8.9″,”8.8.4.5”]}
多属性示例:&attributes={"siw":1,"allow_ip":["1.2.3.4","8.8.8.8","8.8.4.4"],"block_ip":["1.2.3.5","8.8.8.9","8.8.4.5"]}
返回字段
名称类型说明
codeString返回值
dataArray返回结果集
visitor_dataArray访客评级结果集
codeBoolean访客属性:1正常,0异常
detailsArray详细评级结果集
rankNumber访客等级,0 – 5,5为最安全
infoString访客信息
propertiesObject访客属性
spider_dataArray蜘蛛评级结果集
codeBoolean蜘蛛属性:1是,0非
infoString蜘蛛信息
请求示例:http://api.oranme.com/api/saflyguard/?ip=8.8.8.8&user_agent=R29vZ2xlYm90LzIuMSAoK2h0dHA6Ly93d3cuZ29vZ2xlLmNvbS9ib3QuaHRtbCk=&url=aHR0cDovL3Rvb2wuY2hpbmF6LmNvbS9Ub29scy9CYXNlNjQuYXNweA==&attributes={"siw":1,"allow_ip":["1.2.3.4","8.8.8.8","8.8.4.4"],"block_ip":["1.2.3.5","8.8.8.9","8.8.4.5"]}&apidomain=API Domain&apikey=API KEY
JSON返回示例:{"code":"000201","data":{"visitor_data":{"code":1,"details":{"rank":5,"info":"normal_visitor","properties":["0x00200A1","0x00200B1","0x00200C1","0x00200J0","0x00200S4","0x00200A4","0x00200B2"]}},"spider_data":{"code":1,"info":"Google"}}}
数据模式:参数 mode 为 data (GET)

模式简介:数据处理模式,所提交参数为需要被处理的信息,部分参数支持多个。

请求模板
请求模板1:http://api.oranme.com/api/saflyguard/?mode=data&ip=需要分析的 IP 地址&domain=需要分析的域名&url=需要分析的 URL Base64 编码&user_agent=需要分析的 USER AGENT Base64 编码&attributes=附加属性&apidomain=API Domain&salt=随机数&sign=签名
请求模板2:http://api.oranme.com/api/saflyguard/?mode=data&ip=需要分析的 IP 地址&domain=需要分析的域名&url=需要分析的 URL Base64 编码&user_agent=需要分析的 USER AGENT Base64 编码&attributes=附加属性&apidomain=API Domain&apikey=API KEY
请求参数
名称类型必填请求方式说明
*ArrayPOST需要分析的请求
ipStringGET需要分析的 IP 地址,多个用半角逗号分隔
domainStringGET需要分析的域名,多个用半角逗号分隔
urlStringGET需要分析的 URL Base64 编码,多个用半角逗号分隔
user_agentStringGET需要分析的 USER AGENT Base64 编码,多个用半角逗号分隔
attributesArrayGET附加属性,多个用半角逗号分隔
返回字段
名称类型说明
codeString返回值
dataArray返回结果集
request_dataArray请求分析结果集
url_dataArrayURL 地址分析结果集
ip_dataArrayIP 地址分析结果集
请求示例:http://api.oranme.com/api/saflyguard/?mode=data&ip=8.8.8.8,2404:6800:8005::93&user_agent=R29vZ2xlYm90LzIuMSAoK2h0dHA6Ly93d3cuZ29vZ2xlLmNvbS9ib3QuaHRtbCk=&url=aHR0cDovL3NhZmx5Lm9yZy8=,aHR0cHM6Ly9ibG9nLnNhZmx5Lm9yZy8=&domain=safly.org,blog.safly.org&apidomain=API Domain&apikey=API KEY
JSON返回示例:{"code":"000201","data":{"post_data":null,"ip_data":{"8.8.8.8":{"ip":"8.8.8.8","ip_version":4,"ip_number":"134744072","netblock":"8.8.8.8 - 8.8.8.8","human":0,"spider":"Google","ip_location":{"data1":{"continent_code":"NA","iso_code":"US","coordinates":{"accuracy_radius":1000,"latitude":37.751,"longitude":-97.822},"registered_country":"US","zh-CN":"\u5317\u7f8e\u6d32\u7f8e\u56fd","en":"North America United States"},"data2":{"iso_code":"US","time_zone":"-07:00","zip_code":"94043","coordinates":{"latitude":37.40599060058594,"longitude":-122.0785140991211},"en":"United States California Mountain View"},"data3":{"zh-CN":"\u7f8e\u56fd\u52a0\u5229\u798f\u5c3c\u4e9a\u5dde\u5723\u514b\u62c9\u62c9\u53bf\u5c71\u666f\u5e02\u8c37\u6b4c\u516c\u53f8DNS\u670d\u52a1\u5668"}}},"2404:6800:8005::93":{"ip":"2404:6800:8005::93","ip_version":6,"ip_number":"47875086445910016395005508612188536979","human":0,"spider":"Unknown","ip_location":{"data1":{"continent_code":"OC","iso_code":"AU","coordinates":{"accuracy_radius":100,"latitude":-27,"longitude":133},"registered_country":"AU","zh-CN":"\u5927\u6d0b\u6d32\u6fb3\u5927\u5229\u4e9a","en":"Oceania Australia"},"data2":{"iso_code":"AU","time_zone":"+10:00","zip_code":"3818","coordinates":{"latitude":-38.26667022705078,"longitude":145.86666870117188},"en":"Australia Victoria Mountain View"}}}},"domain_data":{"safly.org":{"domain":"safly.org","domain_security":1,"domain_dns":["safly.org has address 122.114.39.173","safly.org mail is handled by 5 mxbiz1.qq.com.","safly.org mail is handled by 10 mxbiz2.qq.com."]},"blog.safly.org":{"domain":"blog.safly.org","domain_security":1,"domain_dns":["blog.safly.org has address 104.28.9.45","blog.safly.org has address 104.28.8.45","blog.safly.org has IPv6 address 2400:cb00:2048:1::681c:82d","blog.safly.org has IPv6 address 2400:cb00:2048:1::681c:92d"]}},"url_data":{"http:\/\/safly.org\/":{"url":"http:\/\/safly.org\/","parse":{"scheme":"http","host":"safly.org","path":"\/"},"query_security":{"query_size":{"parameters_number":3,"size":28},"query_code":1,"query_info":"normal_query"},"domain_info":{"domain":"safly.org","domain_security":1,"domain_dns":["safly.org has address 122.114.39.173","safly.org mail is handled by 5 mxbiz1.qq.com.","safly.org mail is handled by 10 mxbiz2.qq.com."]}},"https:\/\/blog.safly.org\/":{"url":"https:\/\/blog.safly.org\/","parse":{"scheme":"https","host":"blog.safly.org","path":"\/"},"query_security":{"query_size":{"parameters_number":3,"size":34},"query_code":1,"query_info":"normal_query"},"domain_info":{"domain":"blog.safly.org","domain_security":1,"domain_dns":["blog.safly.org has address 104.28.8.45","blog.safly.org has address 104.28.9.45","blog.safly.org has IPv6 address 2400:cb00:2048:1::681c:82d","blog.safly.org has IPv6 address 2400:cb00:2048:1::681c:92d"]}}},"user_agent_data":{"Googlebot\/2.1 (+http:\/\/www.google.com\/bot.html)":1}}}
正常响应码参照(0):
返回码说明完整响应码
01正常返回结果集000201
服务级(2)错误码参照:
返回码说明完整响应码
01缺少必须参量200201
02无效的参量200202
03请求超过最大请求长度200203
04最多 3 个半角逗号200204

附录

发布者

SaFly.ORG

SaFly, On the WAY!