tcpick(8)
π tcpick π β the manual, but make it make sense
okay bestie, listen. this is the manual page for tcpick, straight out of the System Manager's Manual, section 8. yes, that section 8, the sysadmin one. we're doing this together and we're gonna have fun, i promise. π«Ά
β¨ NAME β¨
tcpick β tcp stream sniffer and connection tracker
like, it sniffs tcp streams. and it tracks connections. that's the whole vibe. π
πΈ SYNOPSIS πΈ
tcpick [ -a ] [ -n ] [ -C ]
[ -e count ]
[ -i interface | -r file ]
[ -X timeout ]
[ -D ] [ -F1 | -F2 ]
[ -yH | -yP | -yR | -yU | -yx | -yX ]
[ -bH | -bP | -bR | -bU | -bx | -bX ]
[ -wH[ub] | -wP[ub] | -wR[ub] | -wU[ub] ]
[ -v [ verbosity ]] [ -S ] [ -h ]
[ --separator ]
[ -T | -Tf [ number ]]
[ -E | -Ef [ number ]]
[ -Pc | -Ps ]
[ "filter" ]
[ --help ] [ --version ]
π¦ DESCRIPTION π¦
so. tcpick is a textmode sniffer built on libpcap. it tracks tcp streams, and it can save whatever data it catches into different files β one file for every single connection, no cap β or it can just show you that data right there in your terminal in a bunch of different formats (hexdump, printable characters, rawβ¦ you get the range π
).
it's genuinely so useful for picking files in a passive way. like, it is useful for keeping track of what the users of a network are doing, and it plays so nicely with textmode tools like grep, sed, awk. it's giving pipeline main character energy fr fr.
Happy data hunting :-) π
π BASE OPTIONS π
-i,--interface_interface_ β listen on the interface you picked, i.e.ppp0oreth0. and here's the thing: if you justβ¦ don't pass-iat all, tcpick is smart enough to select the first open interface all by itself (usually a ethernet card). iconique behavior honestly.-r,--readfileβ reads raw packets from a file instead of using a network device. specifically, a file that was written withtcpdump -w. yes bestie, you can replay the past. π°οΈ"filter"β this is the filter for the capturer engine. you set it up the exact same way you'd set the filter fortcpdump(1). go read thetcpdump(1)manpage for the other explanations, it's all there. π-aβ Displays host names instead of ip addresses. > Warning: for every new ip grabbed a dns query will be generated! Use it carefully on high-traffic network devices! π¨ so like, on a busy network this is a lot of dns queries. be mindful, bestie.-C,--colorsβ Uses terminal colors: very nice! π It should help you to read the output oftcpick. (they're right, it does.)-D_number_,--dirs_number_ β Create directories to store sniffed sessions. When a directory contains _number_ sessions, a new one will be created. π-e_count_ β Exits when _count_ packets have been sniffed. bye when the count hits. π-E_number_ β Exit when _number_ sniffed connections are detected as"CLOSED".-Ef_number_ β Exit when the first _number_ connections are detected as"CLOSED".-F1-F2,--filenaming 1|2β Choose the filenaming system. two options, pick your fighter:-F1:tcpick_clientip_serverip.side.dat(side meansclnt,servorboth)-F2:tcpick_connectionnumber_clientip_serverip.side.dat
-hβ Shows source and destination ip and port; shows tcp flags as letters. π€--helpβ Displays a short help summary.-pβ Don't put the network interface in promiscuous mode. > Note that the interface might be in promiscuous mode for some other reason. so like, don't assume it's not. it might be. π-Sβ Suppresses the"status of the connection"banner. silence is golden. π€«--separatorβ Add a separator for the payloads displayed. cute little divider, but for packets.-tβ Adds timestamp inhour:minutes:seconds:microsecondsformat. β°-tdβ Like-twith date timestamp inday-month-yearformat. π-T_number_ β Track _number_ connections. It could be very useful on a high-traffic network device. If _number_ is not specified, it will be set to1.-Tf_number_ β Track only the first _number_ connections; the following will be discarded. If _number_ is not specified, it will be set to1.-v_verbosity_ β Quite useless, yet. Set verbosity level. Actually there are not really many extra messages to display, this means it is enabled by default (-v1). Set verbosity level to0to suppress extra messages (-v0) except error messages. Set verbosity level to5to display debug messages (-v5). There are not other verbosity levels. so like,0, default, or5. that's the whole menu. π-X_timeout_ β Connections are consideredEXPIREDwhen there is no traffic for at least _timeout_ seconds. Default is600.--versionβ Displays thetcpickversion.
π₯ DISPLAY THE DATA IN THE TCP PACKETS π₯
okay so these options all start with -y, and they're here to show you the content of the sniffed packet (the data, which we call the payload) in various ways, once it arrives at the listening interface. π«
and here's the important part: the way these work, the tcp duplicates will not be discarded and the packets will not be reordered β everything gets displayed "as is". if what you actually want is a fully acknowledged stream, go look at the -w and -b set of options instead. iykyk. π
-yHβ View data in hexadecimal-spaced mode (for the hexdump see-yxand-yXoptions.-yPβ Shows data contained in the tcp packets. Non-printable characters are transformed in dots:".". Newline character is preserved. This is the best way, in my opinion, to show data like HTTP requests, IRC communication, SMTP stuff and so on. π-yRβ Displays all kind of characters, printable and non printable. > If something binary is transmitted, the effect will probably be like watching with"cat"at a gzipped file. π yeah. exactly that energy. you've been warned.-yxβ Shows all data after the header in hexadecimal dump of 16 bytes per line.-yXβ Shows all data after the header in hexadecimal and ascii dump with 16 bytes per line.-yUβ Shows all data after the header, but Unprintable characters are displayed as hexadecimal values between a"<"and a">"symbol.
π§ REBUILD AND WRITE THE TCP STREAM TO FILE π§
the prefix for these options is -w. the TCP stream that has been sniffed with these options will be written to file named:
client_<ip_client>_<ip_server>_<port_server>.tcpick
server_<ip_client>_<ip_server>_<port_server>.tcpick
With the u flag of the -w option (i.e. -wRu) both client and server data will be written to a unique file named in that way:
<ip_client>_<ip_server>_<port_server>.tcpick
If you use the additional flag b of the -w option (i.e. -wPub), in the file will be written this banner:
[client|server] offset before:offset after (length of rebuilded segment)
to distinguish between client and server data. π·οΈ
The flow is rebuilded, reordered and the duplicates are dropped. and the way that this slays is: it is possible to sniff entire files transmitted via ftp without data corruption (you can see this with md5sum). π€―
If no argument is given to -w the data will be written like -wR. You can decide to write only client or server data by setting the flag C (output only client data) and S (output only server data) to the -w set.
-wRβ This is the preferred option: data will be written without any changes. Useful for sniffing binary or compressed files. (-wRConly the client,-wRSonly the server)-wPβ Unprintable characters are written like dots. (-wPConly the client,-wPSonly the server)-wUβ Unprintable characters are displayed as hexadecimal values between a"<"and a">"symbol. (-wPConly the client,-wPSonly the server)-wHβ The flow is written in hexadecimal-spaced mode. (-wHConly the client,-wHSonly the server)
π DISPLAY THE REBUILDED TCP STREAM π
the prefix for these options is -b. this set of options is very useful if you want to redirect the sniffed flow to anoter program with a pipe, and there should be no data corruption. π«§
of course the most useful one is -bR to show the data as they are (raw). and a very useful feature is the flag C (output only client data) and S (output only server data). I.e.: -bRC will display only the data from the client in raw mode; in that way you can put them in a file with a pipe redirection. π
The sub-options are quite the same of the -y set, so you have:
-bHβ hex-spaced (-bHConly the client,-bHSonly the server)-bPβ unprintable displayed as dots (-bPConly the client,-bPSonly the server)-bRβ raw mode (-bRConly the client,-bRSonly the server)-bUβ unprintable as<hex>. (-bUConly the client,-bUSonly the server)-bxβ hexdump (-bxConly the client,-bxSonly the server)-bUβ hexdump + ascii (-bXConly the client,-bXSonly the server)-PC,--pipe clientβ This is an alias for-bRC -S -v0 -Tf1 -Ef1. With this option you are able to track only the first connection (-T1) matched bytcpickand data are displayed as raw. Only data from the client are put on stdout. All messages and banners are suppressed, except error messages (-S -v0), so this option is particularly useful to download an entire fully rebuilded and acknowledged connection. π«Ά-PS,--pipe serverβ This is an alias for-bRS -S -v0 -Tf1 -Ef1.
π EXAMPLES π
how to display the connection status:
# tcpick -i eth0 -C
display the payload and packet headers:
# tcpick -i eth0 -C -yP -h -a
display client data only of the first smtp connection:
# tcpick -i eth0 -C -bCU -T1 "port 25"
download a file passively:
# tcpick -i eth0 -wR "port ftp-data"
log http data in unique files (client and server mixed together):
# tcpick -i eth0 "port 80" -wRub
redirect the first connection to a software:
# tcpick -i eth0 --pipe client "port 80" | gzip >
http_response.gz
# tcpick -i eth0 --pipe server "port 25" | nc foobar.net 25
π MAILING-LIST π
- Address:
<tcpick-project[a]lists.sourceforge.net> - Archive:
http://sourceforge.net/mailarchive/forum.php?forum=tcpick-project - Subscribe:
http://lists.sourceforge.net/lists/listinfo/tcpick-project
If you have new ideas, patches, feature requests or simply need help, don't wait! I will be grateful if you send a message to the mailing list (even if you want to say what you liked most on tcpick). π₯Ή
β TCPICK WEBSITE β
The tcpick website is at http://tcpick.sf.net.
You can find the project page here: http://sourceforge.net/projects/tcpick kindly hosted by the sourceforge team. π
π AUTHORS π
Please check AUTHORS file.
π BUGS π
Tcpick is an experimental software, and maybe some bugs are described in the KNOWN-BUGS file.
On some versions of MacOSX Segmentation Fault happens and connections aren't tracked properly.
If you find any other bug, please write to the tcpick mailing list. π
π SEE ALSO π
Other nice packet/data sniffers:
tcpdump, ngrep, tcptrack, ettercap, ethereal, snort
π LICENSE π
okay bestie this is the part where the lawyers get their moment and honestly? it's kind of iconic. β¨
This program is free software β you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. slay, freedom fr fr ποΈ
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. yeah so β no promises, no cap. π See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., and the address is:
Free Software Foundation, Inc.
59 Temple Place - Suite 330
Boston, MA 02111, USA.
π tl;dr β it's GPL v2-or-later, it comes with absolutely zero warranty, and if you somehow don't have a copy of the license lying around you can just write to the FSF at that address above. that's it. that's the whole vibe.
and that's a wrap on the whole page, bestie!! π you made it all the way to the end, which is honestly main character energy π this whole thing was the tcpick(8) manual page, and that last little line down at the bottom β the one with the page name, the source and version info, and the date? yeah, that's just the footer doing its quiet little cameo. not me getting emotional over a manpage footer ππ¦
go forth and sniff some streams responsibly, fr fr π π
π¦ where this page comes from
- debian bookworm: tcpick 0.2.1-10 Β· GPL-2.0-only
- debian trixie: tcpick 0.2.1-11+b2 Β· GPL-2.0-only
- ubuntu jammy: tcpick 0.2.1-10 Β· GPL-2.0-only
- ubuntu noble: tcpick 0.2.1-11build2 Β· GPL-2.0-only
- ubuntu questing: tcpick 0.2.1-12
- ubuntu resolute: tcpick 0.2.1-12build1 Β· GPL-2.0-only
- ubuntu stonking: tcpick 0.2.1-12build1 Β· GPL-2.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms