Shodan语法,FOFA语法,Google语法 作者: ynnddddd 时间: 2025-03-31 分类: 网络安全,渗透工具与命令 以下是 Shodan、Fofa 和 Google 搜索语法的总结,便于快速查阅和对比: --- ### **一、Shodan 搜索语法** (专注于网络设备、服务器、IoT设备等) 1. **基础语法** - `port:80`:搜索指定端口 - `country:"CN"`:指定国家代码 - `city:"Beijing"`:指定城市 - `os:"Windows"`:操作系统类型 - `product:"Apache"`:服务/软件名称 - `ssl:"nginx"`:SSL证书信息 2. **高级语法** - `hostname:"example.com"`:域名匹配 - `net:"192.168.1.0/24"`:IP或子网范围 - `has_screenshot:true`:存在截图的主机 - `http.title:"Login"`:网页标题包含关键词 - `http.status:200`:HTTP状态码 3. **布尔逻辑** - 空格:默认 `AND` - `OR`:逻辑或(需大写) - `-`:排除关键词(如 `-country:US`) **示例**: `product:"nginx" country:CN port:443 http.title:"Admin"` --- ### **二、Fofa 搜索语法** (网络空间测绘引擎,语法类似但部分字段不同) 1. **基础语法** - `domain="example.com"`:匹配域名 - `ip="1.1.1.1"`:指定IP - `port="80"`:端口 - `country="CN"`:国家代码 - `title="Login"`:网页标题 - `header="Server: nginx"`:HTTP响应头 2. **高级语法** - `cert="Google"`:SSL证书信息 - `icp="京ICP备"`:备案号搜索 - `os="Windows"`:操作系统 - `server=="Microsoft-IIS/10"`:精确匹配服务 3. **布尔逻辑** - `&&`:逻辑与(如 `domain="example.com" && port="443"`) - `||`:逻辑或 - `!=`:排除(如 `os!="Linux"`) **示例**: `title="Dashboard" && country=US && port=8080` --- ### **三、Google 搜索语法** (用于精准定位网页内容) 1. **常用操作符** - `site:example.com`:限定网站 - `filetype:pdf`:指定文件类型 - `intitle:"Login"`:标题包含关键词 - `inurl:admin`:URL包含关键词 - `intext:"password"`:网页正文内容 2. **逻辑操作** - `"exact phrase"`:精确匹配短语 - `OR`:逻辑或(必须大写) - `-keyword`:排除关键词(如 `-site:example.com`) - `*`:通配符(如 `filetype:do*` 匹配 doc/docx) 3. **高级功能** - `cache:example.com`:查看缓存页面 - `related:example.com`:查找相似网站 - `weather:Beijing`:直接获取天气/汇率等 **示例**: `site:gov.cn filetype:xls intext:"password"` --- ### **总结对比** | 功能 | Shodan | Fofa | Google | |--------------|-----------------------|-----------------------|-----------------------| | **核心用途** | 网络设备/服务器扫描 | 网络空间测绘 | 网页内容检索 | | **布尔逻辑** | `OR`、`-` | `&&`、`||`、`!=` | `OR`、`-` | | **特色字段** | `ssl`、`has_screenshot` | `icp`、`cert` | `filetype`、`site` | 标签: none