LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

tcpflow

TCP flow recorder

TLDR

Capture and display traffic on interface and port
$ tcpflow -c -i [eth0] port [80]
copy
Read flows from a pcap file
$ tcpflow -r [path/to/capture.pcap] -o [output_dir]
copy
Capture with colored console output (blue=client, red=server)
$ tcpflow -c -g -i [eth0]
copy
Limit capture to max bytes per flow
$ tcpflow -b [10000] -i [eth0] port [443]
copy
Strip non-printable characters in console output
$ tcpflow -c -s -i [eth0]
copy

SYNOPSIS

tcpflow [OPTIONS] [EXPRESSION]

DESCRIPTION

tcpflow captures TCP traffic and reconstructs data streams for debugging and analysis. Unlike packet sniffers that show individual packets, tcpflow reassembles TCP connections into complete data flows.Each TCP flow is saved to a separate file named by source and destination addresses/ports, making it easy to analyze individual connections.

PARAMETERS

-c

Console print with source/dest header (don't create files)
-C
Console print without header (don't create files)
-i INTERFACE
Capture on specified network interface
-r FILE
Read from pcap file instead of live capture
-o DIR
Output directory for flow files
-b MAXBYTES_
Capture no more than max_bytes per flow
-e SCANNER
Enable specific scanner
-s
Strip non-printable characters (replace with '.')
-g
Colorized console output (blue=client, red=server)
-D
Console output in hex
-d LEVEL
Debug level (0=silent, 1=default)
-f MAXFDS_
Maximum number of file descriptors to use
-p
Do not put interface into promiscuous mode
-q
Quiet mode, suppress warnings
-P
No purge of closed connections from hash table

INSTALL

sudo apt install tcpflow
copy
sudo dnf install tcpflow
copy
sudo pacman -S tcpflow
copy
sudo apk add tcpflow
copy
sudo zypper install tcpflow
copy
brew install tcpflow
copy
nix profile install nixpkgs#tcpflow
copy

CAVEATS

Requires root privileges or appropriate capabilities. Uses libpcap filter expressions. Only captures TCP traffic, not UDP or other protocols. Large captures can consume significant disk space.

HISTORY

tcpflow was created by Jeremy Elson and is designed for forensic analysis and debugging of network applications by reconstructing TCP sessions.

SEE ALSO

tcpdump(8), wireshark(1), tcpick(8), nmap(1)

Braincup
Open source brain training for math, memory and focus
Braincup mini-games
41 mini-games · Apache-2.0
No ads · No tracking
Play in browser
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid
276 stars
From the maker of Linux Command Library
Copied to clipboard
Braincup
Open source brain training for math, memory and focus. 41 mini-games, from mental arithmetic to Sudoku, N-Back and Solo Chess.
Apache-2.0 licensed · No ads · No tracking · No account
From the maker of Linux Command Library
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid