From eb7224387bf6dacbaa99d8d38f3aecc79b18c7e9 Mon Sep 17 00:00:00 2001 From: Ming Chen Date: Sun, 3 Dec 2017 08:22:45 -0800 Subject: [PATCH 1/2] Add -D and -r from tcpdump --- pages/common/tcpdump.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pages/common/tcpdump.md b/pages/common/tcpdump.md index 79ac5fd7d..3abf591ca 100644 --- a/pages/common/tcpdump.md +++ b/pages/common/tcpdump.md @@ -2,6 +2,10 @@ > Dump traffic on a network. +- List available network interfaces: + +`tcpdump -D` + - Capture the traffic of a specific interface: `tcpdump -i {{eth0}}` @@ -25,3 +29,7 @@ - Capture all traffic except traffic over port 22 and save to a dump file: `tcpdump -w dumpfile.pcap not port 22` + +- Read from an exist dump file: + +`tcpdump -r dumpfile.pcap` From 1ba5e9aa1575928eb907bbaf11482f3ef6c4e675 Mon Sep 17 00:00:00 2001 From: Ming Chen Date: Mon, 4 Dec 2017 13:43:33 -0800 Subject: [PATCH 2/2] tcpdump: Add {{}} token to command arguments. --- pages/common/tcpdump.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pages/common/tcpdump.md b/pages/common/tcpdump.md index 3abf591ca..5eb6baca2 100644 --- a/pages/common/tcpdump.md +++ b/pages/common/tcpdump.md @@ -20,7 +20,7 @@ - Capture the traffic from a specific interface, source, destination and destination port: -`tcpdump -i {{eth0}} src {{192.168.1.1}} and dst {{192.168.1.2}} and dst port 80` +`tcpdump -i {{eth0}} src {{192.168.1.1}} and dst {{192.168.1.2}} and dst port {{80}}` - Capture the traffic of a network: @@ -28,8 +28,8 @@ - Capture all traffic except traffic over port 22 and save to a dump file: -`tcpdump -w dumpfile.pcap not port 22` +`tcpdump -w {{dumpfile.pcap}} not port {{22}}` -- Read from an exist dump file: +- Read from a given dump file: -`tcpdump -r dumpfile.pcap` +`tcpdump -r {{dumpfile.pcap}}`