Pank's Blog
2026年10月5日 星期一
Android ACCESS_LOCAL_NETWORK permission
Google Play 中的 Termux 在 app 並沒有要求此權限,造成 ping、curl 內網都不會通
ping: sendmsg: Operation not permitted
替代方案是安裝 F-Droid 內的 Termux,最後一次更新是 2025年5月
Source Code 內的設定是
targetSdkVersion=28
compileSdkVersion=36
2026年9月15日 星期二
Windows 11 bypass TPM and create local account
看到選擇語言時,Shift-F10 叫出 CMD,執行 regedit
HKEY_LOCAL_MACHINE\SYSTEM\Setup
下面新增 機碼(Key)LabConfig
再建立以下兩個 DWORD 32位元,數值設為 1
BypassTPMCheck
BypassSecureBootCheck
裝完重開機後,停下來第一個畫面,Shift-F10 叫出 CMD
輸入 start ms-cxh:localonly
會跳出一個對話框,可以直接建立本機帳號
2026年8月27日 星期四
WinBox legacy version 3.x
UI 比較漂亮,但也肥大許多(解開大於50M),還是習慣使用舊版(x64 只有 2.2M)
WinBox 3.43
Legacy version of advanced desktop utility to manage RouterOS limitless configuration options.
With WinBox you can setup any of MikroTik products.
Available only on Windows.
官方網址
2026年8月12日 星期三
Windows 10 ESU extended to 2027-10-12
微軟延長了 Windows 10 ESU 支援時間至 2027-10-12 (又加一年)
可以使用 ConsumerESU 腳本快速啟用 ESU
下載 ZIP 包解開後,以系統管理員身分執行 Consumer_ESU_Enrollment_run.cmd
New Zealand Dazzle Apple
鈕西蘭的 Dazzle 蘋果真是超好吃啊
爽脆多汁口感,貼紙上有 dazzle 字樣及 PLU 編號 3529
據說是經歷 20 年研發,農業科技的結晶
附圖取自官網 https://www.dazzleapple.com/
2026年6月26日 星期五
DNS-PERSIST-01 DCV
它是用綁定帳號,在域名直接設上 accounturi 的 TXT 資料,
來達到長效授權,之後經由綁定帳號來申請的憑證,就直接過了,不需再設定 DNS
已經上 Staging 環境 (--server letsencrypt_test)
預計 2026 Q2 上正式,應該快了
使用 acme.sh 先下指令取得要設定的 TXT
acme.sh --make-dns-persist-value --dns-persist-wildcard -d {domain}
設好之後,就可以 issue
acme.sh --issue -d {domain} -d *.{domain} --dns-persist
尚未上正式前,用正式的 Server (--server letsencrypt) 會收到錯誤
Cannot get domain token entry {domain} for dns-persist-01
Supported validation types are: tls-alpn-01 http-01 dns-01 , but you specified: dns-persist-01
2026年6月16日 星期二
Save Web to PNG
方法1 Playwright
npm install -g playwright
npx playwright install-deps
npx playwright install chromium
npx playwright screenshot --full-page --wait-for-timeout=3000 https://24h.pchome.com.tw screenshot.png
方法2 Chromium
dnf install chromium -y
chromium-browser --headless --disable-gpu --screenshot --window-size=1920,1080 https://24h.pchomec.com.tw
結果會輸出到當前目錄的 screenshot.png
方法1會自動捲動,存下完整頁面,方法2局限於指定的大小
2026年5月14日 星期四
scp remote to remote
在 HostC 下 scp 指令要從 HostA 複製檔案到 HostB,都透過 Key auth
預設情況下 (沒有加參數 -3)
HostC 對 HostA 要建 Key,HostA 對 hostB 要建 Key
資料流是直接從 HostA 到 HostB,沒有經過 HostC
第二種情況,透過 HostC 中繼,加參數 -3
HostC 對另外兩台建 Key,資料流有經過 HostC 本地
-3 Copies between two remote hosts are transferred through the local host.
Without this option the data is copied directly between the two remote hosts.
Note that, when using the legacy SCP protocol (via the -O flag),
this option selects batch mode for the second host as scp cannot ask for passwords or passphrases for both hosts.
This mode is the default.
2026年5月11日 星期一
Copy fail and Dirty Frag
Copy fail 及 Dirty Frag 這兩個漏本地提權(LPE)漏洞,在 2026 年 5 月被揭露,
漏洞已存在很久,幾乎影響所有的 Linux
Github 上面已經有很多 POC 程式
暫時解決方案是禁用相關的 Kernel 模組
以下是 for RedHat 系的 Linux
# Copy fail
echo "install af_alg /bin/false" > /etc/modprobe.d/disable-af_alg.conf
echo "install algif_aead /bin/false" >> /etc/modprobe.d/disable-af_alg.conf
echo "install algif_skcipher /bin/false" >> /etc/modprobe.d/disable-af_alg.conf
# Dirty Frag
echo "install esp4 /bin/false" > /etc/modprobe.d/disable-esp.conf
echo "install esp6 /bin/false" >> /etc/modprobe.d/disable-esp.conf
echo "install rxrpc /bin/false" >> /etc/modprobe.d/disable-esp.conf
lsmod | egrep "af_alg|algif_aead|algif_skcipher|esp4|esp6|rxrpc"
若有結果,表示已載入該模組,用 rmmod 移除
2026年5月10日 星期日
Mount SSHFS in Windows
https://github.com/winfsp/winfsp
https://github.com/winfsp/sshfs-win
一般用帳密掛載,預設是掛載使用者的 home 目錄
net use Z: \\sshfs\username@host
使用 SSH Key (前綴從 sshfs 變成 sshfs.k),SSH Key 存放路徑 C:\Users\username\.ssh
net use Z: \\sshfs.k\username@host
若要掛其他目錄,前綴從 sshfs 或 sshfs.k,請使用相對路徑
例如 username 的 home 目錄是 /home/username,要掛載 /data
net use Z: \\sshfs.k\username@host\..\..\data
要使用絕對路徑,前綴要使用 sshfs.r 或 sshfs.kr
net use Z: \\sshfs.kr\username@host\data
Android ACCESS_LOCAL_NETWORK permission
目標 SDK 版本 37 以上版本,app 若需要存取區域網網,需要求 ACCESS_LOCAL_NETWORK 權限 Google Play 中的 Termux 在 app 並沒有要求此權限,造成 ping、curl 內網都不會通 ping: sendmsg: Operatio...