Skip to content
Ricky
Chinese

搜尋

Searching… No matching pages. Matching pages are listed below. Search is unavailable. Please try again.

HTTP

Recent posts

Til

keybr.com is not (just) a typing test Lofi Cities Hole Punch Play board games online with friends 輔導室:今天也不能倒下 Virtual Guitar Big words for any screen Article Pandas Should Go Extinct …

TIL:Bash 腳本的 timeout timeout 1m ./until.sh 包一層 timeout 1m bash -c "until curl --silent --fail-with-body 10.0.0.1:8080/health; do sleep 1 done"

我用 Zip Bomb 來保護我的伺服器 發生的情況是:對方收到檔案後,讀取標頭得知這是壓縮檔,因此嘗試解壓那個 1MB 的檔案來找他們要的內容。但檔案會不斷膨脹,直到耗盡記憶體、伺服器崩潰。1MB 的檔案會解壓成 1GB,這已足以讓多數機器人失敗。不過對於那些死纏爛打的腳本,我就給它 10MB 的檔案,解壓後會變成 10GB,立刻把腳本搞掛。 dd if=/dev/zero bs=1G count=10 | …

All posts

7 posts