Install
openclaw skills install shodan-skills查询 Shodan 物联网搜索引擎获取设备信息、安全数据和网络资产;当用户需要进行 IP 地址分析、设备搜索、DNS 查询、网络安全评估或获取物联网设备信息时使用
openclaw skills install shodan-skillsrequests==2.28.0
当用户提供 IP 地址时,查询该 IP 的详细信息:
调用脚本:
python scripts/shodan_api.py host <ip>
示例:
python scripts/shodan_api.py host 8.8.8.8
返回信息包含:
当用户需要按条件搜索设备时:
调用脚本:
python scripts/shodan_api.py search "<query>" [--facets <facets>] [--page <page>]
常用搜索语法(详见 references/api-reference.md):
port:80 - 搜索开放 80 端口的设备country:US - 搜索美国的设备product:nginx - 搜索运行 nginx 的设备os:Windows - 搜索 Windows 系统org:"Google" - 搜索属于 Google 的设备示例:
# 搜索开放 80 端口的 Web 服务器
python scripts/shodan_api.py search "port:80"
# 搜索运行 Apache 的设备,显示国家和组织信息
python scripts/shodan_api.py search "product:Apache" --facets "country,org"
# 分页查询
python scripts/shodan_api.py search "port:22" --page 2
当用户只想知道匹配设备数量时:
调用脚本:
python scripts/shodan_api.py count "<query>" [--facets <facets>]
示例:
# 统计开放 80 端口的设备数量
python scripts/shodan_api.py count "port:80"
# 按国家统计
python scripts/shodan_api.py count "port:80" --facets "country"
当用户需要查询域名相关的 DNS 信息:
正向 DNS 查询:
python scripts/shodan_api.py dns-domain <domain>
反向 DNS 查询:
python scripts/shodan_api.py dns-reverse <ip>
示例:
# 查询 google.com 的 DNS 信息
python scripts/shodan_api.py dns-domain google.com
# 反向查询 8.8.8.8 的域名
python scripts/shodan_api.py dns-reverse 8.8.8.8
获取端口列表:
python scripts/shodan_api.py ports
获取搜索查询列表:
python scripts/shodan_api.py queries [--page <page>] [--sort <sort>] [--order <order>]
获取当前 IP:
python scripts/shodan_api.py myip
获取账户信息:
python scripts/shodan_api.py profile
获取 API 数据后,智能体将:
count 接口可以节省查询配额SHODAN_API_KEY 自动读取,无需手动传递用户请求:"帮我分析 8.8.8.8 的安全信息" 执行步骤:
用户请求:"查找所有暴露在互联网上的摄像头设备" 执行步骤:
webcam has_screenshot:true用户请求:"帮我发现某个组织的互联网资产" 执行步骤:
org:"组织名" 搜索