LoginSignup
3
2

More than 5 years have passed since last update.

ngrepでパケットキャプチャ

Last updated at Posted at 2014-02-24

多分tcpdump使ったほうがいい。

キャプチャー開始
sudo ngrep 'POST /' -q  -W single -d br0 port 8000 -N

interface: br0 (192.168.100.0/255.255.255.0)
filter: (ip or ip6) and ( port 8000 )
match: POST /

別のサーバからPOST送信
curl http://192.168.100.62:8000/ -X POST -d "user_name=hoge" -d "user_pass=jfi23j9"
  • 自分自身からの接続では(この設定だと)取得できません。
キャプチャー結果
T(6) 192.168.100.3:45135 -> 192.168.100.62:8000 [AP] POST /index.php HTTP/1.1..User-Agent: curl/7.30.0..Host: 192.168.100.62:8000..Accept: */*..Content-Length: 32..Content-Type: application/x-www-form-urlencoded....user_name=hoge&user_pass=jfi23j9
3
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
2