全球網(wǎng)站都是由各種組件組成,比如用的哪種操作系統(tǒng)、哪種Web容器、什么服務(wù)端語言、什么Web應(yīng)用等等,而ZoomEye是一個面向網(wǎng)絡(luò)空間的搜索引擎,它允許使用公網(wǎng)設(shè)備指紋檢索和web指紋檢索
web指紋檢索語法
web指紋識別包括應(yīng)用名、版本、前后端框架、服務(wù)端語言與操作系統(tǒng)、容器、數(shù)據(jù)庫等等
語法 | 描述 | 示例 |
---|---|---|
app:組件名 | 目標(biāo)組件名稱 | app:"Apache httpd" |
ver:組件版本 | 目標(biāo)組件版本號 | ver:'2.2.17' |
site:網(wǎng)站域名 | 目標(biāo)網(wǎng)站域名 | site:baidu.com |
os:操作系統(tǒng) | 目標(biāo)操作系統(tǒng) | os:windows |
title:頁面標(biāo)題 | 目標(biāo)網(wǎng)站標(biāo)題 | title:'hello' |
keywords:頁面關(guān)鍵字 | 目標(biāo)頁面關(guān)鍵字 | keywords:'hello' |
desc:頁面說明 | 頁面描述字段 | desc:'hello' |
headers:請求頭部 | HTTP請求中的headers | headers:Server |
country:國家或者地區(qū)代碼 | 目標(biāo)地理位置 | country:US |
city:城市名稱 | 目標(biāo)城市 | city:"Beijing" |
ip:IP地址 | IP地址 | ip:1.1.1.1 |
org:組織機(jī)構(gòu) | 組織機(jī)構(gòu) | org:'Vimpelcom' |
asn:自治系統(tǒng)號 | 自治系統(tǒng)編號 | asn:42893 |
例如:搜索頁面標(biāo)題為hello,頁面關(guān)鍵字為hello,地區(qū)為US
?文章來源地址http://www.zghlxwxcb.cn/news/detail-407558.html
設(shè)備指紋檢索語法
設(shè)備指紋識別如操作系統(tǒng)、應(yīng)用名稱、版本號、端口、地理位置等等
語法 | 描述 | 實例 |
---|---|---|
app:組件名 | 目標(biāo)組件名稱 | app:"Apache httpd" |
ver:組件版本 | 目標(biāo)組件版本號 | ver:'2.2.17' |
port:端口號 | 目標(biāo)系統(tǒng)開發(fā)端口 | port:'6379' |
os:操作系統(tǒng) | 目標(biāo)操作系統(tǒng)類型 | os:linux |
service:服務(wù)名 | 目標(biāo)運(yùn)行的服務(wù)類型 | service:webcam |
hostname:主機(jī)名 | 目標(biāo)系統(tǒng)的主機(jī)名 | hostname:google.com |
country:國家/地區(qū)代碼 | 目標(biāo)系統(tǒng)的地理位置 | country:CN |
city:城市 | 目標(biāo)系統(tǒng)的城市 | city:'Shanghai' |
ip:IP地址 | IP地址 | ip:10.10.10.1 |
org:組織機(jī)構(gòu) | 組織機(jī)構(gòu) | org:'Vimpelcom' |
asn:自治系統(tǒng)號 | 自治系統(tǒng)編號 | asn:42893 |
ssl:SSL證書號 | SSL證書 | ssl:'corp.google.com' |
例如:搜索在JP的windows操作系統(tǒng),運(yùn)行為Apache的服務(wù)器
?
腳本檢索
(1)獲取token
方法一、開發(fā)者模式獲取token(以下腳本使用的是這個)
?
方法二、通過Python腳本構(gòu)造post請求,將用戶名與密碼以json格式發(fā)送至后端,獲取響應(yīng)數(shù)據(jù)包得到token ?
# 獲取token
import json
import requests
# 訪問目標(biāo)開啟加密,python請求https關(guān)閉證書, 解決https報錯問題
requests.packages.urllib3.disable_warnings()
def token():
username = input('username:')
password = input('password:')
URL = 'https://api.zoomeye.org/user/login'
data = {
'username': username,
'password': password
}
access_token = requests.post(URL, data=json.dumps(data), verify=False, allow_redirects=False)
print(access_token.text)
token()
方法三、通過curl命令直接獲取token
?
(2)腳本檢索
查詢開放3306端口的服務(wù)對應(yīng)的ip地址
# 獲取token
import json
import re
import requests
# 訪問目標(biāo)開啟加密,python請求https關(guān)閉證書, 解決https報錯問題
requests.packages.urllib3.disable_warnings()
def token():
username = input('username:')
password = input('password:')
URL = 'https://api.zoomeye.org/user/login'
data = {
'username': username,
'password': password
}
access_token = requests.post(URL, data=json.dumps(data), verify=False, allow_redirects=False)
ganyu = access_token.text
tokennum = re.search('ey((\w+.){4})', ganyu).group()
ganyu1 = tokennum.split('"')[0]
def mian():
headers = {
'Accept': '*/*',
'Cache - Control': 'max-age=0',
'Accept-Language': 'zh-CN,zh;q=0.8,zh-TW;q=0.7,zh-HK;q=0.5,en-US;q=0.3,en;q=0.2',
'If-None-Match':'W/"e46c1403df6dd51ea4bb214fcfc1bad8b12dbd03"',
'Referer': 'https://www.zoomeye.org/',
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:98.0) Gecko/20100101 Firefox/98.0',
'Sec-Fetch-Dest': 'empty',
'Sec-Fetch-Mode': 'cors',
'Sec-Fetch-Site':'same-origin',
'Cube-Authorization': 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VybmFtZSI6IjVmN2FjMWE1YjBmYSIsImVtYWlsIjoiMjMxMTQ5ODM2NkBxcS5jb20iLCJleHAiOjE2NDc1OTYwNTAuMH0.e0yOehVGgWaKFPn1Y7aHyfoDmIqqV9VBIzbFiIOOQKY'
}
url = 'https://www.zoomeye.org/search?q=port%3A3306&page=1&pageSize=20&t=v4+v6+web'
res = requests.get(url=url, headers=headers, verify=False, allow_redirects=False)
init = json.loads(res.text)
for line in init['matches']:
print(line['ip']+':'+str(line['portinfo']['port']))
if __name__ == '__main__':
mian()
文章來源:http://www.zghlxwxcb.cn/news/detail-407558.html
?
到了這里,關(guān)于ZoomEye搜索引擎語法與腳本檢索的文章就介紹完了。如果您還想了解更多內(nèi)容,請在右上角搜索TOY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!