network下的这里就是中间件版本信息
搜索ip如上
使用搜索过滤
如果像前面单纯只使用关键字直接进行搜索,搜索结果可能不尽人意,那么此时我们就需要使用一些特定的命令对搜索结果进行过滤,常见用的过滤命令如下所示:
hostname
:搜索指定的主机或域名,例如hostname:"google"
port
:搜索指定的端口或服务,例如port:"21"
country
:搜索指定的国家,例如country:"CN"
city
:搜索指定的城市,例如city:"Hefei"
org
:搜索指定的组织或公司,例如org:"google"
isp
:搜索指定的ISP供应商,例如isp:"China Telecom"
product
:搜索指定的操作系统/软件/平台,例如product:"Apache httpd"
version
:搜索指定的软件版本,例如version:"1.6.2"
geo
:搜索指定的地理位置,参数为经纬度,例如geo:"31.8639, 117.2808"
before/after
:搜索指定收录时间前后的数据,格式为dd-mm-yy,例如before:"11-11-15"
net
:搜索指定的IP地址或子网,例如net:"210.45.240.0/24"
示例
搜索中间件
搜索阿帕奇服务及版本
命令行于API使用
- kali先安装python环境
- 使用pip3 install shodan安装撒旦模块
- 安装成功后输入
shodan -h //查看帮助手册,如果可以看到帮助手册就说明已经安装成功可以正常使用了
shodan init <api_key> //输入一个变量
shodan info //查询自己的api接口相关信息
使用浏览器登录撒旦,在我的账户里你就可以看到自己的api密钥
shodan init DWbmFDEyIRtAsB7RiBt1kYlNPCUtgVKC //DWbmFDEyIRtAsB7RiBt1kYlNPCUtgVKC API密钥
导入成功以后输入:
shodan info //查看自己的api信息
有一百条限制
接下来根据-h的手册来看用法
1.查询iis 6.0数量
shodan count microsoft iis 6.0
返回结果
2.将结果下载下来
shodan download microsoft-data nicrosoft iis 6.0 //microsoft-data表名
解析结果
shodan parse --fields ip str,port,org --separator , Microsoft-data.json.gz //parse关键参数
shodan host189.201.128.250
shodan search --fields ip str,port,org,hostnames microsoft iis 6.0
3.vscode打开
vscode shodan search example0l.py
import shodan
SHODAN_API_KEY='撒旦的KEY'
shodan.Shodan(SHODAN_API_KEY)
try:
#搜索shodan
results=ap.search('apache')
#显示结果
print('Results is:%s' % results['total']
for result in results['matches']:
print(result['ip_str'])
except shodan.APIError as e:
print('Error:%s' % e')
shodan.scan(i)
判断网站是否存活
ping -c www.baidu.com
除了站长之家,微步和阿里云都可以查询
whois
dig
nslookup
dnsenum
robot.tx