1EXTCAP(4)                                                            EXTCAP(4)
2
3
4

NAME

6       extcap - The extcap interface
7

DESCRIPTION

9       The extcap interface is a versatile plugin interface that allows
10       external binaries to act as capture interfaces directly in Wireshark.
11       It is used in scenarios, where the source of the capture is not a
12       traditional capture model (live capture from an interface, from a pipe,
13       from a file, etc). The typical example is connecting esoteric hardware
14       of some kind to the main Wireshark application.
15
16       Without extcap, a capture can always be achieved by directly writing to
17       a capture file:
18
19           the-esoteric-binary --the-strange-flag --interface=stream1 --file dumpfile.pcap &
20           wireshark dumpfile.pcap
21
22       but the extcap interface allows for such a connection to be easily
23       established and configured using the Wireshark GUI.
24
25       The extcap subsystem is made of multiple extcap binaries that are
26       automatically called by the GUI in a row. In the following chapters we
27       will refer to them as "the extcaps".
28
29       Extcaps may be any binary or script within the extcap directory. Please
30       note, that scripts need to be executable without prefacing a script
31       interpreter before the call.
32
33       WINDOWS USERS: Because of restrictions directly calling the script may
34       not always work. In such a case, a batch file may be provided, which
35       then in turn executes the script. Please refer to doc/extcap_example.py
36       for more information.
37
38       When Wireshark launches an extcap, it automatically adds its
39       installation path (normally C:\Program Files\Wireshark\) to the DLL
40       search path so that the extcap library dependencies can be found (it is
41       not designed to be launched by hand). This is done on purpose. There
42       should only be extcap programs (executables, Python scripts, ...) in
43       the extcap folder to reduce the startup time and not have Wireshark
44       trying to execute other file types.
45

GRAMMAR ELEMENTS

47       Grammar elements:
48
49       arg (options)
50           argument for CLI calling
51
52       number
53           Reference # of argument for other values, display order
54
55       call
56           Literal argument to call (--call=...)
57
58       display
59           Displayed name
60
61       default
62           Default value, in proper form for type
63
64       range
65           Range of valid values for UI checking (min,max) in proper form
66
67       type
68
69           Argument type for UI filtering for raw, or UI type for selector:
70
71               integer
72               unsigned
73               long (may include scientific / special notation)
74               float
75               selector (display selector table, all values as strings)
76               boolean (display checkbox)
77               radio (display group of radio buttons with provided values, all values as strings)
78               fileselect (display a dialog to select a file from the filesystem, value as string)
79               multicheck (display a textbox for selecting multiple options, values as strings)
80               password (display a textbox with masked text)
81               timestamp (display a calendar)
82
83       value (options)
84
85               Values for argument selection
86               arg     Argument # this value applies to
87

EXAMPLES

89       Example 1:
90
91           arg {number=0}{call=--channel}{display=Wi-Fi Channel}{type=integer}{required=true}
92           arg {number=1}{call=--chanflags}{display=Channel Flags}{type=radio}
93           arg {number=2}{call=--interface}{display=Interface}{type=selector}
94           value {arg=0}{range=1,11}
95           value {arg=1}{value=ht40p}{display=HT40+}
96           value {arg=1}{value=ht40m}{display=HT40-}
97           value {arg=1}{value=ht20}{display=HT20}
98           value {arg=2}{value=wlan0}{display=wlan0}
99
100       Example 2:
101
102           arg {number=0}{call=--usbdevice}{USB Device}{type=selector}
103           value {arg=0}{call=/dev/sysfs/usb/foo/123}{display=Ubertooth One sn 1234}
104           value {arg=0}{call=/dev/sysfs/usb/foo/456}{display=Ubertooth One sn 8901}
105
106       Example 3:
107
108           arg {number=0}{call=--usbdevice}{USB Device}{type=selector}
109           arg {number=1}{call=--server}{display=IP address for log server}{type=string}{validation=(?:\d{1,3}\.){3}\d{1,3}}
110           flag {failure=Permission denied opening Ubertooth device}
111
112       Example 4:
113
114           arg {number=0}{call=--username}{display=Username}{type=string}
115           arg {number=1}{call=--password}{display=Password}{type=password}
116
117       Example 5:
118
119           arg {number=0}{call=--start}{display=Start Time}{type=timestamp}
120           arg {number=1}{call=--end}{display=End Time}{type=timestamp}
121

SECURITY CONSIDERATIONS

123       •   If you’re running Wireshark as root, we can’t save you.
124
125       •   Dumpcap retains suid/setgid and group execute permissions for users
126           in the “wireshark” group only.
127
128       •   Third-party capture programs run with whatever privileges they’re
129           installed with.
130
131       •   If an attacker can write to a system binary directory, it’s game
132           over.
133
134       •   You can find your local extcap directory in About  Folders.
135

SEE ALSO

137       wireshark(1), tshark(1), dumpcap(1), androiddump(1), sshdump(1),
138       randpktdump(1)
139

NOTES

141       Extcap is feature of Wireshark. The latest version of Wireshark can be
142       found at https://www.wireshark.org.
143
144       HTML versions of the Wireshark project man pages are available at
145       https://www.wireshark.org/docs/man-pages.
146
147
148
149                                  2022-12-08                         EXTCAP(4)
Impressum