Back to Termshark

Termshark

README.md

2.4.019.8 KB
Original Source

Termshark

A terminal user-interface for tshark, inspired by Wireshark.

V2.4 is out now with packet search and profiles for colors and columns! See the ChangeLog.

If you're debugging on a remote machine with a large pcap and no desire to scp it back to your desktop, termshark can help!

Features

  • Read pcap files or sniff live interfaces (where tshark is permitted)
  • Filter pcaps or live captures using Wireshark's display filters
  • Reassemble and inspect TCP and UDP flows
  • View network conversations by protocol
  • Copy ranges of packets to the clipboard from the terminal
  • Written in Golang, compiles to a single executable on each platform - downloads available for Linux, macOS, BSD variants, Android (termux) and Windows

tshark has many more features that termshark doesn't expose yet! See What's Next.

Install Packages

Termshark is pre-packaged for the following platforms: Arch Linux, Debian (unstable), FreeBSD, Homebrew, MacPorts, Kali Linux, NixOS, SnapCraft, Termux (Android) and Ubuntu.

Building

Termshark uses Go modules. Set GO111MODULE=on then run:

bash
go install github.com/gcla/termshark/v2/cmd/[email protected]

For versions of Go between 1.14 and 1.17, use

bash
go get github.com/gcla/termshark/v2/cmd/termshark

Then add ~/go/bin/ to your PATH.

For all packet analysis, termshark depends on tshark from the Wireshark project. Make sure tshark is in your PATH.

Quick Start

Inspect a local pcap:

bash
termshark -r test.pcap

Capture ping packets on interface eth0:

bash
termshark -i eth0 icmp

Run termshark -h for options.

Downloads

Pre-compiled executables are available via Github releases. Or download the latest build from the master branch - .

Documentation

See the termshark user guide, and my best guess at some FAQs. For a summary of updates, see the ChangeLog.

Dependencies

Termshark depends on these open-source packages:

  • tshark - command-line network protocol analyzer, part of Wireshark
  • tcell - a cell based terminal handling package, inspired by termbox
  • gowid - compositional terminal UI widgets, inspired by urwid, built on tcell

Note that tshark is a run-time dependency, and must be in your PATH for termshark to function. Version 1.10.2 or higher is required (approx 2013).

Contributors

Thanks to everyone that's contributed ports, patches and effort!

<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section --> <!-- prettier-ignore-start --> <!-- markdownlint-disable --> <table> <tr> <td align="center"><a href="https://swit.sh"> <sub><b>Ross Jacobs</b></sub></a> <a href="https://github.com/gcla/termshark/commits?author=pocc" title="Code">πŸ’»</a> <a href="https://github.com/gcla/termshark/issues?q=author%3Apocc" title="Bug reports">πŸ›</a> <a href="#userTesting-pocc" title="User Testing">πŸ““</a></td> <td align="center"><a href="https://github.com/Hongarc"> <sub><b>Hongarc</b></sub></a> <a href="https://github.com/gcla/termshark/commits?author=Hongarc" title="Documentation">πŸ“–</a></td> <td align="center"><a href="https://github.com/zi0r"> <sub><b>Ryan Steinmetz</b></sub></a> <a href="#platform-zi0r" title="Packaging/porting to new platform">πŸ“¦</a></td> <td align="center"><a href="https://sΓΈb.org/"> <sub><b>Nicolai SΓΈborg</b></sub></a> <a href="#platform-NicolaiSoeborg" title="Packaging/porting to new platform">πŸ“¦</a></td> <td align="center"><a href="https://qulogic.gitlab.io/"> <sub><b>Elliott Sales de Andrade</b></sub></a> <a href="https://github.com/gcla/termshark/commits?author=QuLogic" title="Code">πŸ’»</a></td> <td align="center"><a href="http://rski.github.io"> <sub><b>Romanos</b></sub></a> <a href="https://github.com/gcla/termshark/commits?author=rski" title="Code">πŸ’»</a></td> <td align="center"><a href="https://github.com/denyspozniak"> <sub><b>Denys</b></sub></a> <a href="https://github.com/gcla/termshark/issues?q=author%3Adenyspozniak" title="Bug reports">πŸ›</a></td> </tr> <tr> <td align="center"><a href="https://github.com/jerry73204"> <sub><b>jerry73204</b></sub></a> <a href="#platform-jerry73204" title="Packaging/porting to new platform">πŸ“¦</a></td> <td align="center"><a href="http://thann.github.com"> <sub><b>Jon Knapp</b></sub></a> <a href="#platform-Thann" title="Packaging/porting to new platform">πŸ“¦</a></td> <td align="center"><a href="https://github.com/mharjac"> <sub><b>Mario Harjac</b></sub></a> <a href="#platform-mharjac" title="Packaging/porting to new platform">πŸ“¦</a></td> <td align="center"><a href="https://github.com/abenson"> <sub><b>Andrew Benson</b></sub></a> <a href="https://github.com/gcla/termshark/issues?q=author%3Aabenson" title="Bug reports">πŸ›</a></td> <td align="center"><a href="https://github.com/sagis-tikal"> <sub><b>sagis-tikal</b></sub></a> <a href="https://github.com/gcla/termshark/issues?q=author%3Asagis-tikal" title="Bug reports">πŸ›</a></td> <td align="center"><a href="https://github.com/punkymaniac"> <sub><b>punkymaniac</b></sub></a> <a href="https://github.com/gcla/termshark/issues?q=author%3Apunkymaniac" title="Bug reports">πŸ›</a></td> <td align="center"><a href="https://github.com/msenturk"> <sub><b>msenturk</b></sub></a> <a href="https://github.com/gcla/termshark/issues?q=author%3Amsenturk" title="Bug reports">πŸ›</a></td> </tr> <tr> <td align="center"><a href="https://github.com/szuecs"> <sub><b>Sandor SzΓΌcs</b></sub></a> <a href="https://github.com/gcla/termshark/issues?q=author%3Aszuecs" title="Bug reports">πŸ›</a></td> <td align="center"><a href="https://github.com/dawidd6"> <sub><b>Dawid Dziurla</b></sub></a> <a href="https://github.com/gcla/termshark/issues?q=author%3Adawidd6" title="Bug reports">πŸ›</a> <a href="#platform-dawidd6" title="Packaging/porting to new platform">πŸ“¦</a></td> <td align="center"><a href="https://github.com/jJit0"> <sub><b>jJit0</b></sub></a> <a href="https://github.com/gcla/termshark/issues?q=author%3AjJit0" title="Bug reports">πŸ›</a></td> <td align="center"><a href="http://colinrogers001.com"> <sub><b>inzel</b></sub></a> <a href="https://github.com/gcla/termshark/issues?q=author%3Ainzel" title="Bug reports">πŸ›</a></td> <td align="center"><a href="https://github.com/thejerrod"> <sub><b>thejerrod</b></sub></a> <a href="#ideas-thejerrod" title="Ideas, Planning, & Feedback">πŸ€”</a></td> <td align="center"><a href="https://github.com/gdluca"> <sub><b>gdluca</b></sub></a> <a href="https://github.com/gcla/termshark/issues?q=author%3Agdluca" title="Bug reports">πŸ›</a></td> <td align="center"><a href="https://github.com/winpat"> <sub><b>Patrick Winter</b></sub></a> <a href="#platform-winpat" title="Packaging/porting to new platform">πŸ“¦</a></td> </tr> <tr> <td align="center"><a href="https://github.com/RobertLarsen"> <sub><b>Robert Larsen</b></sub></a> <a href="#ideas-RobertLarsen" title="Ideas, Planning, & Feedback">πŸ€”</a> <a href="#userTesting-RobertLarsen" title="User Testing">πŸ““</a></td> <td align="center"><a href="https://mingrammer.com"> <sub><b>MinJae Kwon</b></sub></a> <a href="https://github.com/gcla/termshark/issues?q=author%3Amingrammer" title="Bug reports">πŸ›</a></td> <td align="center"><a href="https://github.com/the-c0d3r"> <sub><b>the-c0d3r</b></sub></a> <a href="#ideas-the-c0d3r" title="Ideas, Planning, & Feedback">πŸ€”</a></td> <td align="center"><a href="https://github.com/gvanem"> <sub><b>Gisle Vanem</b></sub></a> <a href="https://github.com/gcla/termshark/issues?q=author%3Agvanem" title="Bug reports">πŸ›</a></td> <td align="center"><a href="https://github.com/hook-s3c"> <sub><b>hook</b></sub></a> <a href="https://github.com/gcla/termshark/issues?q=author%3Ahook-s3c" title="Bug reports">πŸ›</a></td> <td align="center"><a href="https://twitter.com/_lennart"> <sub><b>Lennart Koopmann</b></sub></a> <a href="#ideas-lennartkoopmann" title="Ideas, Planning, & Feedback">πŸ€”</a></td> <td align="center"><a href="https://keybase.io/cfernandez"> <sub><b>Fernandez, ReK2</b></sub></a> <a href="https://github.com/gcla/termshark/issues?q=author%3AReK2Fernandez" title="Bug reports">πŸ›</a></td> </tr> <tr> <td align="center"><a href="https://github.com/mazball"> <sub><b>mazball</b></sub></a> <a href="#ideas-mazball" title="Ideas, Planning, & Feedback">πŸ€”</a></td> <td align="center"><a href="https://github.com/wfailla"> <sub><b>wfailla</b></sub></a> <a href="#ideas-wfailla" title="Ideas, Planning, & Feedback">πŸ€”</a></td> <td align="center"><a href="https://github.com/rongyi"> <sub><b>荣怑</b></sub></a> <a href="#ideas-rongyi" title="Ideas, Planning, & Feedback">πŸ€”</a></td> <td align="center"><a href="https://github.com/thebyrdman-git"> <sub><b>thebyrdman-git</b></sub></a> <a href="https://github.com/gcla/termshark/issues?q=author%3Athebyrdman-git" title="Bug reports">πŸ›</a></td> <td align="center"><a href="http://www.mi.fu-berlin.de/en/inf/groups/ilab/members/mosig.html"> <sub><b>Clemens Mosig</b></sub></a> <a href="https://github.com/gcla/termshark/issues?q=author%3Acmosig" title="Bug reports">πŸ›</a></td> <td align="center"><a href="http://www.cipherdyne.org/"> <sub><b>Michael Rash</b></sub></a> <a href="#userTesting-mrash" title="User Testing">πŸ““</a></td> <td align="center"><a href="https://github.com/joelparker"> <sub><b>joelparker</b></sub></a> <a href="#userTesting-joelparker" title="User Testing">πŸ““</a></td> </tr> <tr> <td align="center"><a href="https://github.com/dragosmaftei"> <sub><b>Dragos Maftei</b></sub></a> <a href="#ideas-dragosmaftei" title="Ideas, Planning, & Feedback">πŸ€”</a></td> <td align="center"><a href="http://www.giassa.net"> <sub><b>Matthew Giassa</b></sub></a> <a href="#ideas-IAXES" title="Ideas, Planning, & Feedback">πŸ€”</a></td> <td align="center"><a href="https://github.com/sean-abbott"> <sub><b>Sean Abbott</b></sub></a> <a href="#platform-sean-abbott" title="Packaging/porting to new platform">πŸ“¦</a></td> <td align="center"><a href="http://www.linsong.org"> <sub><b>Vincent Wang</b></sub></a> <a href="#ideas-linsong" title="Ideas, Planning, & Feedback">πŸ€”</a></td> <td align="center"><a href="https://github.com/Piping"> <sub><b>piping</b></sub></a> <a href="#ideas-Piping" title="Ideas, Planning, & Feedback">πŸ€”</a></td> <td align="center"><a href="https://github.com/kevinhwang91"> <sub><b>kevinhwang91</b></sub></a> <a href="#ideas-kevinhwang91" title="Ideas, Planning, & Feedback">πŸ€”</a> <a href="https://github.com/gcla/termshark/issues?q=author%3Akevinhwang91" title="Bug reports">πŸ›</a></td> <td align="center"><a href="https://jbo.io"> <sub><b>Justin Overfelt</b></sub></a> <a href="#ideas-jboverfelt" title="Ideas, Planning, & Feedback">πŸ€”</a></td> </tr> <tr> <td align="center"><a href="https://github.com/loudsong"> <sub><b>Anthony</b></sub></a> <a href="#ideas-loudsong" title="Ideas, Planning, & Feedback">πŸ€”</a></td> <td align="center"><a href="https://github.com/basondole"> <sub><b>basondole</b></sub></a> <a href="https://github.com/gcla/termshark/issues?q=author%3Abasondole" title="Bug reports">πŸ›</a></td> <td align="center"><a href="https://github.com/zoulja"> <sub><b>zoulja</b></sub></a> <a href="https://github.com/gcla/termshark/issues?q=author%3Azoulja" title="Bug reports">πŸ›</a></td> <td align="center"><a href="https://github.com/freddii"> <sub><b>freddii</b></sub></a> <a href="https://github.com/gcla/termshark/issues?q=author%3Afreddii" title="Bug reports">πŸ›</a></td> <td align="center"><a href="https://github.com/thordy"> <sub><b>Thord Setsaas</b></sub></a> <a href="https://github.com/gcla/termshark/commits?author=thordy" title="Documentation">πŸ“–</a></td> <td align="center"><a href="https://github.com/deliciouslytyped"> <sub><b>deliciouslytyped</b></sub></a> <a href="https://github.com/gcla/termshark/issues?q=author%3Adeliciouslytyped" title="Bug reports">πŸ›</a></td> <td align="center"><a href="https://github.com/factorion"> <sub><b>factorion</b></sub></a> <a href="#platform-factorion" title="Packaging/porting to new platform">πŸ“¦</a></td> </tr> <tr> <td align="center"><a href="https://github.com/herbygillot"> <sub><b>Herby Gillot</b></sub></a> <a href="#platform-herbygillot" title="Packaging/porting to new platform">πŸ“¦</a></td> <td align="center"><a href="https://github.com/nmeum"> <sub><b>nmeum</b></sub></a> <a href="#ideas-nmeum" title="Ideas, Planning, & Feedback">πŸ€”</a></td> <td align="center"><a href="https://deftly.net"> <sub><b>Aaron Bieber</b></sub></a> <a href="#ideas-qbit" title="Ideas, Planning, & Feedback">πŸ€”</a></td> <td align="center"><a href="https://github.com/elig0n"> <sub><b>elig0n</b></sub></a> <a href="#ideas-elig0n" title="Ideas, Planning, & Feedback">πŸ€”</a></td> <td align="center"><a href="https://github.com/luzpaz"> <sub><b>luzpaz</b></sub></a> <a href="https://github.com/gcla/termshark/commits?author=luzpaz" title="Documentation">πŸ“–</a></td> <td align="center"><a href="https://github.com/uzxmx"> <sub><b>uzxmx</b></sub></a> <a href="https://github.com/gcla/termshark/commits?author=uzxmx" title="Code">πŸ’»</a></td> </tr> </table> <!-- markdownlint-restore --> <!-- prettier-ignore-end --> <!-- ALL-CONTRIBUTORS-LIST:END -->

Contact

License