Forrest logo
back to the tshark tool

tshark:tldr:b0a83

tshark: Decode a TCP port using a specific protocol (e.g. HTTP).
$ tshark -d tcp.port==${8888},${http}
try on your machine

The command tshark -d tcp.port==${8888},${http} is used to capture network traffic using the "tshark" protocol analyzer tool.

Here's a breakdown of the command:

  • tshark: This is the command-line interface for Wireshark, a widely-used network protocol analyzer. Tshark allows you to capture and analyze network traffic.

  • -d tcp.port==${8888},${http}: This option specifies the display filter to be applied during the capture.

    • tcp.port==${8888}: This filter captures network traffic on TCP port 8888. It filters out any packets that are not using this specific port. You can replace ${8888} with any other port number you want to capture. The double equals sign == is used to specify an exact match for the port number.

    • ,${http}: This is an additional filter that can be specified after the port filter. In this case, ,${http} filters out any packets that are not using the HTTP protocol (hypertext transfer protocol). You can replace ${http} with other protocol filters like telnet, ftp, etc. The comma , is used to separate multiple filters.

Overall, this command captures network traffic on a specific TCP port (8888) and filters out packets that are not using the HTTP protocol.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the tshark tool