Logo Ricky
  • 首頁
  • 關於
  • 更多的
    技能 經歷 學歷 專案
  • 文章
  • 筆記
  • 活動
  • Transform
  • Chinese
    English Chinese
  • Dark Theme
    Light Theme Dark Theme System Theme
Logo Inverted Logo
  • 標籤
  • A10
  • ACME
  • AD
  • AES
  • AI
  • Aliyun
  • Ansible
  • APP
  • Application Delivery Controller
  • Arceus
  • Argo CD
  • ASCII
  • Authentication
  • Authorization
  • AWS
  • BASH
  • Bayonet
  • Benchmark
  • BGP
  • BIRD
  • Board Game
  • Browser
  • Byte
  • Cache
  • CDN
  • Channel
  • Chart
  • Checklist
  • Chrome
  • Chrome OS
  • Chrony
  • CI
  • Cilium
  • Cisco
  • Cloud-Native
  • Cloudflare
  • Cluster
  • Command Line
  • Completion
  • Config
  • Container
  • CPU
  • CURL
  • Data
  • Database
  • Debug
  • Dehydrated
  • Design
  • DevSecOps
  • Diagrams
  • Dmg
  • DNS
  • DNS-01
  • Docker
  • EFF
  • ElasticSearch
  • ELK
  • Emoji
  • EMQX
  • Encode
  • Encrypt
  • ESXi
  • Extension
  • Firewall
  • Fortigate
  • Fortinet
  • FortiOS
  • Game
  • GeoIP
  • GIN
  • Git
  • GitBook
  • Github
  • Gitlab
  • GitOps
  • Gluetun
  • Go
  • Go-Mysql-Elasticsearch
  • Golang
  • Google
  • GPG
  • GraphQL
  • HA
  • HAProxy
  • Hash
  • HomeLab
  • Htop
  • HTTP
  • Infra
  • Infrastructure
  • Input Method
  • Interview
  • Introduction
  • IPhone
  • Iptables
  • Iso
  • Issue
  • ITerm2
  • Jenkins
  • Jsoniter
  • Juniper
  • JWT
  • Kibana
  • Kubernetes
  • LDAP
  • Leetcode
  • Lightweight
  • Linkerd
  • Links
  • Linux
  • Llamafile
  • LLM
  • Log
  • Lua
  • Lullaby
  • LVM
  • Machinelearning
  • MacOS
  • Markdown
  • Mattermost
  • Mermaid
  • MinIO
  • Module
  • MQTT
  • MSS
  • MTU
  • Music
  • MyDumper
  • MySQL
  • NAS
  • Netcat
  • Network
  • Nftables
  • Nginx
  • OAuth
  • OIDC
  • Ollama
  • OpenResty
  • Parquet
  • Percona
  • Pinyin
  • Pip
  • Plugin
  • Pokemon
  • PostgreSQL
  • PowerDNS
  • PowerShell
  • Pprof
  • Principle
  • Prometheus
  • Protobuf
  • Proxy
  • Push
  • Python
  • QRCode
  • R
  • RAID
  • RDP
  • Redis
  • Regex
  • Ringtone
  • Route
  • Rust
  • S3
  • ScreenShot
  • Security
  • Selenium
  • Sentry
  • Service Mesh
  • SFTP
  • SHELL
  • Slides
  • Snow
  • Software
  • SonarQube
  • SQL
  • SSH
  • SSL
  • String
  • Switch
  • Sync
  • Synology
  • System
  • Tcpdump
  • Telegram
  • Terminal
  • Terraform
  • Test
  • Testing
  • Time
  • Timeout
  • TLS
  • Tor
  • Trace
  • Traefik
  • Travel
  • Tunnel
  • Typora
  • Ubuntu
  • URL
  • UserAgent
  • V2Ray
  • Vagrant
  • Video
  • Vim
  • Virtualization
  • Visualization
  • VNC
  • VPN
  • VSCode
  • WAF
  • Web
  • WebAssembly
  • Webp
  • Windows
  • WSL
  • YAML
  • Youtube
  • Zabbix
  • Zero Trust
  • Zim
  • ZSH
  • 台語
Hero Image
TIL:Bash 腳本的 timeout

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"

Thursday, June 12, 2025 閱讀
Hero Image
我用 Zip Bomb 來保護我的伺服器

我用 Zip Bomb 來保護我的伺服器 發生的情況是:對方收到檔案後,讀取標頭得知這是壓縮檔,因此嘗試解壓那個 1MB 的檔案來找他們要的內容。但檔案會不斷膨脹,直到耗盡記憶體、伺服器崩潰。1MB 的檔案會解壓成 1GB,這已足以讓多數機器人失敗。不過對於那些死纏爛打的腳本,我就給它 10MB 的檔案,解壓後會變成 10GB,立刻把腳本搞掛。 dd if=/dev/zero bs=1G count=10 | gzip -c > 10GB.gz dd:用於複製或轉換資料的指令。 if:輸入檔案,這裡指定 /dev/zero,它會產生無限的零位元組串流。 bs:區塊大小,設為 1GB(1G),代表 dd 會以 1GB 為單位讀寫。 count=10:代表處理 10 個區塊、每個 1GB,因此會產生 10GB 的零資料。 middleware if (ipIsBlackListed() || isMalicious()) { header("Content-Encoding: gzip"); header("Content-Length: ". filesize(ZIP_BOMB_FILE_10G)); // 10 MB readfile(ZIP_BOMB_FILE_10G); exit; }

Saturday, May 3, 2025 閱讀
Hero Image
人人都需要一個 HTTP proxy 來 debug

人人都需要一個 HTTP proxy 來 debug Charles Burp Suite mitmproxy

Friday, April 25, 2025 閱讀
Hero Image
即時監控網路介面上的 HTTP 請求

即時監控網路介面上的 HTTP 請求 tcpflow apt/dnf install tcpflow $ sudo tcpflow -p -c -i wlp0s20f3 port 80 | grep -oE '(GET|POST) .* HTTP/1.[01]|Host: .*' reportfilename: ./report.xml tcpflow: listening on wlp0s20f3 GET /alexlarsson/flatpak/ubuntu/dists/focal/InRelease HTTP/1.1 GET /mirrors.txt HTTP/1.1 -p 停用混雜模式 -c 只輸出到主控台,不建立檔案 -i 指定網路介面 grep 會接收 tcpflow 的輸出 -o 只顯示符合樣式的那一段 -E 表示樣式是延伸正則表示式(ERE) httpry https://github.com/jbittel/httpry.git sudo httpry -i wlp0s20f3 httpry version 0.1.8 -- HTTP logging and information retrieval tool Copyright (c) 2005-2014 Jason Bittel <jason.bittel@gmail.com> Starting capture on wlp0s20f3 interface 2022-06-22 16:38:12.166 192.168.1.24 172.217.17.238 > GET google.com / HTTP/1.1 - - 2022-06-22 16:38:12.199 172.217.17.238 192.168.1.24 < - - - HTTP/1.0 400 Bad Request 2022-06-22 16:38:23.090 192.168.1.24 172.217.17.238 > POST google.com / HTTP/1.1 - - 2022-06-22 16:38:23.163 172.217.17.238 192.168.1.24 < - - - HTTP/1.1 405 Method Not Allowed

Thursday, June 23, 2022 閱讀
Hero Image
在瀏覽器輸入網址並送出後,到底發生了什麼事?

在瀏覽器輸入網址並送出後,到底發生了什麼事?

Sunday, July 18, 2021 閱讀
Hero Image
具有代表性的 HTTP 状态码

具有代表性的 HTTP 状态码

Friday, December 15, 2017 閱讀
導覽列
  • 關於
  • 技能
  • 經歷
  • 學歷
  • 專案
聯絡方式:
  • zeyanlin@outlook.com
  • linzeyan
  • Ricky
  • Ricky