Tcpdump使用記錄

參考:http://blog.xuite.net/jyoutw/xtech/23669726-tcpdump+%E7%9A%84%E7%94%A8%E6%B3%95

* 擷取網路介面封包
這個用途是監聽lo0這個網路介面的封包,只要目地是127.0.0.1的3000 port的tcp封包
都記錄下來並且將檔案記錄在packet這個檔案之中

-A : 封包的內容以 ASCII 顯示
-X : 可以列出十六進位 (hex) 以及 ASCII 的封包內容
-v : 比較詳細的資料


$> sudo tcpdump -AXnvi lo0 'dst 127.0.0.1 and tcp and port 3000' -w packet 

* 檢視封包內容

$> tcpdump -nnXr packet | less

留言

熱門文章