[Introduction]
How to use TSHARK to capture the network packet for deeper analysis.
[Preperation]
Install Wireshark package.
sudo yum install wireshark -y
[Instruction]
+ List network interface to capture the network packet from
sudo tshark -D
1. eth0
2. nflog
3. nfqueue
4. any
5. lo (Loopback)
+ Run tshark with options to capture.
-i : interface. number or interface name
-f : filter
-w: write file
sudo tshark -i 1 -f "host 10.x.x.x" -w output.pcap
sudo tshark -i wlan0 -f "src port 53" -w output.pcap
+ To read PCAP with tshark
sudo tshark -r output.pcap
Comments
Post a Comment