tshark | Using the Example Extcap from the Documentation

by pocc
macOS ◆ xterm-256color ◆ bash 2957 views

Description

This asciicast goes over how to use the extcap_example.py in the wireshark repo: https://github.com/wireshark/wireshark/blob/master/doc/extcap_example.py

The aim is to assist readers unfamiliar with extcaps on how they are expected to work and what expected behavior might look like for reader-created extcaps.

Transcript

# === Using the example extcap provided by wireshark ===
# This script is from the repo (github.com/wireshark/wireshark) in /docs
# Per docs, this utility will create random IPv4 packets

cd /tmp
mkfifo myfifo # extcaps require a FIFO

# Download script from repo
curl -O https://raw.githubusercontent.com/wireshark/wireshark/master/doc/extcap_example.py

# Let's check out the options
python extcap_example.py --help | less

# Let's list the interfaces as one is required
python extcap_example.py --extcap-interfaces

# Let's use the example1 interface and start capture with --capture
# A delay isn't required, but changing it to 1(s) saves time
python extcap_example.py --extcap-interface=example1 --fifo=myfifo --delay=1 --capture &
tshark -i myfifo

# wireshark -k -i myfifo can also used to see this traffic

More by pocc

capinfos usage 02:35

by pocc

Editing hex in vim (xxd -p) 00:56

by pocc

Editing hex with vim 00:51

by pocc featured

Falcon Heavy Rocket 00:14

by pocc

See all