2023年1月6日 星期五

Detect if a VM is running in Google Compute Engine

Detect if a VM is running in Compute Engine

sudo dmidecode -s system-product-name | grep "Google Compute Engine"
這個需要 root 權限,實際上是去讀取 /sys/firmware/dmi/tables/DMI
用 strings /sys/firmware/dmi/tables/DMI | grep "Google Compute Engine" 也行

若程式沒有 root 權限,可以去讀取 /etc/hosts 有沒有包含 Added by Google 字樣
grep "Added by Google" /etc/hosts

沒有留言:

Certificate lifetime reduce to 47 days after 2029-03-15

在 2020年九月,憑證效期縮短為 398 天 爾後最新標準是 47 天,原因一樣是資安考量,分三個階段逐步調整 執行時間表 2026-03-15 縮短成 200 天 2027-03-15 縮短成 100 天 2029-03-15 縮短成 47 天 圖片來源 Sectigo r...